Public Types | Public Member Functions | Protected Attributes

mln::image2d_h< V > Struct Template Reference
[Basic types]

2d image based on an hexagonal mesh. More...

#include <image2d_h.hh>

Inheritance diagram for mln::image2d_h< V >:
Inheritance graph

List of all members.

Public Types

typedef hexa_bkd_piter_< box2dbkd_piter
 FIXME : should it be in box2d_h? Backward Site_Iterator associated type.
typedef Image< void > category
typedef image2d< V > delegatee
 Delegatee associated type.
typedef box2d_h domain_t
 Site_Set associated type.
typedef hexa< image2d< V > > exact_t
typedef hexa_fwd_piter_< box2dfwd_piter
 FIXME : should it be in box2d_h? Forward Site_Iterator associated type.
typedef image2d< V >::lvalue lvalue
 Lvalue associated type.
typedef fwd_piter piter
 Site_Iterator associated type; default definition is fwd_piter.
typedef point2d_h psite
 Point site type.
typedef image2d< V >::rvalue rvalue
 Return type of read-only access.
typedef box2d_h::site site
 Site associated type.
typedef hexa< tag::image_
< image2d< V > > > 
skeleton
 Skeleton.
typedef mln::value::set
< image2d< V >::value
t_eligible_values_set
 Eligible-value-set associated type.
typedef mln::value::set
< typename
mln::value::super_value
< image2d< V >::value >::ret
t_values_space
 Value space associated type.
typedef image2d< V > unmorph
 Unmorph image associated type.
typedef image2d< V >::value value
 Value associated type.

Public Member Functions

mln::metal::const_< image2d< V >
>::ret
delegatee_ () const
 Return the delegatee_ pointer; default code.
image2d< V > * delegatee_ ()
 Return the delegatee_ pointer (non-const version); default code.
void destroy ()
 Detach data from an image (free it if nobody else hold it).
const box2d_hdomain () const
 Give the definition domain.
bool has (const psite &p) const
 Test if p belongs to the image domain.
const util::tracked_ptr
< internal::data< hexa
< image2d< V > > > > & 
hook_data_ () const
 Hook to the image data.
const void * id_ () const
 Give an identifier of this image.
 image2d_h (int nrows, int ncols, unsigned bdr=border::thickness)
 Constructor with the numbers of rows and columns border thickness.
unsigned index_of_point (const P &p) const
 Give the offset of the site p.
void init_ (image2d< V > &ima)
 Initialization.
bool is_valid () const
 Test if this image has been initialized; default impl.
std::size_t nsites () const
 Give the number of sites of the image domain.
lvalue operator() (const typename box2d_h::psite &p)
 Read and "write if possible" access of pixel value at point site p.
rvalue operator() (const point2d_h &p) const
 Read-only access of pixel value at hexa point site p.
lvalue operator() (const point2d_h &p)
 Read-write access of pixel value at hexa point site p.
rvalue operator() (const typename box2d_h::psite &p) const
 Read-only access of pixel value at point site p.
hexa< image2d< V > > & rw ()
 State that the morpher is writable.
image2d< V > & unmorph_ ()
 Give the morphed image (mutable version).
mln::metal::const_< image2d< V >
>::ret
unmorph_ () const
 Give the morphed image (const version).
const t_eligible_values_setvalues_eligible () const
const t_values_spacevalues_space () const
 Return the value space of the image.

Protected Attributes

util::tracked_ptr
< internal::data< hexa
< image2d< V > > > > 
data_

Detailed Description

template<typename V>
struct mln::image2d_h< V >

2d image based on an hexagonal mesh.

Definition at line 50 of file image2d_h.hh.


Member Typedef Documentation

typedef hexa_bkd_piter_<box2d> mln::hexa< image2d< V > >::bkd_piter [inherited]

FIXME : should it be in box2d_h? Backward Site_Iterator associated type.

Reimplemented from mln::internal::image_base< image2d< V >::value, box2d_h, hexa< image2d< V > > >.

Definition at line 140 of file hexa.hh.

typedef Image<void> mln::Image< hexa< image2d< V > > >::category [inherited]

Reimplemented from mln::Object< hexa< image2d< V > > >.

Definition at line 75 of file core/concept/image.hh.

typedef image2d< V > mln::internal::image_morpher< image2d< V > , image2d< V >::value , box2d_h , hexa< image2d< V > > >::delegatee [inherited]

Delegatee associated type.

Definition at line 57 of file image_morpher.hh.

typedef box2d_h mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::domain_t [inherited]

Site_Set associated type.

Definition at line 105 of file core/internal/image_base.hh.

typedef hexa< image2d< V > > mln::Object< hexa< image2d< V > > >::exact_t [inherited]

Definition at line 173 of file object.hh.

typedef hexa_fwd_piter_<box2d> mln::hexa< image2d< V > >::fwd_piter [inherited]

FIXME : should it be in box2d_h? Forward Site_Iterator associated type.

Reimplemented from mln::internal::image_base< image2d< V >::value, box2d_h, hexa< image2d< V > > >.

Definition at line 136 of file hexa.hh.

typedef image2d< V > ::lvalue mln::hexa< image2d< V > >::lvalue [inherited]

Lvalue associated type.

Reimplemented from mln::internal::image_domain_morpher< image2d< V >, box2d_h, hexa< image2d< V > > >.

Definition at line 126 of file hexa.hh.

typedef fwd_piter mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::piter [inherited]

Site_Iterator associated type; default definition is fwd_piter.

Definition at line 123 of file core/internal/image_base.hh.

template<typename V >
typedef point2d_h mln::image2d_h< V >::psite

Point site type.

Reimplemented from mln::hexa< image2d< V > >.

Definition at line 56 of file image2d_h.hh.

typedef image2d< V > ::rvalue mln::hexa< image2d< V > >::rvalue [inherited]

Return type of read-only access.

Reimplemented from mln::internal::image_domain_morpher< image2d< V >, box2d_h, hexa< image2d< V > > >.

Definition at line 129 of file hexa.hh.

typedef box2d_h ::site mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::site [inherited]

Site associated type.

Definition at line 111 of file core/internal/image_base.hh.

typedef hexa< tag::image_<image2d< V > > > mln::hexa< image2d< V > >::skeleton [inherited]

Skeleton.

Definition at line 120 of file hexa.hh.

Eligible-value-set associated type.

Definition at line 91 of file core/internal/image_base.hh.

Value space associated type.

Definition at line 98 of file core/internal/image_base.hh.

typedef image2d< V > mln::internal::image_morpher< image2d< V > , image2d< V >::value , box2d_h , hexa< image2d< V > > >::unmorph [inherited]

Unmorph image associated type.

Definition at line 68 of file image_morpher.hh.

typedef image2d< V > ::value mln::hexa< image2d< V > >::value [inherited]

Value associated type.

Reimplemented from mln::internal::image_base< image2d< V >::value, box2d_h, hexa< image2d< V > > >.

Definition at line 123 of file hexa.hh.


Constructor & Destructor Documentation

template<typename V >
mln::image2d_h< V >::image2d_h ( int  nrows,
int  ncols,
unsigned  bdr = border::thickness 
) [inline]

Constructor with the numbers of rows and columns border thickness.

image2d_h(3,6) will build this hexa image :

1 3 5 0 2 4 -------------- 0| x x x | 2| x x x | 4| x x x

Definition at line 82 of file image2d_h.hh.

References mln::hexa< image2d< V > >::init_().


Member Function Documentation

mln::metal::const_< image2d< V > >::ret* mln::internal::image_morpher< image2d< V > , image2d< V >::value , box2d_h , hexa< image2d< V > > >::delegatee_ (  )  const [inherited]

Return the delegatee_ pointer; default code.

image2d< V > * mln::internal::image_morpher< image2d< V > , image2d< V >::value , box2d_h , hexa< image2d< V > > >::delegatee_ (  )  [inherited]

Return the delegatee_ pointer (non-const version); default code.

void mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::destroy (  )  [inherited]

Detach data from an image (free it if nobody else hold it).

const box2d_h& mln::hexa< image2d< V > >::domain (  )  const [inherited]

Give the definition domain.

bool mln::hexa< image2d< V > >::has ( const psite p  )  const [inherited]

Test if p belongs to the image domain.

Reimplemented from mln::internal::image_base< image2d< V >::value, box2d_h, hexa< image2d< V > > >.

const util::tracked_ptr< internal::data<hexa< image2d< V > > > >& mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::hook_data_ (  )  const [inherited]

Hook to the image data.

const void* mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::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_< hexa< image2d< V > > , mln::metal::equal< mln_trait_image_speed(hexa< image2d< V > >), trait::image::speed::fastest >::eval >::index_of_point ( const P &  p  )  const [inherited]

Give the offset of the site p.

Parameters:
[in] p A site.
Warning:
This method is final.
Precondition:
The image has to be initialized and to own the point p.
Postcondition:
p == point_at_index(result)
void mln::hexa< image2d< V > >::init_ ( image2d< V > &  ima  )  [inherited]

Initialization.

Referenced by mln::image2d_h< V >::image2d_h().

bool mln::internal::image_morpher< image2d< V > , image2d< V >::value , box2d_h , hexa< image2d< V > > >::is_valid (  )  const [inherited]

Test if this image has been initialized; default impl.

Reimplemented from mln::internal::image_base< image2d< V >::value, box2d_h, hexa< image2d< V > > >.

std::size_t mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::nsites (  )  const [inherited]

Give the number of sites of the image domain.

rvalue mln::hexa< image2d< V > >::operator() ( const point2d_h p  )  const [inherited]

Read-only access of pixel value at hexa point site p.

lvalue mln::hexa< image2d< V > >::operator() ( const point2d_h p  )  [inherited]

Read-write access of pixel value at hexa point site p.

rvalue mln::internal::image_domain_morpher< image2d< V > , box2d_h , hexa< image2d< V > > >::operator() ( const typename box2d_h ::psite p  )  const [inherited]

Read-only access of pixel value at point site p.

lvalue mln::internal::image_domain_morpher< image2d< V > , box2d_h , hexa< image2d< V > > >::operator() ( const typename box2d_h ::psite p  )  [inherited]

Read and "write if possible" access of pixel value at point site p.

hexa< image2d< V > > & mln::internal::image_morpher< image2d< V > , image2d< V >::value , box2d_h , hexa< image2d< V > > >::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.

mln::metal::const_< image2d< V > >::ret& mln::internal::image_morpher< image2d< V > , image2d< V >::value , box2d_h , hexa< image2d< V > > >::unmorph_ (  )  const [inherited]

Give the morphed image (const version).

image2d< V > & mln::internal::image_morpher< image2d< V > , image2d< V >::value , box2d_h , hexa< image2d< V > > >::unmorph_ (  )  [inherited]

Give the morphed image (mutable version).

const t_eligible_values_set& mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::values_eligible (  )  const [inherited]
const t_values_space& mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::values_space (  )  const [inherited]

Return the value space of the image.


Member Data Documentation

util::tracked_ptr< internal::data<hexa< image2d< V > > > > mln::internal::image_base< image2d< V >::value , box2d_h , hexa< image2d< V > > >::data_ [protected, inherited]

Definition at line 163 of file core/internal/image_base.hh.