Basic 1D image class. More...
#include <image1d.hh>

Public Types | |
| typedef box1d::bkd_piter | bkd_piter |
| Backward Site_Iterator associated type. | |
| typedef Image< void > | category |
| typedef box1d | domain_t |
| Site_Set associated type. | |
| typedef image1d< T > | exact_t |
| typedef box1d::fwd_piter | fwd_piter |
| Forward Site_Iterator associated type. | |
| typedef T & | lvalue |
| Return type of read-write access. | |
| typedef fwd_piter | piter |
| Site_Iterator associated type; default definition is fwd_piter. | |
| typedef box1d::psite | psite |
| Point_Site associated type. | |
| typedef const T & | rvalue |
| Return type of read-only access. | |
| typedef box1d::site | site |
| Site associated type. | |
| typedef image1d< tag::value_< T > > | skeleton |
| Skeleton. | |
| typedef internal::image_primary< T, mln::box1d, image1d< T > > | super_ |
| typedef mln::value::set< T > | t_eligible_values_set |
| Eligible-value-set associated type. | |
| typedef mln::value::set < typename mln::value::super_value< T > ::ret > | t_values_space |
| Value space associated type. | |
| typedef T | value |
| Value associated type. | |
Public Member Functions | |
| const T & | at_ (def::coord index) const |
Read-only access to the image value located at (index). | |
| T & | at_ (def::coord index) |
Read-write access to the image value located at (index). | |
| const box1d & | bbox () const |
| Give the bounding box domain. | |
| unsigned | border () const |
| Give the border thickness. | |
| const T * | buffer () const |
| Give a hook to the value buffer. | |
| T * | buffer () |
| Give a hook to the value buffer. | |
| int | delta_index (const dpoint1d &dp) const |
Give the offset corresponding to the delta-point dp. | |
| void | destroy () |
| Detach data from an image (free it if nobody else hold it). | |
| const box1d & | domain () const |
| Give the definition domain. | |
| const T & | element (unsigned i) const |
Read-only access to the i-th image value (including the border). | |
| T & | element (unsigned i) |
Read-write access to the i-th image value (including the border). | |
| bool | has (const point1d &p) const |
Test if p is valid. | |
| const util::tracked_ptr < internal::data< image1d< T > > > & | hook_data_ () const |
| Hook to the image data. | |
| const void * | id_ () const |
| Give an identifier of this image. | |
| image1d () | |
| Constructor without argument. | |
| image1d (unsigned ninds, unsigned bdr=border::thickness) | |
| Constructor with the number of indices and the border thickness. | |
| image1d (const box1d &b, unsigned bdr=border::thickness) | |
| Constructor with a box and the border thickness. | |
| unsigned | index_of_point (const P &p) const |
Give the offset of the site p. | |
| void | init_ (const box1d &b, unsigned bdr=border::thickness) |
| Initialize an empty image. | |
| bool | is_valid () const |
| Test if this image has been initialized; default impl. | |
| unsigned | nelements () const |
| Give the number of cells (points including border ones). | |
| unsigned | ninds () const |
| Give the number of indexes. | |
| std::size_t | nsites () const |
| Give the number of sites of the image domain. | |
| T & | operator() (const point1d &p) |
Read-write access to the image value located at point p. | |
| const T & | operator() (const point1d &p) const |
Read-only access to the image value located at point p. | |
| point1d | point_at_index (unsigned i) const |
Give the point corresponding to the offset o. | |
| void | resize_ (unsigned new_border) |
| Resize image border with new_border. | |
| const t_eligible_values_set & | values_eligible () const |
| const t_values_space & | values_space () const |
| Return the value space of the image. | |
Protected Attributes | |
| util::tracked_ptr < internal::data< image1d< T > > > | data_ |
Basic 1D image class.
The parameter T is the type of pixel values. This image class stores data in memory and has a virtual border with constant thickness before and after data.
typedef box1d ::bkd_piter mln::internal::image_base< T, box1d , image1d< T > >::bkd_piter [inherited] |
Backward Site_Iterator associated type.
typedef Image<void> mln::Image< image1d< T > >::category [inherited] |
Reimplemented from mln::Object< image1d< T > >.
typedef box1d mln::internal::image_base< T, box1d , image1d< T > >::domain_t [inherited] |
Site_Set associated type.
typedef image1d< T > mln::Object< image1d< T > >::exact_t [inherited] |
typedef box1d ::fwd_piter mln::internal::image_base< T, box1d , image1d< T > >::fwd_piter [inherited] |
Forward Site_Iterator associated type.
| typedef T& mln::image1d< T >::lvalue |
Return type of read-write access.
typedef fwd_piter mln::internal::image_base< T, box1d , image1d< T > >::piter [inherited] |
Site_Iterator associated type; default definition is fwd_piter.
Point_Site associated type.
| typedef const T& mln::image1d< T >::rvalue |
Return type of read-only access.
Site associated type.
| typedef image1d< tag::value_<T> > mln::image1d< T >::skeleton |
Skeleton.
| typedef internal::image_primary< T, mln::box1d, image1d<T> > mln::image1d< T >::super_ |
typedef mln::value::set<T> mln::internal::image_base< T, box1d , image1d< T > >::t_eligible_values_set [inherited] |
Eligible-value-set associated type.
typedef mln::value::set< typename mln::value::super_value<T>::ret > mln::internal::image_base< T, box1d , image1d< T > >::t_values_space [inherited] |
Value space associated type.
| typedef T mln::image1d< T >::value |
Value associated type.
Reimplemented from mln::internal::image_base< T, box1d, image1d< T > >.
| mln::image1d< T >::image1d | ( | ) | [inline] |
Constructor without argument.
| mln::image1d< T >::image1d | ( | unsigned | ninds, | |
| unsigned | bdr = border::thickness | |||
| ) | [inline] |
Constructor with the number of indices and the border thickness.
References mln::make::box1d(), and mln::image1d< T >::init_().
| mln::image1d< T >::image1d | ( | const box1d & | b, | |
| unsigned | bdr = border::thickness | |||
| ) | [inline] |
Constructor with a box and the border thickness.
References mln::image1d< T >::init_().
| const T & mln::image1d< T >::at_ | ( | def::coord | index | ) | const [inline] |
Read-only access to the image value located at (index).
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::image1d< T >::has().
Referenced by mln::world::binary_2d::projected_histo(), and mln::io::plot::save().
| T & mln::image1d< T >::at_ | ( | def::coord | index | ) | [inline] |
Read-write access to the image value located at (index).
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::image1d< T >::has().
| const box1d & mln::image1d< T >::bbox | ( | ) | const [inline] |
Give the bounding box domain.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
| unsigned mln::image1d< T >::border | ( | ) | const [inline] |
Give the border thickness.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
Referenced by mln::init_().
| const T * mln::image1d< T >::buffer | ( | ) | const [inline] |
Give a hook to the value buffer.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
| T * mln::image1d< T >::buffer | ( | ) | [inline] |
Give a hook to the value buffer.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
| int mln::image1d< T >::delta_index | ( | const dpoint1d & | dp | ) | const [inline] |
Give the offset corresponding to the delta-point dp.
References mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
| void mln::internal::image_base< T, box1d , image1d< T > >::destroy | ( | ) | [inherited] |
Detach data from an image (free it if nobody else hold it).
| const box1d & mln::image1d< T >::domain | ( | ) | const [inline] |
Give the definition domain.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
| T & mln::image1d< T >::element | ( | unsigned | i | ) | [inline] |
Read-write access to the i-th image value (including the border).
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::image1d< T >::nelements().
| const T & mln::image1d< T >::element | ( | unsigned | i | ) | const [inline] |
Read-only access to the i-th image value (including the border).
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::image1d< T >::nelements().
| bool mln::image1d< T >::has | ( | const point1d & | p | ) | const [inline] |
Test if p is valid.
Reimplemented from mln::internal::image_base< T, box1d, image1d< T > >.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
Referenced by mln::image1d< T >::at_(), and mln::image1d< T >::operator()().
| const util::tracked_ptr< internal::data<image1d< T > > >& mln::internal::image_base< T, box1d , image1d< T > >::hook_data_ | ( | ) | const [inherited] |
Hook to the image data.
| const void* mln::internal::image_base< T, box1d , image1d< T > >::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_< image1d< T > , mln::metal::equal< mln_trait_image_speed(image1d< T >), trait::image::speed::fastest >::eval >::index_of_point | ( | const P & | p | ) | const [inherited] |
Give the offset of the site p.
| [in] | p | A site. |
p. | void mln::image1d< T >::init_ | ( | const box1d & | b, | |
| unsigned | bdr = border::thickness | |||
| ) | [inline] |
Initialize an empty image.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
Referenced by mln::convert::over_load::from_to_(), mln::image1d< T >::image1d(), and mln::init_().
| bool mln::internal::image_base< T, box1d , image1d< T > >::is_valid | ( | ) | const [inherited] |
Test if this image has been initialized; default impl.
Referenced by mln::image1d< T >::bbox(), mln::image1d< T >::border(), mln::image1d< T >::buffer(), mln::image1d< T >::delta_index(), mln::image1d< T >::domain(), mln::image1d< T >::has(), mln::image1d< T >::init_(), mln::image1d< T >::nelements(), and mln::image1d< T >::ninds().
| unsigned mln::image1d< T >::nelements | ( | ) | const [inline] |
Give the number of cells (points including border ones).
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
Referenced by mln::image1d< T >::element(), and mln::image1d< T >::point_at_index().
| unsigned mln::image1d< T >::ninds | ( | ) | const [inline] |
Give the number of indexes.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::internal::image_base< T, box1d, image1d< T > >::is_valid().
Referenced by mln::world::binary_2d::projected_histo(), and mln::io::plot::save().
| std::size_t mln::internal::image_base< T, box1d , image1d< T > >::nsites | ( | ) | const [inherited] |
Give the number of sites of the image domain.
| const T & mln::image1d< T >::operator() | ( | const point1d & | p | ) | const [inline] |
Read-only access to the image value located at point p.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::image1d< T >::has().
| T & mln::image1d< T >::operator() | ( | const point1d & | p | ) | [inline] |
Read-write access to the image value located at point p.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::image1d< T >::has().
| point1d mln::image1d< T >::point_at_index | ( | unsigned | i | ) | const [inline] |
Give the point corresponding to the offset o.
References mln::internal::image_base< T, box1d, image1d< T > >::data_, and mln::image1d< T >::nelements().
| void mln::image1d< T >::resize_ | ( | unsigned | new_border | ) | [inline] |
Resize image border with new_border.
References mln::internal::image_base< T, box1d, image1d< T > >::data_.
| const t_eligible_values_set& mln::internal::image_base< T, box1d , image1d< T > >::values_eligible | ( | ) | const [inherited] |
| const t_values_space& mln::internal::image_base< T, box1d , image1d< T > >::values_space | ( | ) | const [inherited] |
Return the value space of the image.
util::tracked_ptr< internal::data<image1d< T > > > mln::internal::image_base< T, box1d , image1d< T > >::data_ [protected, inherited] |
Referenced by mln::image1d< T >::at_(), mln::image1d< T >::bbox(), mln::image1d< T >::border(), mln::image1d< T >::buffer(), mln::image1d< T >::domain(), mln::image1d< T >::element(), mln::image1d< T >::has(), mln::image1d< T >::init_(), mln::image1d< T >::nelements(), mln::image1d< T >::ninds(), mln::image1d< T >::operator()(), mln::image1d< T >::point_at_index(), and mln::image1d< T >::resize_().
1.7.1