imaging::ImageAccessorInterface< image_t, DATA_t > Class Template Reference
[Image Module]

Abstract base class of all image accessor classes. More...

#include <ImageAccessorInterface.hpp>

Inheritance diagram for imaging::ImageAccessorInterface< image_t, DATA_t >:

imaging::ImageInterface< image_t::dimension, DATA_t > imaging::CastAccessor< image_t, DATA_t > imaging::ScalingAccessor< float_accessor_t >

List of all members.

Public Types

typedef DATA_t data_t

Public Member Functions

 ImageAccessorInterface (image_t &image)
const ublas::fixed_vector
< size_t, dimension > & 
size () const
bool empty () const

Static Public Attributes

static const size_t dimension = image_t::dimension

Protected Attributes

image_t & _image_reference
 Reference to the image object interfaced by this object.


Detailed Description

template<class image_t, class DATA_t>
class imaging::ImageAccessorInterface< image_t, DATA_t >

Abstract base class of all image accessor classes.

This class defines an interface for image accessor classes. These are classes which provide layered access to objects which implement ImageInterface. E.g. such a class might convert values of a colour image to grayscale and back again in a transparent fashion when its pixel accessor functions (i.e. operator[]) are called. Similar tasks include rescaling image values or selecting channels in vector valued data.

Note that objects implementing this interface must also implement ImageInterface.

If you want to construct an accessor from constant images, it is necessary that the ImageAccessorInterface template is instantiated for the const image data type:

  const GrayImage2d image;
  
  CastAccessor<const GrayImage2d, float_t> image_accessor;  // works fine
  CastAccessor<GrayImage2d, float_t> image_accessor; // will not compile!

See also:
CastAccessor, ScalingAccessor, VectorComponentAccessor

Member Typedef Documentation

template<class image_t, class DATA_t>
typedef DATA_t imaging::ImageAccessorInterface< image_t, DATA_t >::data_t

The data type which is stored in the image. Common choices are float_t for grayscale images stored at floating point precision or char for 8-bit data.

Reimplemented from imaging::ImageInterface< image_t::dimension, DATA_t >.

Reimplemented in imaging::CastAccessor< image_t, DATA_t >, imaging::ScalingAccessor< float_accessor_t >, and imaging::VectorComponentAccessor< vector_image_t >.


Constructor & Destructor Documentation

template<class image_t, class DATA_t>
imaging::ImageAccessorInterface< image_t, DATA_t >::ImageAccessorInterface ( image_t &  image  )  [inline]

Initialize the image accessor with an reference to image. By image_t we mean any type, which implements ImageInterface, i.e. image may itself be an image accessor. This reference will be stored and accessed when the image accessor is utilized. The dimensions of the accessor are the same as those of image.


Member Function Documentation

template<class image_t, class DATA_t>
const ublas::fixed_vector<size_t, dimension>& imaging::ImageAccessorInterface< image_t, DATA_t >::size (  )  const [inline]

template<class image_t, class DATA_t>
bool imaging::ImageAccessorInterface< image_t, DATA_t >::empty (  )  const [inline]

Returns true if the image is empty, i.e. if at least on of its dimensions is zero.


Member Data Documentation

template<class image_t, class DATA_t>
const size_t imaging::ImageAccessorInterface< image_t, DATA_t >::dimension = image_t::dimension [static]


The documentation for this class was generated from the following file:

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5