#include <ScalarImage.hpp>
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 |
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).
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 >.
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.
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).
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 >.
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 >.
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 >.