Public Types | Public Member Functions | Protected Attributes

mln::tr_image< S, I, T > Struct Template Reference
[Identity morphers]

Transform an image by a given transformation. More...

#include <tr_image.hh>

Inheritance diagram for mln::tr_image< S, I, T >:
Inheritance graph

List of all members.

Public Types

enum  { dim_ = site::dim }
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 tr_image< S, I, T > exact_t
typedef S::fwd_piter fwd_piter
 Forward Site_Iterator associated type.
typedef I::value lvalue
 Return type of read-write access.
typedef fwd_piter piter
 Site_Iterator associated type; default definition is fwd_piter.
typedef I::psite psite
 Point_Site associated type.
typedef I::value rvalue
 Return type of read-only access.
typedef I::site site
 Site associated type.
typedef tr_image< S,
tag::image_< I >, T > 
skeleton
 Skeleton.
typedef
mln::internal::image_identity
< I, S, tr_image< S, I, T > > 
super_
 Super 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.
typedef mln::algebra::vec
< dim_, float > 
vec_t

Public Member Functions

mln::metal::const_< I >::retdelegatee_ () const
 Return the delegatee_ pointer; default code.
I * 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 S & domain () const
 Return the domain morpher.
bool has (const vec_t &v) const
 Test if a pixel value is accessible at v.
bool has (const typename I::psite &p) const
bool has (const psite &p) const
 Test if p belongs to the image domain.
const util::tracked_ptr
< internal::data< tr_image< S,
I, T > > > & 
hook_data_ () const
 Hook to the image data.
const void * id_ () const
 Give an identifier of this image.
unsigned index_of_point (const P &p) const
 Give the offset of the site p.
void init_ (const S &s, const I &ima, const T &tr)
 Initialize an empty image.
bool is_valid () const
 Test if this image has been initialized.
std::size_t nsites () const
 Give the number of sites of the image domain.
I::value operator() (const psite &p)
lvalue operator() (const typename S::psite &p)
 Read-write access of pixel value at point site p.
I::value operator() (const psite &p) const
 Read-only 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.
tr_image< S, I, T > & rw ()
 State that the morpher is writable.
void set_tr (T &tr)
 Set the transformation.
const T & tr () const
 Return the underlying transformation.
 tr_image ()
 tr_image (const S &s, const I &ima, const T &tr)
 Constructors.
mln::metal::const_< I >::retunmorph_ () const
 Give the morphed image (const version).
I & unmorph_ ()
 Give the morphed image (mutable 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< tr_image< S,
I, T > > > 
data_

Detailed Description

template<typename S, typename I, typename T>
struct mln::tr_image< S, I, T >

Transform an image by a given transformation.

Definition at line 83 of file tr_image.hh.


Member Typedef Documentation

typedef S ::bkd_piter mln::internal::image_base< I::value , S, tr_image< S, I, T > >::bkd_piter [inherited]

Backward Site_Iterator associated type.

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

typedef Image<void> mln::Image< tr_image< S, I, T > >::category [inherited]

Reimplemented from mln::Object< tr_image< S, I, T > >.

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

typedef I mln::internal::image_morpher< I, I::value , S, tr_image< S, I, T > >::delegatee [inherited]

Delegatee associated type.

Definition at line 57 of file image_morpher.hh.

typedef S mln::internal::image_base< I::value , S, tr_image< S, I, T > >::domain_t [inherited]

Site_Set associated type.

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

typedef tr_image< S, I, T > mln::Object< tr_image< S, I, T > >::exact_t [inherited]

Definition at line 173 of file object.hh.

typedef S ::fwd_piter mln::internal::image_base< I::value , S, tr_image< S, I, T > >::fwd_piter [inherited]

Forward Site_Iterator associated type.

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

template<typename S, typename I, typename T>
typedef I ::value mln::tr_image< S, I, T >::lvalue

Return type of read-write access.

Reimplemented from mln::internal::image_identity< I, S, tr_image< S, I, T > >.

Definition at line 101 of file tr_image.hh.

typedef fwd_piter mln::internal::image_base< I::value , S, tr_image< S, I, T > >::piter [inherited]

Site_Iterator associated type; default definition is fwd_piter.

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

template<typename S, typename I, typename T>
typedef I ::psite mln::tr_image< S, I, T >::psite

Point_Site associated type.

Reimplemented from mln::internal::image_base< I::value, S, tr_image< S, I, T > >.

Definition at line 92 of file tr_image.hh.

template<typename S, typename I, typename T>
typedef I ::value mln::tr_image< S, I, T >::rvalue

Return type of read-only access.

Reimplemented from mln::internal::image_identity< I, S, tr_image< S, I, T > >.

Definition at line 104 of file tr_image.hh.

template<typename S, typename I, typename T>
typedef I ::site mln::tr_image< S, I, T >::site

Site associated type.

Reimplemented from mln::internal::image_base< I::value, S, tr_image< S, I, T > >.

Definition at line 95 of file tr_image.hh.

template<typename S, typename I, typename T>
typedef tr_image< S, tag::image_<I>, T> mln::tr_image< S, I, T >::skeleton

Skeleton.

Definition at line 107 of file tr_image.hh.

template<typename S, typename I, typename T>
typedef mln::internal::image_identity< I, S, tr_image<S,I,T> > mln::tr_image< S, I, T >::super_

Super type.

Definition at line 89 of file tr_image.hh.

typedef mln::value::set<I::value > mln::internal::image_base< I::value , S, tr_image< S, I, T > >::t_eligible_values_set [inherited]

Eligible-value-set associated type.

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

typedef mln::value::set< typename mln::value::super_value<I::value >::ret > mln::internal::image_base< I::value , S, tr_image< S, I, T > >::t_values_space [inherited]

Value space associated type.

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

typedef I mln::internal::image_morpher< I, I::value , S, tr_image< S, I, T > >::unmorph [inherited]

Unmorph image associated type.

Definition at line 68 of file image_morpher.hh.

template<typename S, typename I, typename T>
typedef I ::value mln::tr_image< S, I, T >::value

Value associated type.

Reimplemented from mln::internal::image_identity< I, S, tr_image< S, I, T > >.

Definition at line 98 of file tr_image.hh.

template<typename S, typename I, typename T>
typedef mln::algebra::vec<dim_, float> mln::tr_image< S, I, T >::vec_t

Definition at line 130 of file tr_image.hh.


Member Enumeration Documentation

template<typename S, typename I, typename T>
anonymous enum
Enumerator:
dim_ 

Definition at line 129 of file tr_image.hh.


Constructor & Destructor Documentation

template<typename S , typename I , typename T >
mln::tr_image< S, I, T >::tr_image ( const S &  s,
const I &  ima,
const T &  tr 
) [inline]

Constructors.

Definition at line 174 of file tr_image.hh.

References mln::tr_image< S, I, T >::init_().

template<typename S, typename I, typename T>
mln::tr_image< S, I, T >::tr_image (  ) 

Member Function Documentation

mln::metal::const_< I >::ret* mln::internal::image_morpher< I, I::value , S, tr_image< S, I, T > >::delegatee_ (  )  const [inherited]

Return the delegatee_ pointer; default code.

Referenced by mln::tr_image< S, I, T >::has(), and mln::tr_image< S, I, T >::is_valid().

I* mln::internal::image_morpher< I, I::value , S, tr_image< S, I, T > >::delegatee_ (  )  [inherited]

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

void mln::internal::image_base< I::value , S, tr_image< S, I, T > >::destroy (  )  [inherited]

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

template<typename S , typename I , typename T >
const S & mln::tr_image< S, I, T >::domain (  )  const [inline]
template<typename S , typename I , typename T >
bool mln::tr_image< S, I, T >::has ( const vec_t v  )  const [inline]
bool mln::internal::image_identity< I, S, tr_image< S, I, T > >::has ( const typename I::psite &  p  )  const [inherited]
bool mln::internal::image_base< I::value , S, tr_image< S, I, T > >::has ( const psite p  )  const [inherited]

Test if p belongs to the image domain.

const util::tracked_ptr< internal::data<tr_image< S, I, T > > >& mln::internal::image_base< I::value , S, tr_image< S, I, T > >::hook_data_ (  )  const [inherited]

Hook to the image data.

const void* mln::internal::image_base< I::value , S, tr_image< S, I, 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_< tr_image< S, I, T > , mln::metal::equal< mln_trait_image_speed(tr_image< S, I, T >), 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)
template<typename S , typename I , typename T >
void mln::tr_image< S, I, T >::init_ ( const S &  s,
const I &  ima,
const T &  tr 
) [inline]

Initialize an empty image.

Definition at line 182 of file tr_image.hh.

References mln::internal::image_base< I::value, S, tr_image< S, I, T > >::data_.

Referenced by mln::tr_image< S, I, T >::tr_image().

template<typename S , typename I , typename T >
bool mln::tr_image< S, I, T >::is_valid (  )  const [inline]
std::size_t mln::internal::image_base< I::value , S, tr_image< S, I, T > >::nsites (  )  const [inherited]

Give the number of sites of the image domain.

template<typename S , typename I , typename T >
I::value mln::tr_image< S, I, T >::operator() ( const psite p  )  const [inline]

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

Mutable access is only OK for reading (not writing).

Definition at line 213 of file tr_image.hh.

rvalue mln::internal::image_identity< I, S, tr_image< S, I, T > >::operator() ( const typename S::psite &  p  )  const [inherited]

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

lvalue mln::internal::image_identity< I, S, tr_image< S, I, T > >::operator() ( const typename S::psite &  p  )  [inherited]

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

template<typename S , typename I , typename T >
I::value mln::tr_image< S, I, T >::operator() ( const psite p  )  [inline]

Definition at line 222 of file tr_image.hh.

tr_image< S, I, T > & mln::internal::image_morpher< I, I::value , S, tr_image< S, I, T > >::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.

template<typename S , typename I , typename T >
void mln::tr_image< S, I, T >::set_tr ( T &  tr  )  [inline]

Set the transformation.

Definition at line 231 of file tr_image.hh.

References mln::internal::image_base< I::value, S, tr_image< S, I, T > >::data_.

template<typename S , typename I , typename T >
const T & mln::tr_image< S, I, T >::tr (  )  const [inline]

Return the underlying transformation.

Definition at line 239 of file tr_image.hh.

References mln::internal::image_base< I::value, S, tr_image< S, I, T > >::data_.

mln::metal::const_< I >::ret& mln::internal::image_morpher< I, I::value , S, tr_image< S, I, T > >::unmorph_ (  )  const [inherited]

Give the morphed image (const version).

I& mln::internal::image_morpher< I, I::value , S, tr_image< S, I, T > >::unmorph_ (  )  [inherited]

Give the morphed image (mutable version).

const t_eligible_values_set& mln::internal::image_base< I::value , S, tr_image< S, I, T > >::values_eligible (  )  const [inherited]
const t_values_space& mln::internal::image_base< I::value , S, tr_image< S, I, T > >::values_space (  )  const [inherited]

Return the value space of the image.


Member Data Documentation

util::tracked_ptr< internal::data<tr_image< S, I, T > > > mln::internal::image_base< I::value , S, tr_image< S, I, T > >::data_ [protected, inherited]