oln::morpher::color_morpher< SrcType, Exact > Struct Template Reference

#include <color_morpher.hh>

Inheritance diagram for oln::morpher::color_morpher< SrcType, Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::morpher::color_morpher< SrcType, Exact >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef image_id< color_morpher<
SrcType, Exact > >::exact_type 
exact_type
 The type of the object instantiated. color_morpher can be derived.
typedef color_morpher< SrcType,
Exact > 
self_type
 The self type.
typedef image_id< exact_type
>::iter_type 
iter_type
 The morpher iterator type.
typedef image_id< exact_type
>::point_type 
point_type
typedef image_id< exact_type
>::value_type 
value_type
typedef super_color_morpher<
SrcType, exact_type
super_type

Public Member Functions

 color_morpher (const SrcType &ima, unsigned n)
 Construct the color_morpher with an image ima and a component n.
 color_morpher (const color_morpher< SrcType, Exact > &r)
 Construct the color_morpher with another color_morpher.
 color_morpher ()
value_typeat (const point_type &p)
const value_type at (const point_type &p) const
self_typeassign (self_type &rhs)

Static Public Member Functions

static std::string name ()

Detailed Description

template<class SrcType, class Exact>
struct oln::morpher::color_morpher< SrcType, Exact >

The default color_morpher class.

Using this class, an rgb image can be viewed according to one of its component.

Parameters:
SrcType Input Type decorated.
Exact Exact type.
See also:
oln::morpher::abstract::generic_morpher

Definition at line 177 of file color_morpher.hh.


Member Typedef Documentation

template<class SrcType, class Exact>
typedef image_id<exact_type>::point_type oln::morpher::color_morpher< SrcType, Exact >::point_type

<Type of the class iterator.

Reimplemented from oln::morpher::abstract::generic_morpher< SrcType, Exact >.

Definition at line 188 of file color_morpher.hh.

template<class SrcType, class Exact>
typedef image_id<exact_type>::value_type oln::morpher::color_morpher< SrcType, Exact >::value_type

<Type of the class point.

Reimplemented from oln::morpher::abstract::generic_morpher< SrcType, Exact >.

Definition at line 190 of file color_morpher.hh.

template<class SrcType, class Exact>
typedef super_color_morpher<SrcType, exact_type> oln::morpher::color_morpher< SrcType, Exact >::super_type

<The value type of the decorated image.

Reimplemented from oln::morpher::super_color_morpher< SrcType, Exact >.

Definition at line 192 of file color_morpher.hh.


Constructor & Destructor Documentation

template<class SrcType, class Exact>
oln::morpher::color_morpher< SrcType, Exact >::color_morpher ( const SrcType &  ima,
unsigned  n 
) [inline]

Construct the color_morpher with an image ima and a component n.

<The upper class.

Definition at line 196 of file color_morpher.hh.

00196                                                     : super_type(ima, n)
00197       {}

template<class SrcType, class Exact>
oln::morpher::color_morpher< SrcType, Exact >::color_morpher (  )  [inline]

Empty constructor.

Needed by mlc_hierarchy::any_with_diamond.

Definition at line 207 of file color_morpher.hh.

00208       {}


Member Function Documentation

template<class SrcType, class Exact>
value_type& oln::morpher::color_morpher< SrcType, Exact >::at ( const point_type p  )  [inline]

Return a reference to the n_th component of the rgb value stored at p.

Warning:
This method should not be used directly. Prefer operator[].

Definition at line 217 of file color_morpher.hh.

00218       {
00219         return const_cast<SrcType &>(this->ima_)[p][this->n_];
00220       }

template<class SrcType, class Exact>
const value_type oln::morpher::color_morpher< SrcType, Exact >::at ( const point_type p  )  const [inline]

Return the n_th component of the rgb value stored at p.

Warning:
This method should not be used directly. Prefer operator[].

Definition at line 228 of file color_morpher.hh.

00229       {
00230         return this->ima_[p][this->n_];
00231       }

template<class SrcType, class Exact>
self_type& oln::morpher::color_morpher< SrcType, Exact >::assign ( self_type rhs  )  [inline]

Perform a shallow copy from the decorated image of rhs to the current decorated image. The points will be shared by the two images.

Definition at line 238 of file color_morpher.hh.

00239       {
00240         oln_iter_type(SrcType)  it(rhs);
00241 
00242         for_all(it)
00243           this->at(it) = rhs[it];
00244         return this->exact();
00245       }


The documentation for this struct was generated from the following file:
Generated on Tue Feb 20 20:28:03 2007 for Olena by  doxygen 1.5.1