imaging::ImageInterface< N, DATA_t > Class Template Reference
[Image Module]

Abstract base class of all classes modelling image data. More...

#include <ImageInterface.hpp>

Inheritance diagram for imaging::ImageInterface< N, DATA_t >:

imaging::Image< N, DATA_t > imaging::ScalarImage< N, DATA_t >

List of all members.

Public Types

typedef DATA_t data_t

Public Member Functions

const DATA_t & operator[] (const ublas::fixed_vector< size_t, dimension > &index) const
DATA_t & operator[] (const ublas::fixed_vector< size_t, dimension > &index)
const ublas::fixed_vector
< size_t, dimension > & 
size () const

Static Public Attributes

static const std::size_t dimension = N


Detailed Description

template<std::size_t N, class DATA_t>
class imaging::ImageInterface< N, DATA_t >

Abstract base class of all classes modelling image data.

This class defines an interface which should be implemented by classes for image data. By image data we mean an N-dimensional array. The data DATA_t stored in the array is arbitrary but must be the same for each entry in the array. The range of valid indices for entries of the array is fixed upon construction of the array (although derived classes, such as Image, may proved functions to resize images) and can be obtained by calling size(). I.e. range of valid entries for the i-th component of an image runs from 0 to size()(i) - 1. Note that the operator [] is always used the same way to access pixels, independent of the image dimensions. This is demonstrated in the following example:

  // float_image_2d implements ImageInterface<2, float_t>
  // graysc_image_3d implements ImageInterface<3, unsigned char>
  
  float_image_2d[ublas::fixed_vector<size_t, 2>(0, 1)] = 0.5;
  graysc_image_3d[ublas::fixed_vector<size_t, 3>(0, 1, 1)] = 128;

Member Typedef Documentation

template<std::size_t N, class DATA_t>
typedef DATA_t imaging::ImageInterface< N, DATA_t >::data_t


Member Function Documentation

template<std::size_t N, class DATA_t>
const DATA_t& imaging::ImageInterface< N, DATA_t >::operator[] ( const ublas::fixed_vector< size_t, dimension > &  index  )  const

template<std::size_t N, class DATA_t>
DATA_t& imaging::ImageInterface< N, DATA_t >::operator[] ( const ublas::fixed_vector< size_t, dimension > &  index  ) 

template<std::size_t N, class DATA_t>
const ublas::fixed_vector<size_t, dimension>& imaging::ImageInterface< N, DATA_t >::size (  )  const


Member Data Documentation

template<std::size_t N, class DATA_t>
const std::size_t imaging::ImageInterface< N, DATA_t >::dimension = N [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