#include <labeled_image_base.hh>
Public Types | |
typedef accu::shape::bbox < typename I::psite >::result | bbox_t |
Type of the bounding component bounding boxes. | |
typedef S::bkd_piter | bkd_piter |
Backward Site_Iterator associated type. | |
typedef Image< void > | category |
typedef I | delegatee |
Delegatee associated type. | |
typedef S | domain_t |
Site_Set associated type. | |
typedef E | exact_t |
typedef S::fwd_piter | fwd_piter |
Forward Site_Iterator associated type. | |
typedef internal::morpher_lvalue_< I > ::ret | lvalue |
Return type of read-write access. | |
typedef fwd_piter | piter |
Site_Iterator associated type; default definition is fwd_piter. | |
typedef S::psite | psite |
Point_Site associated type. | |
typedef I::rvalue | rvalue |
Return type of read-only access. | |
typedef S::site | site |
Site associated type. | |
typedef mln::value::set< I::value > | t_eligible_values_set |
Eligible-value-set associated type. | |
typedef mln::value::set < typename mln::value::super_value < I::value >::ret > | t_values_space |
Value space associated type. | |
typedef I | unmorph |
Unmorph image associated type. | |
typedef I::value | value |
Value associated type. | |
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 * | delegatee_ () |
Return the delegatee_ pointer (non-const version); default code. | |
mln::metal::const_< I >::ret * | delegatee_ () const |
Return the delegatee_ pointer; default code. | |
void | destroy () |
Detach data from an image (free it if nobody else hold it). | |
const I::domain_t & | domain () const |
bool | has (const psite &p) const |
Test if p belongs to the image domain. | |
bool | has (const typename I::psite &p) const |
const util::tracked_ptr < internal::data< E > > & | hook_data_ () const |
Hook to the image data. | |
const void * | id_ () const |
Give an identifier of this image. | |
template<typename P> | |
unsigned | index_of_point (const P &p) const |
Give the offset of the site p . | |
bool | is_valid () const |
Test if this image has been initialized; default impl. | |
I::value | nlabels () const |
Return the number of labels;. | |
std::size_t | nsites () const |
Give the number of sites of the image domain. | |
lvalue | operator() (const typename S::psite &p) |
Read-write access of pixel value at point site p . | |
rvalue | operator() (const typename S::psite &p) const |
Read-only access of pixel value at point site p . | |
E & | rw () |
State that the morpher is writable. | |
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 . | |
mln::metal::const_< I >::ret & | unmorph_ () const |
Give the morphed image (const version). | |
I & | unmorph_ () |
Give the morphed image (mutable version). | |
const t_eligible_values_set & | values_eligible () const |
const t_values_space & | values_space () const |
Return the value space of the image. | |
labeled_image_base () | |
Constructors | |
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. | |
Protected Member Functions | |
template<typename F> | |
void | relabel_ (const Function_v2b< F > &f) |
template<typename F> | |
void | relabel_ (const Function_v2v< F > &f) |
void | update_data (const fun::i2v::array< typename I::value > &relabel_fun) |
Update bounding boxes information. | |
void | update_data_ (const fun::i2v::array< typename I::value > &relabel_fun) |
Protected Attributes | |
util::tracked_ptr < internal::data< E > > | data_ |
Package Attributes | |
__pad0__:image_identity< const I | |
E | super_ |
I | The label image type. |
This image type guaranties that labels are contiguous (from 1 to n).
Definition at line 114 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 122 of file labeled_image_base.hh.
typedef S ::bkd_piter mln::internal::image_base< I::value , S , E >::bkd_piter [inherited] |
Backward Site_Iterator associated type.
Reimplemented in mln::ch_piter_image< I, Fwd >, mln::hexa< I >, and mln::hexa< mln::image2d< V > >.
Definition at line 118 of file core/internal/image_base.hh.
typedef Image<void> mln::Image< E >::category [inherited] |
typedef I mln::internal::image_morpher< I , I::value , S , E >::delegatee [inherited] |
typedef S mln::internal::image_base< I::value , S , E >::domain_t [inherited] |
typedef E mln::Object< E >::exact_t [inherited] |
typedef S ::fwd_piter mln::internal::image_base< I::value , S , E >::fwd_piter [inherited] |
Forward Site_Iterator associated type.
Reimplemented in mln::ch_piter_image< I, Fwd >, mln::hexa< I >, and mln::hexa< mln::image2d< V > >.
Definition at line 115 of file core/internal/image_base.hh.
typedef internal::morpher_lvalue_< I >::ret mln::internal::image_identity< I, S, E >::lvalue [inherited] |
Return type of read-write access.
Reimplemented in mln::decorated_image< I, D >, mln::interpolated< I, F >, mln::lazy_image< I, F, B >, and mln::tr_image< S, I, T >.
Definition at line 140 of file image_identity.hh.
typedef fwd_piter mln::internal::image_base< I::value , S , E >::piter [inherited] |
Site_Iterator associated type; default definition is fwd_piter.
Reimplemented in mln::ch_piter_image< I, Fwd >.
Definition at line 123 of file core/internal/image_base.hh.
typedef S ::psite mln::internal::image_base< I::value , S , E >::psite [inherited] |
Point_Site associated type.
Reimplemented in mln::hexa< I >, mln::image2d_h< V >, mln::decorated_image< I, D >, mln::interpolated< I, F >, mln::tr_image< S, I, T >, and mln::hexa< mln::image2d< V > >.
Definition at line 108 of file core/internal/image_base.hh.
typedef I ::rvalue mln::internal::image_identity< I, S, E >::rvalue [inherited] |
Return type of read-only access.
Reimplemented in mln::extension_fun< I, F >, mln::extension_ima< I, J >, mln::extension_val< I >, mln::decorated_image< I, D >, mln::interpolated< I, F >, mln::lazy_image< I, F, B >, and mln::tr_image< S, I, T >.
Definition at line 137 of file image_identity.hh.
typedef S ::site mln::internal::image_base< I::value , S , E >::site [inherited] |
Site associated type.
Reimplemented in mln::tr_image< S, I, T >.
Definition at line 111 of file core/internal/image_base.hh.
typedef mln::value::set<I::value > mln::internal::image_base< I::value , S , E >::t_eligible_values_set [inherited] |
typedef mln::value::set< typename mln::value::super_value<I::value >::ret > mln::internal::image_base< I::value , S , E >::t_values_space [inherited] |
typedef I mln::internal::image_morpher< I , I::value , S , E >::unmorph [inherited] |
typedef I ::value mln::internal::image_identity< I, S, E >::value [inherited] |
Value associated type.
Reimplemented from mln::internal::image_base< I::value, S, E >.
Reimplemented in mln::extension_fun< I, F >, mln::extension_ima< I, J >, mln::extension_val< I >, mln::interpolated< I, F >, and mln::tr_image< S, I, T >.
Definition at line 134 of file image_identity.hh.
mln::labeled_image_base< I, E >::labeled_image_base | ( | ) | [inline] |
const labeled_image_base< I, E >::bbox_t & mln::labeled_image_base< I, E >::bbox | ( | const typename I::value & | label | ) | const [inline] |
Return the bounding box of the component label
.
Definition at line 292 of file labeled_image_base.hh.
References mln::internal::image_base< I::value, S, E >::data_.
Referenced by mln::labeled_image_base< I, E >::subdomain(), and mln::test_image().
const util::array< typename labeled_image_base< I, E >::bbox_t > & mln::labeled_image_base< I, E >::bboxes | ( | ) | const [inline] |
Return the component bounding boxes.
Definition at line 300 of file labeled_image_base.hh.
References mln::internal::image_base< I::value, S, E >::data_.
Referenced by mln::labeled_image< I >::labeled_image().
I * mln::internal::image_morpher< I , I::value , S , E >::delegatee_ | ( | ) | [inherited] |
Return the delegatee_ pointer (non-const version); default code.
mln::metal::const_< I >::ret* mln::internal::image_morpher< I , I::value , S , E >::delegatee_ | ( | ) | const [inherited] |
Return the delegatee_ pointer; default code.
Referenced by mln::internal::image_identity< I, S, E >::domain(), mln::tr_image< S, I, T >::has(), mln::internal::image_identity< I, S, E >::has(), mln::tr_image< S, I, T >::is_valid(), mln::transformed_image< I, F >::operator()(), mln::internal::image_identity< I, S, E >::operator()(), mln::internal::image_domain_morpher< I, S, E >::operator()(), and mln::decorated_image< I, D >::operator()().
void mln::internal::image_base< I::value , S , E >::destroy | ( | ) | [inherited] |
Detach data from an image (free it if nobody else hold it).
Referenced by mln::plain< I >::operator=().
const I::domain_t & mln::internal::image_identity< I, S, E >::domain | ( | ) | const [inline, inherited] |
Reimplemented in mln::lazy_image< I, F, B >, and mln::tr_image< S, I, T >.
Definition at line 189 of file image_identity.hh.
References mln::internal::image_morpher< I, I::value, S, E >::delegatee_().
bool mln::internal::image_base< I::value , S , E >::has | ( | const psite & | p | ) | const [inherited] |
Test if p
belongs to the image domain.
Referenced by mln::unproject_image< I, D, F >::operator()(), mln::transformed_image< I, F >::operator()(), mln::slice_image< I >::operator()(), mln::p2p_image< I, F >::operator()(), and mln::internal::image_domain_morpher< I, S, E >::operator()().
bool mln::internal::image_identity< I, S, E >::has | ( | const typename I::psite & | p | ) | const [inline, inherited] |
Reimplemented in mln::lazy_image< I, F, B >.
Definition at line 198 of file image_identity.hh.
References mln::internal::image_morpher< I, I::value, S, E >::delegatee_().
const util::tracked_ptr< internal::data<E > >& mln::internal::image_base< I::value , S , E >::hook_data_ | ( | ) | const [inherited] |
const void* mln::internal::image_base< I::value , S , E >::id_ | ( | ) | const [inherited] |
Give an identifier of this image.
When several image variables designate the same image, they share the same identifier.
unsigned mln::internal::check::image_fastest_< E, B >::index_of_point | ( | const P & | p | ) | const [inline, inherited] |
Give the offset of the site p
.
[in] | p | A site. |
p
. Definition at line 133 of file internal/check/image_fastest.hh.
bool mln::internal::image_morpher< I , I::value , S , E >::is_valid | ( | ) | const [inherited] |
Test if this image has been initialized; default impl.
Reimplemented from mln::internal::image_base< I::value, S, E >.
Reimplemented in mln::interpolated< I, F >, and mln::tr_image< S, I, T >.
Referenced by mln::extension_val< I >::change_extension(), mln::decorated_image< I, D >::decorated_image(), mln::unproject_image< I, D, F >::domain(), mln::slice_image< I >::domain(), mln::p2p_image< I, F >::domain(), mln::image_if< I, F >::domain(), mln::hexa< I >::domain(), mln::extended_to(), mln::extension_val< I >::extension(), mln::extension_ima< I, J >::extension(), mln::extension_fun< I, F >::extension(), mln::p2p_image< I, F >::fun(), mln::hexa< I >::has(), mln::extension_ima< I, J >::has(), mln::unproject_image< I, D, F >::init_(), mln::transformed_image< I, F >::init_(), mln::sub_image_if< I, S >::init_(), mln::sub_image< I, S >::init_(), mln::slice_image< I >::init_(), mln::safe_image< I >::init_(), mln::p2p_image< I, F >::init_(), mln::image_if< I, F >::init_(), mln::hexa< I >::init_(), mln::extended< I >::init_(), mln::decorated_image< I, D >::init_(), mln::make::labeled_image(), mln::plain< I >::operator I(), mln::image_if< I, F >::operator image_if< const I, F >(), mln::slice_image< I >::operator slice_image< const I >(), mln::hexa< I >::operator()(), mln::extension_ima< I, J >::operator()(), mln::extension_fun< I, F >::operator()(), mln::plain< I >::operator=(), mln::plain< I >::plain(), and mln::slice_image< I >::sli().
I::value mln::labeled_image_base< I, E >::nlabels | ( | ) | const [inline] |
Return the number of labels;.
Definition at line 265 of file labeled_image_base.hh.
Referenced by mln::init_(), mln::labeled_image< I >::init_from_(), and mln::test_image().
std::size_t mln::internal::image_base< I::value , S , E >::nsites | ( | ) | const [inherited] |
Give the number of sites of the image domain.
image_identity< I, S, E >::lvalue mln::internal::image_identity< I, S, E >::operator() | ( | const typename S::psite & | p | ) | [inline, inherited] |
Read-write access of pixel value at point site p
.
Definition at line 180 of file image_identity.hh.
References mln::internal::image_morpher< I, I::value, S, E >::delegatee_().
I::rvalue mln::internal::image_identity< I, S, E >::operator() | ( | const typename S::psite & | p | ) | const [inline, inherited] |
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 244 of file labeled_image_base.hh.
References mln::internal::image_base< I::value, S, E >::data_, mln::exact(), 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.
We may have merged or deleted labels.
Definition at line 218 of file labeled_image_base.hh.
References mln::internal::image_base< I::value, S, E >::data_, mln::exact(), 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_v2b< F > & | f | ) | [inline, protected] |
Definition at line 329 of file labeled_image_base.hh.
void mln::labeled_image_base< I, E >::relabel_ | ( | const Function_v2v< F > & | f | ) | [inline, protected] |
Definition at line 320 of file labeled_image_base.hh.
E & mln::internal::image_morpher< I , I::value , S , E >::rw | ( | ) | [inherited] |
State that the morpher is writable.
This allows for C++ to use it as a mutable object even if it is a temporary object.
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 [inline] |
Return the domain of the component with label label
.
Definition at line 309 of file labeled_image_base.hh.
References mln::labeled_image_base< I, E >::bbox(), mln::pw::cst(), mln::internal::image_base< I::value, S, E >::data_, and mln::pw::value().
mln::metal::const_< I >::ret& mln::internal::image_morpher< I , I::value , S , E >::unmorph_ | ( | ) | const [inherited] |
Give the morphed image (const version).
I & mln::internal::image_morpher< I , I::value , S , E >::unmorph_ | ( | ) | [inherited] |
Give the morphed image (mutable version).
void mln::labeled_image_base< I, E >::update_data | ( | const fun::i2v::array< typename I::value > & | relabel_fun | ) | [inline, protected] |
Update bounding boxes information.
Definition at line 273 of file labeled_image_base.hh.
References mln::internal::image_base< I::value, S, E >::data_, mln::exact(), mln::convert::from_to(), and mln::util::array< T >::size().
Referenced by mln::labeled_image_base< I, E >::relabel().
void mln::labeled_image_base< I, E >::update_data_ | ( | const fun::i2v::array< typename I::value > & | relabel_fun | ) | [inline, protected] |
Definition at line 337 of file labeled_image_base.hh.
const t_eligible_values_set& mln::internal::image_base< I::value , S , E >::values_eligible | ( | ) | const [inherited] |
const t_values_space& mln::internal::image_base< I::value , S , E >::values_space | ( | ) | const [inherited] |
Return the value space of the image.
mln::labeled_image_base< I, E >::__pad0__ [package] |
Definition at line 117 of file labeled_image_base.hh.
util::tracked_ptr< internal::data<E > > mln::internal::image_base< I::value , S , E >::data_ [protected, inherited] |
Definition at line 163 of file core/internal/image_base.hh.
Referenced by mln::labeled_image_base< I, E >::bbox(), mln::labeled_image_base< I, E >::bboxes(), mln::extension_val< I >::change_extension(), mln::decorated_image< I, D >::decorated_image(), mln::decorated_image< I, D >::decoration(), mln::unproject_image< I, D, F >::domain(), mln::transformed_image< I, F >::domain(), mln::tr_image< S, I, T >::domain(), mln::sub_image_if< I, S >::domain(), mln::sub_image< I, S >::domain(), mln::slice_image< I >::domain(), mln::p2p_image< I, F >::domain(), mln::lazy_image< I, F, B >::domain(), mln::image_if< I, F >::domain(), mln::hexa< I >::domain(), mln::extended< I >::domain(), mln::extension_val< I >::extension(), mln::extension_ima< I, J >::extension(), mln::extension_fun< I, F >::extension(), mln::p2p_image< I, F >::fun(), mln::tr_image< S, I, T >::has(), mln::lazy_image< I, F, B >::has(), mln::interpolated< I, F >::has(), mln::hexa< I >::has(), mln::extension_ima< I, J >::has(), mln::unproject_image< I, D, F >::init_(), mln::transformed_image< I, F >::init_(), mln::tr_image< S, I, T >::init_(), mln::sub_image_if< I, S >::init_(), mln::sub_image< I, S >::init_(), mln::slice_image< I >::init_(), mln::safe_image< I >::init_(), mln::plain< I >::init_(), mln::p2p_image< I, F >::init_(), mln::lazy_image< I, F, B >::init_(), mln::labeled_image< I >::init_(), mln::interpolated< I, F >::init_(), mln::image_if< I, F >::init_(), mln::hexa< I >::init_(), mln::extension_val< I >::init_(), mln::extension_ima< I, J >::init_(), mln::extension_fun< I, F >::init_(), mln::extended< I >::init_(), mln::decorated_image< I, D >::init_(), mln::ch_piter_image< I, Fwd >::init_(), mln::labeled_image< I >::init_from_(), mln::interpolated< I, F >::is_valid(), mln::labeled_image< I >::labeled_image(), mln::lazy_image< I, F, B >::lazy_image(), mln::decorated_image< I, D >::operator decorated_image< const I, D >(), mln::plain< I >::operator I(), mln::image_if< I, F >::operator image_if< const I, F >(), mln::safe_image< I >::operator safe_image< const I >(), mln::slice_image< I >::operator slice_image< const I >(), mln::sub_image< I, S >::operator sub_image< const I, S >(), mln::transformed_image< I, F >::operator transformed_image< const I, F >(), mln::unproject_image< I, D, F >::operator()(), mln::transformed_image< I, F >::operator()(), mln::tr_image< S, I, T >::operator()(), mln::slice_image< I >::operator()(), mln::p2p_image< I, F >::operator()(), mln::hexa< I >::operator()(), mln::extension_ima< I, J >::operator()(), mln::extension_fun< I, F >::operator()(), mln::plain< I >::operator=(), mln::plain< I >::plain(), mln::decorated_image< I, D >::read_(), mln::labeled_image_base< I, E >::relabel(), mln::tr_image< S, I, T >::set_tr(), mln::slice_image< I >::sli(), mln::labeled_image_base< I, E >::subdomain(), mln::tr_image< S, I, T >::tr(), and mln::labeled_image_base< I, E >::update_data().
E mln::labeled_image_base< I, E >::super_ [package] |