Base class Morpher providing an improved interface for labeled image. More...
#include <labeled_image_base.hh>

Public Types | |
| typedef accu::shape::bbox < typename I::psite >::result | bbox_t |
| Type of the bounding component bounding boxes. | |
Public Member Functions | |
| const bbox_t & | bbox (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_base () | |
| ConstructorsConstructor without argument. | |
| template<typename F > | |
| void | relabel (const Function_v2v< F > &f) |
| Relabel according to a function. | |
| template<typename F > | |
| 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. | |
Base class Morpher providing an improved interface for labeled image.
| 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 116 of file labeled_image_base.hh.
| typedef accu::shape::bbox<typename I ::psite>::result mln::labeled_image_base< I, E >::bbox_t |
Type of the bounding component bounding boxes.
Definition at line 124 of file labeled_image_base.hh.
| mln::labeled_image_base< I, E >::labeled_image_base | ( | ) | [inline] |
ConstructorsConstructor without argument.
Definition at line 217 of file labeled_image_base.hh.
| const labeled_image_base< I, E >::bbox_t & mln::labeled_image_base< I, E >::bbox | ( | const typename I::value & | label | ) | const |
Return the bounding box of the component label.
Definition at line 305 of file labeled_image_base.hh.
Referenced by mln::labeled_image_base< I, E >::subdomain().
| const util::array< typename labeled_image_base< I, E >::bbox_t > & mln::labeled_image_base< I, E >::bboxes | ( | ) | const |
Return the component bounding boxes.
Definition at line 313 of file labeled_image_base.hh.
| I::value mln::labeled_image_base< I, E >::nlabels | ( | ) | const [inline] |
Return the number of labels;.
Definition at line 273 of file labeled_image_base.hh.
| void mln::labeled_image_base< I, E >::relabel | ( | const Function_v2b< F > & | f | ) | [inline] |
Labels may be removed.
This overload make sure the labeling is still contiguous.
Definition at line 252 of file labeled_image_base.hh.
References mln::labeling::relabel_inplace(), mln::make::relabelfun(), and mln::labeled_image_base< I, E >::update_data().
| void mln::labeled_image_base< I, E >::relabel | ( | const Function_v2v< F > & | f | ) | [inline] |
Relabel according to a function.
Merge or delete labels according to the given function. This method ensures that the labeling remains contiguous.
Definition at line 226 of file labeled_image_base.hh.
References mln::labeling::relabel_inplace(), mln::make::relabelfun(), and mln::labeled_image_base< I, E >::update_data().
| p_if< mln_box(I), fun::eq_v2b_expr_< pw::value_< I >, pw::cst_< typename I::value > > > mln::labeled_image_base< I, E >::subdomain | ( | const typename I::value & | label | ) | const |
Return the domain of the component with label label.
Definition at line 322 of file labeled_image_base.hh.
References mln::labeled_image_base< I, E >::bbox().
| void mln::labeled_image_base< I, E >::update_data | ( | const fun::i2v::array< typename I::value > & | relabel_fun | ) | [protected] |
Update bounding boxes information.
Definition at line 281 of file labeled_image_base.hh.
References mln::util::array< T >::size().
Referenced by mln::labeled_image_base< I, E >::relabel().
1.7.1