Public Types | Public Member Functions | Protected Member Functions

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

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

#include <labeled_image.hh>

Inheritance diagram for mln::labeled_image< I >:
Inheritance graph

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 ()
 ConstructorsConstructor without argument.
 labeled_image (const I &ima, const typename I::value &nlabels)
 Constructor from an image ima and the number of labels nlabels.
 labeled_image (const I &ima, const typename I::value &nlabels, const util::array< mln_box(I)> &bboxes)
 Constructor from an image ima, the number of labels nlabels and the object bounding boxes.

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

Protected Member Functions

void update_data (const fun::i2v::array< typename I::value > &relabel_fun)
 Update bounding boxes information.

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).

Definition at line 105 of file labeled_image.hh.


Member Typedef Documentation

typedef accu::shape::bbox<typename I ::psite>::result mln::labeled_image_base< I, labeled_image< I > >::bbox_t [inherited]

Type of the bounding component bounding boxes.

Definition at line 124 of file labeled_image_base.hh.

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

Skeleton.

Definition at line 113 of file labeled_image.hh.


Constructor & Destructor Documentation

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

ConstructorsConstructor without argument.

Definition at line 193 of file labeled_image.hh.

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.

Definition at line 199 of file labeled_image.hh.

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

Constructor from an image ima, the number of labels nlabels and the object bounding boxes.

Definition at line 206 of file labeled_image.hh.

References mln::data::compute().


Member Function Documentation

const bbox_t& mln::labeled_image_base< I, labeled_image< I > >::bbox ( const typename I::value &  label  )  const [inherited]

Return the bounding box of the component label.

const util::array<bbox_t>& mln::labeled_image_base< I, labeled_image< I > >::bboxes (  )  const [inherited]

Return the component bounding boxes.

I ::value mln::labeled_image_base< I, labeled_image< I > >::nlabels (  )  const [inherited]

Return the number of labels;.

void mln::labeled_image_base< I, labeled_image< I > >::relabel ( const Function_v2b< F > &  f  )  [inherited]

Labels may be removed.

This overload make sure the labeling is still contiguous.

void mln::labeled_image_base< I, labeled_image< I > >::relabel ( const Function_v2v< F > &  f  )  [inherited]

Relabel according to a function.

Merge or delete labels according to the given function. This method ensures that the labeling remains contiguous.

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

Return the domain of the component with label label.

void mln::labeled_image_base< I, labeled_image< I > >::update_data ( const fun::i2v::array< typename I::value > &  relabel_fun  )  [protected, inherited]

Update bounding boxes information.