Namespaces | Functions | Variables

mln::border Namespace Reference

Namespace of routines related to image virtual (outer) border. More...

Namespaces

namespace  impl
 

Implementation namespace of border namespace.


namespace  internal

Functions

template<typename I >
void adjust (const Image< I > &ima, unsigned min_thickness)
template<typename I >
void duplicate (const Image< I > &ima)
template<typename I , typename J >
void equalize (const Image< I > &ima1, const Image< J > &ima2, unsigned min_thickness)
template<typename I >
void fill (const Image< I > &ima, const typename I::value &v)
template<typename I >
unsigned find (const Image< I > &ima)
template<typename I >
unsigned get (const Image< I > &ima)
template<typename I >
void mirror (const Image< I > &ima)
template<typename I >
void resize (const Image< I > &ima, unsigned thickness)
 Facade.
template<typename I , typename J >
void resize_equal (const Image< I > &ima1, const Image< J > &ima2)

Variables

unsigned thickness = 3

Detailed Description

Namespace of routines related to image virtual (outer) border.


Function Documentation

template<typename I >
void mln::border::adjust ( const Image< I > &  ima,
unsigned  min_thickness 
) [inline]

Adjust the virtual (outer) border of image ima so that its size is at least min_thickness.

Parameters:
[in,out] ima The image whose border is to be adjusted.
[in] min_thickness The expected border minimum thickness.
Precondition:
ima has to be initialized.
Warning:
If the image border is already larger than min_thickness, this routine is a no-op.

Definition at line 62 of file border/adjust.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), get(), and resize().

template<typename I >
void mln::border::duplicate ( const Image< I > &  ima  ) 

Assign the virtual (outer) border of image ima with the duplicate of the inner border of this image.

Parameters:
[in,out] ima The image whose border is to be duplicated.
Precondition:
ima has to be initialized.
Todo:
Optimize with memcpy if possible.

Definition at line 252 of file border/duplicate.hh.

References mln::border::internal::duplicate_dispatch(), mln::trace::entering(), mln::exact(), mln::trace::exiting(), and get().

Referenced by mln::border::impl::resize().

template<typename I , typename J >
void mln::border::equalize ( const Image< I > &  ima1,
const Image< J > &  ima2,
unsigned  min_thickness 
) [inline]

Equalize the virtual (outer) border of images ima1 and ima2 so that their size is equal and is at least min_thickness.

Parameters:
[in,out] ima1 The first image whose border is to be equalizeed.
[in,out] ima2 The second image whose border is to be equalizeed.
[in] min_thickness The expected border minimum thickness of both images.
Precondition:
ima1 has to be initialized.
ima2 has to be initialized.
Warning:
If both image borders already have the same thickness and if this thickness is larger than min_thickness, this routine is a no-op.

Definition at line 112 of file border/equalize.hh.

References mln::trace::entering(), mln::border::impl::equalize_(), mln::exact(), mln::trace::exiting(), and get().

Referenced by mln::topo::skeleton::impl::crest_fastest_2d().

template<typename I >
void mln::border::fill ( const Image< I > &  ima,
const typename I::value &  v 
) [inline]

Fill the virtual (outer) border of image ima with the single value v.

Parameters:
[in,out] ima The image whose border is to be filled.
[in] v The value to assign to all border pixels.
Precondition:
ima has to be initialized.
Todo:
Optimize with memset if possible.

Definition at line 201 of file border/fill.hh.

References mln::trace::entering(), mln::trace::exiting(), mln::border::internal::fill_dispatch(), and mln::border::internal::fill_tests().

Referenced by mln::border::impl::resize().

template<typename I >
unsigned mln::border::find ( const Image< I > &  ima  )  [inline]

Find the virtual (outer) border thickness of image ima.

Parameters:
[in] ima The image.
Returns:
The border thickness (0 if there is no border).
Precondition:
ima has to be initialized.

Definition at line 95 of file find.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::border::impl::find_().

Referenced by mln::border::impl::find__(), and mln::init_().

template<typename I >
unsigned mln::border::get ( const Image< I > &  ima  )  [inline]

Get the virtual (outer) border thickness of image ima.

Parameters:
[in] ima The image.
Returns:
The border thickness (0 if there is no border).
Precondition:
ima has to be initialized.

Definition at line 90 of file border/get.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::border::impl::get_().

Referenced by adjust(), mln::canvas::morpho::impl::attribute_filter_fastest(), duplicate(), equalize(), mln::border::impl::equalize_(), mln::border::impl::get_(), mln::data::internal::paste_without_localization_dispatch(), mln::border::impl::resize(), and resize_equal().

template<typename I >
void mln::border::mirror ( const Image< I > &  ima  )  [inline]

Mirror the virtual (outer) border of image ima with the (inner) level contents of this image.

Parameters:
[in,out] ima The image whose border is to be mirrored.
Precondition:
ima has to be initialized.
Todo:
Implement 3d version + optimize with memset if possible.

Definition at line 211 of file border/mirror.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::border::impl::mirror_().

Referenced by mln::chck1d(), and mln::chck2d().

template<typename I >
void mln::border::resize ( const Image< I > &  ima,
unsigned  thickness 
) [inline]

Facade.

Resize the virtual (outer) border of image ima to exactly thickness.

Parameters:
[in,out] ima The image whose border is to be resized.
[in] thickness The expected border thickness.
Precondition:
ima has to be initialized.
Warning:
If the image border already has the expected thickness, this routine is a no-op.

Definition at line 126 of file resize.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::primary(), and mln::border::internal::resize_dispatch().

Referenced by adjust(), mln::border::internal::resize_dispatch(), resize_equal(), mln::accu::image::impl::take_n_times_fastest(), mln::convert::impl::to_qimage_qt_rgb32(), and mln::convert::impl::to_qimage_rgb8().

template<typename I , typename J >
void mln::border::resize_equal ( const Image< I > &  ima1,
const Image< J > &  ima2 
) [inline]

Variable Documentation

unsigned mln::border::thickness = 3

Definition at line 48 of file thickness.hh.

Referenced by mln::subsampling::antialiased().