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

Image with constant pixel values. More...

#include <ScalarImage.hpp>

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

imaging::ImageInterface< N, DATA_t >

List of all members.

Public Types

typedef DATA_t data_t

Public Member Functions

 ScalarImage (const ublas::fixed_vector< size_t, dimension > &size, data_t value)
 ScalarImage (const ScalarImage< dimension, data_t > &source)
const DATA_t & operator[] (const ublas::fixed_vector< size_t, dimension > &) const
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::ScalarImage< N, DATA_t >

Image with constant pixel values.

This class models images with constant pixel values, i.e. every pixel has the same value. This value is set during construction. The size (in memory) of ScalarImage objects is independent of their size (as an image).


Member Typedef Documentation

template<std::size_t N, class DATA_t>
typedef DATA_t imaging::ScalarImage< N, 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< N, DATA_t >.


Constructor & Destructor Documentation

template<std::size_t N, class DATA_t>
imaging::ScalarImage< N, DATA_t >::ScalarImage ( const ublas::fixed_vector< size_t, dimension > &  size,
data_t  value 
) [inline]

Constructs a scalar image of size size. Each pixel of this image will evaluate to value.

template<std::size_t N, class DATA_t>
imaging::ScalarImage< N, DATA_t >::ScalarImage ( const ScalarImage< dimension, data_t > &  source  )  [inline]

Copy constructor. The complexity of this is function is constant (i.e. independent of the image size).


Member Function Documentation

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

Returns a constant reference to a pixel.

Reimplemented from imaging::ImageInterface< N, DATA_t >.

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

Returns the size of the image.

Reimplemented from imaging::ImageInterface< N, DATA_t >.


Member Data Documentation

template<std::size_t N, class DATA_t>
const std::size_t imaging::ScalarImage< N, DATA_t >::dimension = N [static]

The dimension of the image. It equals 2 for planar images and 3 for voxel-data.

Reimplemented from imaging::ImageInterface< N, DATA_t >.


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