mln::labeled_image< I > Class Template Reference
[Identity morphers]

Morpher providing an improved interface for labeled image. More...

#include <labeled_image.hh>

Inherits image_identity< const I, I::domain_t, labeled_image< I > >.

List of all members.

Public Types

typedef accu::shape::bbox
< typename I::psite >::result 
bbox_t
 Type of the bounding component bounding boxes.
typedef labeled_image
< tag::image_< I > > 
skeleton
 Skeleton.

Public Member Functions

const bbox_tbbox (const typename I::value &label) const
 Return the bounding box of the component label.
const util::array< bbox_t > & bboxes () const
 Return the component bounding boxes.
I::value nlabels () const
 Return the number of labels;.
p_if< mln_box(I),
fun::eq_v2b_expr_< pw::value_
< I >, pw::cst_< typename
I::value > > > 
subdomain (const typename I::value &label) const
 Return the domain of the component with label label.
 labeled_image (const I &ima, const typename I::value &nlabels)
 Constructor from an image ima and the number of labels nlabels.
 labeled_image ()
 Constructors

Constructor without argument.

template<typename F >
void relabel (const Function_v2b< F > &f)
 Labels may be removed.
template<typename F >
void relabel (const Function_v2v< F > &f)
 Relabel according to a function.


Detailed Description

template<typename I>
class mln::labeled_image< I >

Morpher providing an improved interface for labeled image.

Template Parameters:
I The label image type.
This image type allows to access every site set at a given label.

This image type guaranties that labels are contiguous (from 1 to n).


Member Typedef Documentation

template<typename I>
typedef accu::shape::bbox<typename I ::psite>::result mln::labeled_image< I >::bbox_t

Type of the bounding component bounding boxes.

template<typename I>
typedef labeled_image< tag::image_<I> > mln::labeled_image< I >::skeleton

Skeleton.


Constructor & Destructor Documentation

template<typename I >
mln::labeled_image< I >::labeled_image (  )  [inline]

Constructors

Constructor without argument.

template<typename I >
mln::labeled_image< I >::labeled_image ( const I &  ima,
const typename I::value &  nlabels 
) [inline]

Constructor from an image ima and the number of labels nlabels.


Member Function Documentation

template<typename I >
const labeled_image< I >::bbox_t & mln::labeled_image< I >::bbox ( const typename I::value &  label  )  const [inline]

Return the bounding box of the component label.

Referenced by mln::labeled_image< I >::subdomain().

template<typename I >
const util::array< typename labeled_image< I >::bbox_t > & mln::labeled_image< I >::bboxes (  )  const [inline]

Return the component bounding boxes.

template<typename I >
I::value mln::labeled_image< I >::nlabels (  )  const [inline]

Return the number of labels;.

template<typename I >
template<typename F >
void mln::labeled_image< I >::relabel ( const Function_v2b< F > &  f  )  [inline]

Labels may be removed.

This overload make sure the labeling is still contiguous.

References mln::labeling::relabel_inplace().

template<typename I >
template<typename F >
void mln::labeled_image< I >::relabel ( const Function_v2v< F > &  f  )  [inline]

Relabel according to a function.

Labels may be removed and the labeling may not be contiguous afterwards. FIXME: currently the labels are packed after relabeling for performance reasons. Do we want to be less restrictive?

See also:
pack_().

References mln::labeling::relabel_inplace().

template<typename I >
p_if< mln_box(I), fun::eq_v2b_expr_< pw::value_< I >, pw::cst_< typename I::value > > > mln::labeled_image< I >::subdomain ( const typename I::value &  label  )  const [inline]

Return the domain of the component with label label.

References mln::labeled_image< I >::bbox().


Generated on Tue Jul 14 16:32:25 2009 for Milena (Olena) by  doxygen 1.5.9