Namespace of image processing routines related to pixel data. More...
Namespaces | |
namespace | approx |
Namespace of image processing routines related to pixel levels with approximation. | |
namespace | impl |
Implementation namespace of data namespace. | |
namespace | naive |
Namespace of image processing routines related to pixel levels with naive approach. | |
Functions | |
template<typename I , typename O > | |
void | abs (const Image< I > &input, Image< O > &output) |
template<typename I > | |
void | abs_inplace (Image< I > &input) |
template<typename I , typename F > | |
void | apply (Image< I > &input, const Function_v2v< F > &f) |
template<typename A , typename I > | |
A::result | compute (const Accumulator< A > &a, const Image< I > &input) |
Compute an accumulator onto the pixel values of the image input . | |
template<typename A , typename I > | |
A::result | compute (Accumulator< A > &a, const Image< I > &input) |
Compute an accumulator onto the pixel values of the image input . | |
template<typename V , typename I > | |
mln::trait::ch_value< I, V >::ret | convert (const V &v, const Image< I > &input) |
Convert the image input by changing the value type. | |
template<typename I , typename W , typename O > | |
void | fast_median (const Image< I > &input, const Window< W > &win, Image< O > &output) |
template<typename I , typename D > | |
void | fill (Image< I > &ima, const D &data) |
template<typename I , typename J > | |
void | fill_with_image (Image< I > &ima, const Image< J > &data) |
Fill the image ima with the values of the image data . | |
template<typename I , typename W > | |
mln::trait::concrete< I >::ret | median (const Image< I > &input, const Window< W > &win) |
template<typename A , typename I > | |
mln_meta_accu_result (A, typename I::value) compute(const Meta_Accumulator< A > &a | |
Compute an accumulator onto the pixel values of the image input . | |
template<typename I , typename J > | |
void | paste (const Image< I > &input, Image< J > &output) |
Paste the contents of image input into the image output . | |
template<typename I , typename J > | |
void | paste_without_localization (const Image< I > &input, Image< J > &output) |
Paste the contents of image input into the image output without taking into account the localization of sites. | |
template<typename I > | |
void | replace (Image< I > &input, const typename I::value &old_value, const typename I::value &new_value) |
template<typename I , typename V > | |
mln::trait::ch_value< I, V >::ret | saturate (const Image< I > &input, const V &min, const V &max) |
template<typename V , typename I > | |
mln::trait::ch_value< I, V >::ret | saturate (V v, const Image< I > &input) |
template<typename I > | |
void | saturate_inplace (Image< I > &input, const typename I::value &min, const typename I::value &max) |
template<typename I > | |
util::array< unsigned > | sort_offsets_increasing (const Image< I > &input) |
Sort pixel offsets of the image input wrt increasing pixel values. | |
template<typename I > | |
p_array< typename I::psite > | sort_psites_decreasing (const Image< I > &input) |
template<typename I > | |
p_array< typename I::psite > | sort_psites_increasing (const Image< I > &input) |
template<typename V , typename I > | |
mln::trait::ch_value< I, V >::ret | stretch (const V &v, const Image< I > &input) |
template<typename I , typename O > | |
void | to_enc (const Image< I > &input, Image< O > &output) |
template<typename I1 , typename I2 , typename F > | |
mln::trait::ch_value< I1, typename F::result >::ret | transform (const Image< I1 > &input1, const Image< I2 > &input2, const Function_vv2v< F > &f) |
template<typename I , typename F > | |
mln::trait::ch_value< I, typename F::result >::ret | transform (const Image< I > &input, const Function_v2v< F > &f) |
template<typename I1 , typename I2 , typename F > | |
void | transform_inplace (Image< I1 > &ima, const Image< I2 > &aux, const Function_vv2v< F > &f) |
template<typename I , typename F > | |
void | transform_inplace (Image< I > &ima, const Function_v2v< F > &f) |
template<typename A , typename I > | |
A::result | update (Accumulator< A > &a, const Image< I > &input) |
template<typename V , typename I > | |
mln::trait::ch_value< I, V >::ret | wrap (const V &v, const Image< I > &input) |
Routine to wrap values such as 0 -> 0 and [1, lmax] maps to [1, Lmax] (using modulus). | |
template<typename I , typename V > | |
void | fill_with_value (Image< I > &ima, const V &val) |
Fill the whole image ima with the single value v . |
Namespace of image processing routines related to pixel data.
void mln::data::abs | ( | const Image< I > & | input, | |
Image< O > & | output | |||
) | [inline] |
Apply the absolute value (abs) function to image pixel values.
[in] | input | The input image. |
[out] | output | The output image. |
Definition at line 68 of file data/abs.hh.
References transform().
void mln::data::abs_inplace | ( | Image< I > & | input | ) | [inline] |
Apply the absolute value (abs) function to image pixel values.
[in,out] | input | The input image. |
Definition at line 80 of file data/abs.hh.
References apply().
void mln::data::apply | ( | Image< I > & | input, | |
const Function_v2v< F > & | f | |||
) | [inline] |
Apply a function-object to the image input
.
[in,out] | input | The input image. |
[in] | f | The function-object. |
This routine runs:
for all p of input
, input(p)
= f
( input(p)
)
This routine is equivalent to data::tranform(input, f, input) but it is faster since a single iterator is required.
Definition at line 95 of file apply.hh.
Referenced by abs_inplace(), and saturate_inplace().
A::result mln::data::compute | ( | const Accumulator< A > & | a, | |
const Image< I > & | input | |||
) | [inline] |
Compute an accumulator onto the pixel values of the image input
.
Be ware that the given accumulator won't be modified and won't store any result.
[in] | a | An accumulator. |
[in] | input | The input image. |
It fully relies on data::update.
Definition at line 93 of file data/compute.hh.
Referenced by mln::labeled_image< I >::labeled_image(), mln::estim::mean(), mln::estim::min_max(), and mln::estim::sum().
A::result mln::data::compute | ( | Accumulator< A > & | a, | |
const Image< I > & | input | |||
) | [inline] |
Compute an accumulator onto the pixel values of the image input
.
[in,out] | a | An accumulator. |
[in] | input | The input image. |
It fully relies on data::update.
Definition at line 104 of file data/compute.hh.
mln::trait::ch_value< I, V >::ret mln::data::convert | ( | const V & | v, | |
const Image< I > & | input | |||
) | [inline] |
Convert the image input
by changing the value type.
[in] | v | A value of the destination type. |
[in] | input | The input image. |
Definition at line 154 of file mln/data/convert.hh.
Referenced by mln::morpho::watershed::superpose(), and mln::debug::superpose().
void mln::data::fast_median | ( | const Image< I > & | input, | |
const Window< W > & | win, | |||
Image< O > & | output | |||
) | [inline] |
Compute in output
the median filter of image input
by the window win
.
[in] | input | The image to be filtered. |
[in] | win | The window. |
[in,out] | output | The output image. |
input
and output
have to be initialized. Definition at line 167 of file fast_median.hh.
void mln::data::fill | ( | Image< I > & | ima, | |
const D & | data | |||
) | [inline] |
Fill the whole image ima
with the data provided by aux
.
[in,out] | ima | The image to be filled. |
[in] | data | The auxiliary data to fill the image ima . |
ima
has to be initialized. Definition at line 138 of file data/fill.hh.
Referenced by mln::draw::box_plain(), mln::draw::dashed_line(), mln::topo::detach(), mln::util::display_branch(), mln::transform::distance_and_closest_point_geodesic(), mln::duplicate(), mln::make::edge_image(), mln::morpho::tree::filter::filter(), mln::transform::hough(), mln::registration::icp(), mln::accu::stat::histo3d_rgb< V >::init(), mln::graph::labeling(), mln::morpho::laplacian(), mln::make_debug_graph_image(), mln::morpho::tree::filter::max(), mln::geom::mesh_corner_point_area(), mln::geom::mesh_normal(), mln::morpho::meyer_wst(), mln::morpho::tree::filter::min(), mln::debug::mosaic(), mln::debug::slices_2d(), mln::morpho::watershed::superpose(), mln::debug::superpose(), mln::morpho::watershed::topological(), and mln::geom::translate().
void mln::data::fill_with_image | ( | Image< I > & | ima, | |
const Image< J > & | data | |||
) | [inline] |
Fill the image ima
with the values of the image data
.
[in,out] | ima | The image to be filled. |
[in] | data | The image. |
ima
has to be included in the one of data
.ima.domain
<= data.domain
. Definition at line 124 of file fill_with_image.hh.
void mln::data::fill_with_value | ( | Image< I > & | ima, | |
const V & | val | |||
) | [inline] |
Fill the whole image ima
with the single value v
.
[in,out] | ima | The image to be filled. |
[in] | val | The value to assign to all sites. |
ima
has to be initialized. Definition at line 130 of file fill_with_value.hh.
Referenced by mln::p_image< I >::clear().
mln::trait::concrete< I >::ret mln::data::median | ( | const Image< I > & | input, | |
const Window< W > & | win | |||
) |
mln::data::mln_meta_accu_result | ( | A | , | |
typename I::value | ||||
) | const [inline] |
Compute an accumulator onto the pixel values of the image input
.
[in] | a | A meta-accumulator. |
[in] | input | The input image. |
void mln::data::paste | ( | const Image< I > & | input, | |
Image< J > & | output | |||
) | [inline] |
Paste the contents of image input
into the image output
.
[in] | input | The input image providing pixels values. |
[in,out] | output | The image in which values are assigned. |
This routine runs:
for all p of input
, output(p)
= input(p)
.
input
has to be included in the one of output
; so using mln::safe_image does not make pasting outside the output domain work.input.domain
<= output.domain
Definition at line 137 of file paste.hh.
Referenced by mln::make::image3d(), mln::draw::line(), mln::debug::mosaic(), mln::geom::rotate(), mln::debug::slices_2d(), and mln::labeling::superpose().
void mln::data::paste_without_localization | ( | const Image< I > & | input, | |
Image< J > & | output | |||
) | [inline] |
Paste the contents of image input
into the image output
without taking into account the localization of sites.
[in] | input | The input image providing pixels values. |
[in,out] | output | The image in which values are assigned. |
Definition at line 349 of file paste_without_localization.hh.
void mln::data::replace | ( | Image< I > & | input, | |
const typename I::value & | old_value, | |||
const typename I::value & | new_value | |||
) |
Replace old_value
by new_value
in the image input
[in] | input | The input image. |
[in] | old_value | The value to be replaced... |
[in] | new_value | ...by this one. |
Definition at line 88 of file replace.hh.
mln::trait::ch_value< I, V >::ret mln::data::saturate | ( | V | v, | |
const Image< I > & | input | |||
) | [inline] |
Apply the saturate function to image pixel values.
[in] | v | A value of the output type. |
[in] | input | The input image. |
The saturation is based on the min and max values of the output value type. This assumes that the range of values in the input image is larger than the one of the output image.
Definition at line 87 of file data/saturate.hh.
References transform().
mln::trait::ch_value< I, V >::ret mln::data::saturate | ( | const Image< I > & | input, | |
const V & | min, | |||
const V & | max | |||
) | [inline] |
Apply the saturate function to image pixel values.
[in] | input | The input image. |
[in] | min | The minimum output value. |
[in] | max | The maximum output value. |
Definition at line 103 of file data/saturate.hh.
References transform().
void mln::data::saturate_inplace | ( | Image< I > & | input, | |
const typename I::value & | min, | |||
const typename I::value & | max | |||
) | [inline] |
Apply the saturate function to image pixel values.
[in,out] | input | The input image. |
[in] | min | The minimum output value. |
[in] | max | The maximum output value |
Definition at line 119 of file data/saturate.hh.
References apply().
util::array< unsigned > mln::data::sort_offsets_increasing | ( | const Image< I > & | input | ) | [inline] |
Sort pixel offsets of the image input
wrt increasing pixel values.
Definition at line 298 of file sort_offsets.hh.
p_array< typename I::psite > mln::data::sort_psites_decreasing | ( | const Image< I > & | input | ) | [inline] |
Sort psites the image input
through a function f
to set the output
image in decreasing way.
[in] | input | The input image. |
input.is_valid
Definition at line 229 of file sort_psites.hh.
Referenced by mln::morpho::tree::min_tree().
p_array< typename I::psite > mln::data::sort_psites_increasing | ( | const Image< I > & | input | ) | [inline] |
Sort psites the image input
through a function f
to set the output
image in increasing way.
[in] | input | The input image. |
input.is_valid
Definition at line 219 of file sort_psites.hh.
Referenced by mln::morpho::tree::max_tree().
mln::trait::ch_value< I, V >::ret mln::data::stretch | ( | const V & | v, | |
const Image< I > & | input | |||
) | [inline] |
Stretch the values of input
so that they can be stored in output
.
[in] | v | A value to set the output value type. |
[in] | input | The input image. |
v
.Definition at line 128 of file stretch.hh.
References mln::data::impl::stretch().
void mln::data::to_enc | ( | const Image< I > & | input, | |
Image< O > & | output | |||
) | [inline] |
Set the output
image with the encoding values of the image input
pixels.
[in] | input | The input image. |
[out] | output | The result image. |
output.domain
>= input.domain
Definition at line 60 of file data/to_enc.hh.
References transform().
mln::trait::ch_value< I, typename F::result >::ret mln::data::transform | ( | const Image< I > & | input, | |
const Function_v2v< F > & | f | |||
) | [inline] |
Transform the image input
through a function f
.
[in] | input | The input image. |
[in] | f | The function. |
This routine runs:
for all p of input
, output(p)
= f
( input(p)
).
Definition at line 202 of file data/transform.hh.
Referenced by abs(), mln::logical::and_not(), mln::labeling::colorize(), mln::arith::diff_abs(), mln::labeling::fill_holes(), mln::linear::mln_ch_convolve(), mln::linear::mln_ch_convolve_grad(), mln::labeling::pack(), mln::labeling::pack_inplace(), mln::labeling::relabel(), saturate(), mln::data::impl::stretch(), to_enc(), mln::labeling::wrap(), and wrap().
mln::trait::ch_value< I1, typename F::result >::ret mln::data::transform | ( | const Image< I1 > & | input1, | |
const Image< I2 > & | input2, | |||
const Function_vv2v< F > & | f | |||
) | [inline] |
Transform two images input1
input2
through a function f
.
[in] | input1 | The 1st input image. |
[in] | input2 | The 2nd input image. |
[in] | f | The function. |
This routine runs:
for all p of input
, output(p)
= f
( input1(p)
, input2(p)
).
Definition at line 219 of file data/transform.hh.
void mln::data::transform_inplace | ( | Image< I1 > & | ima, | |
const Image< I2 > & | aux, | |||
const Function_vv2v< F > & | f | |||
) |
Transform inplace the image ima
with the image aux
through a function f
.
[in] | ima | The image to be transformed. |
[in] | aux | The auxiliary image. |
[in] | f | The function. |
This routine runs:
for all p of ima
, ima(p)
= f
( ima(p)
, aux(p)
).
Definition at line 502 of file transform_inplace.hh.
void mln::data::transform_inplace | ( | Image< I > & | ima, | |
const Function_v2v< F > & | f | |||
) |
Transform inplace the image ima
through a function f
.
[in,out] | ima | The image to be transformed. |
[in] | f | The function. |
This routine runs:
for all p of ima
, ima(p)
= f
( ima(p)
).
Definition at line 490 of file transform_inplace.hh.
Referenced by mln::logical::and_inplace(), mln::logical::and_not_inplace(), mln::logical::not_inplace(), mln::logical::or_inplace(), mln::labeling::relabel_inplace(), and mln::logical::xor_inplace().
A::result mln::data::update | ( | Accumulator< A > & | a, | |
const Image< I > & | input | |||
) | [inline] |
mln::trait::ch_value< I, V >::ret mln::data::wrap | ( | const V & | v, | |
const Image< I > & | input | |||
) |
Routine to wrap values such as 0 -> 0 and [1, lmax] maps to [1, Lmax] (using modulus).
[in] | v | The target value type. |
[in] | input | Input image. |
Definition at line 65 of file data/wrap.hh.
References transform().