MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
mds::img::CImage< T, Allocator > Class Template Reference

Class template representing 2D image data. More...

#include <mdsImage.h>

Inheritance diagram for mds::img::CImage< T, Allocator >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { CLASS_IMAGE }
 Templates that require members of the CImage class may use this enum to check the existence. More...
enum  { CLASS_SERIALIZABLE }
 Templates that require members of the CSerializable class may use this enum to check the existence. More...
enum  { VERSION = 0x33 }
 Current serialization interface version. More...
enum  { MAX_NAME_LENGTH = 32 }
 Maximal length of a data entity name in characters. More...
enum  { CLASS_OBJECT }
 Templates that require members of the CObject class can use this enum to check the existence. More...
enum  { HEAP_OBJECT = 0x70616568 }
 Signature used to recognize objects on the heap. More...
typedef CImageBase< CImage< T,
Allocator > > 
tBase
 Base class.
typedef Allocator< T > tDataStorage
 Image data storage type.
typedef CImage< T, Allocator > tImage
 Image type.
typedef T tPixel
 Image pixel type.
typedef CRect< CImagetRect
 View of the image (i.e. rectangle).
typedef CImageRow< CImagetRow
 Image row (the x coordinate is varying while the y is fixed).

Public Member Functions

CImageabs ()
 Absolute value of all pixels.
T & at (tSize x, tSize y)
 Returns reference to the pixel [x][y].
const T & at (tSize x, tSize y) const
T & at (tSize i)
 Returns the subscripted pixel.
const T & at (tSize i) const
bool checkPosition (tSize x, tSize y) const
 Checks the pixel position.
 CImage ()
 Declare iterator types tIterator and tConstIterator.
 CImage (tSize XSize, tSize YSize, tSize Margin=0)
 Constructor.
 CImage (const CSize2i &Size, tSize Margin=0)
 Constructor.
 CImage (const CImage &Image, tSize x, tSize y, tSize XSize, tSize YSize)
 Constructor.
 CImage (const CImage &Image, tSize x, tSize y, tSize XSize, tSize YSize, EMakeRef)
 Constructor.
 CImage (const tRect &Image)
 Constructor.
 CImage (const tRect &Image, EMakeRef)
 Constructor.
 CImage (const CImage &Image)
 Copy constructor.
 CImage (const CImage &Image, EMakeRef)
 Copy constructor.
color2Pixel (CColor color) const
 Converts a specified color to the image pixel format and range.
template<typename Derived >
CImageconvert (const CImageBase< Derived > &Image)
 Conversion of images of different types.
template<typename Derived >
CImage< T, A > & convert (const CImageBase< Derived > &Image)
CImagecreate (tSize XSize, tSize YSize, tSize Margin=0)
 Resizes the image.
CImagecreate (const CSize2i &Size, tSize Margin=0)
 Resizes the image data.
CImagecreate (const CImage &Image, tSize x, tSize y, tSize XSize, tSize YSize)
 Creates subimage of a given image.
CImagecreate (const CImage &Image, tSize x, tSize y, tSize XSize, tSize YSize, EMakeRef)
 Creates subimage of a given image.
CImagecreate (const tRect &Image)
 Creates copy of a given image rectangle.
CImagecreate (const tRect &Image, EMakeRef)
 Creates reference to a given image rectangle.
CImagecreate (const CImage &Image)
 Creates copy of an image.
CImagecreate (const CImage &Image, EMakeRef)
 Creates reference to an image.
CImagecut (const T &Lower, const T &Upper)
 Cuts range of pixel values.
template<class S >
void deserialize (mds::mod::CChannelSerializer< S > &Reader)
 Deserializes all class members.
template<class S >
void deserialize (mds::mod::CChannelSerializer< S > &Reader)
CImagefill (const T &c)
 Fills the image using a given pixel value.
CImagefillEntire (const T &c)
 Fills the entire image including its margin using a given pixel value.
CImagefillMargin (const T &c)
 Pads the image margin with constant value.
template<class Function >
Function forEach (Function Func)
 Calls function object for every image pixel.
template<class Function >
Function forEach (Function Func) const
 Calls function object for every image pixel.
template<class Function >
Function forEach (Function Func)
 Calls a function object for every image pixel.
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every image pixel.
tSize getIdx (tSize x, tSize y) const
 Calculates index of a specified pixel.
tImagegetImpl ()
 Returns reference to the image implementation.
const tImagegetImpl () const
tSize getMargin () const
 Returns the image margin size in pixels.
T * getPtr ()
 Returns pointer to the image data.
const T * getPtr () const
T * getPtr (tSize x, tSize y)
 Returns pointer to the given pixel.
const T * getPtr (tSize x, tSize y) const
int getReferencesCount () const
 Returns the number of references.
T * getRowPtr (tSize y)
 Returns pointer to the first element of the image row.
const T * getRowPtr (tSize y) const
CSize2igetSize ()
 Returns size of the rectangle.
const CSize2igetSize () const
tSize getXOffset () const
 Returns column offset in x-axis.
tSize getXSize () const
 Returns the image size (dimensions).
tSize getYOffset () const
 Returns row offset in y-axis.
tSize getYSize () const
tSize height () const
interpolate (const CPoint3D &Point) const
 Bilinear subpixel value interpolation.
bool isOnHeap () const
 Returns true if the object is allocated on the heap.
CImagelimit (const T &Lower, const T &Upper)
 Clips a range of pixel values.
 MDS_SHAREDPTR (CImage)
 Declare smart pointer type tSmartPtr.
CImagemirrorMargin ()
 Pads the image margin using a simple mirroring.
T & operator() (tSize x, tSize y)
 Returns reference to the subscripted pixel [x][y].
const T & operator() (tSize x, tSize y) const
T & operator() (tSize i)
 Returns the subscripted pixel.
const T & operator() (tSize i) const
template<class Derived >
CImageoperator*= (const CImageBase< Derived > &Image)
 Pixel wise product.
template<typename U >
CImageoperator*= (const CScalar< U > &c)
 Multiplies all pixels by scalar.
template<class Derived >
CImage< T, A > & operator*= (const CImageBase< Derived > &Image)
template<typename U >
CImage< T, A > & operator*= (const CScalar< U > &c)
template<class Derived >
CImageoperator+= (const CImageBase< Derived > &Image)
 Pixel wise addition.
template<class U >
CImageoperator+= (const CScalar< U > &c)
 Adds scalar to all pixels.
template<class Derived >
CImage< T, A > & operator+= (const CImageBase< Derived > &Image)
template<typename U >
CImage< T, A > & operator+= (const CScalar< U > &c)
template<class Derived >
CImageoperator-= (const CImageBase< Derived > &Image)
 Pixel wise subtraction.
template<typename U >
CImageoperator-= (const CScalar< U > &c)
 Subtracts scalar from all pixels.
template<class Derived >
CImage< T, A > & operator-= (const CImageBase< Derived > &Image)
template<typename U >
CImage< T, A > & operator-= (const CScalar< U > &c)
template<class Derived >
CImageoperator/= (const CImageBase< Derived > &Image)
 Pixel wise division.
template<typename U >
CImageoperator/= (const CScalar< U > &c)
 Divides all pixels by scalar.
template<class Derived >
CImage< T, A > & operator/= (const CImageBase< Derived > &Image)
template<typename U >
CImage< T, A > & operator/= (const CScalar< U > &c)
CImageoperator= (const CImage &Image)
 Assignment operator.
template<class Function >
Function pforEach (Function Func)
 Calls function object for every image pixel.
template<class Function >
Function pforEach (Function Func) const
 Calls function object for every image pixel.
template<class Function >
Function pforEach (Function Func)
 Calls a function object for every image pixel.
template<class Function >
Function pforEach (Function Func) const
 Calls a function object for every image pixel.
tRect rect (const CPoint2i &Position, const CSize2i &Size)
 Returns a specified sub-image (i.e. rectangle).
const tRect rect (const CPoint2i &Position, const CSize2i &Size) const
tRect rect (const CRange &XRange, const CRange &YRange)
 Returns a specified sub-image (i.e. rectangle).
const tRect rect (const CRange &XRange, const CRange &YRange) const
CImagereplace (const T &Value, const T &NewValue)
 Replaces all pixels of a given value by a specified value.
tRow row (tSize y)
 Returns a specified row.
const tRow row (tSize y) const
template<class S >
void serialize (mds::mod::CChannelSerializer< S > &Writer)
 Serializes all class members.
template<class S >
void serialize (mds::mod::CChannelSerializer< S > &Writer)
tImageset (tSize x, tSize y, const tPixel &Value)
 Sets the pixel at the position [x][y][z].
tImageset (tSize i, const tPixel &Value)
 Sets the subscripted pixel.
CImageset (tSize x, tSize y, const T &Value)
 Sets the pixel at the position [x][y].
CImageset (tSize i, const T &Value)
 Sets the subscripted voxel.
CImagesubSample (const CImage &Image, tSize k=2, tSize l=2)
 Subsamples a given image and stores the result.
tSize width () const
 Returns the image size (dimensions).
virtual ~CImage ()
 Destructor.

Static Public Member Functions

static int getBlockSize ()
 Default block size.
static int getCompression ()
 Default compression method.
static const char * getName ()
 Default class name.
static void * operator new (std::size_t Size)
 Allocates a new object on the heap.

Protected Member Functions

void addReference () const
 Increase the reference counter.
bool delReference () const
 Decrease the reference counter.

Protected Attributes

tDataStorage m_DataStorage
 Image data.
int m_iHeapObject
 Flag initialized if the object is on the heap.
int m_iReferences
 The number of references to the object.
tSize m_Margin
 Image margin size.
CSize2i m_Size
 Image dimensions.
tSize m_YOffset
 Offset used by subscripting functions.
tSize m_ZeroOffset
 Offset of the first pixel (0,0) from the beginning of data.

Detailed Description

template<typename T, template< typename > class Allocator = mds::base::CRefData>
class mds::img::CImage< T, Allocator >

Class template representing 2D image data.


Member Typedef Documentation

template<typename T , template< typename > class Allocator = mds::base::CRefData>
typedef CImageBase<CImage<T, Allocator> > mds::img::CImage< T, Allocator >::tBase

Base class.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
typedef Allocator<T> mds::img::CImage< T, Allocator >::tDataStorage

Image data storage type.

typedef CImage< T, Allocator > mds::img::CImageBase< CImage< T, Allocator > >::tImage [inherited]

Image type.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
typedef T mds::img::CImage< T, Allocator >::tPixel

Image pixel type.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
typedef CRect<CImage> mds::img::CImage< T, Allocator >::tRect

View of the image (i.e. rectangle).

template<typename T , template< typename > class Allocator = mds::base::CRefData>
typedef CImageRow<CImage> mds::img::CImage< T, Allocator >::tRow

Image row (the x coordinate is varying while the y is fixed).


Member Enumeration Documentation

template<typename T , template< typename > class Allocator = mds::base::CRefData>
anonymous enum

Templates that require members of the CImage class may use this enum to check the existence.

Enumerator:
CLASS_IMAGE 
anonymous enum [inherited]

Templates that require members of the CSerializable class may use this enum to check the existence.

Enumerator:
CLASS_SERIALIZABLE 
anonymous enum [inherited]

Current serialization interface version.

Enumerator:
VERSION 
anonymous enum [inherited]

Maximal length of a data entity name in characters.

Enumerator:
MAX_NAME_LENGTH 
anonymous enum [inherited]

Templates that require members of the CObject class can use this enum to check the existence.

Enumerator:
CLASS_OBJECT 
anonymous enum [inherited]

Signature used to recognize objects on the heap.

Enumerator:
HEAP_OBJECT 

Constructor & Destructor Documentation

template<typename T , template< typename > class A>
CImage::CImage ( )

Declare iterator types tIterator and tConstIterator.

Standard method getEntityCompression(). Default constructor creates image of zero size.

template<typename T , template< typename > class A>
mds::img::CImage< T, A >::CImage ( tSize  XSize,
tSize  YSize,
tSize  Margin = 0 
)

Constructor.

template<typename T , template< typename > class A>
mds::img::CImage< T, A >::CImage ( const CSize2i Size,
tSize  Margin = 0 
)

Constructor.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
mds::img::CImage< T, Allocator >::CImage ( const CImage< T, Allocator > &  Image,
tSize  x,
tSize  y,
tSize  XSize,
tSize  YSize 
)

Constructor.

  • Creates a subimage of a given image.
  • Makes own copy of the data.
template<typename T , template< typename > class Allocator = mds::base::CRefData>
mds::img::CImage< T, Allocator >::CImage ( const CImage< T, Allocator > &  Image,
tSize  x,
tSize  y,
tSize  XSize,
tSize  YSize,
EMakeRef   
)

Constructor.

  • Creates a subimage of a given image.
  • Makes only reference to the data.
template<typename T , template< typename > class A>
CImage::CImage ( const tRect Image)

Constructor.

  • Makes own copy of the data.
template<typename T , template< typename > class A>
CImage::CImage ( const tRect Image,
EMakeRef   
)

Constructor.

  • Makes only a reference to the data.
template<typename T , template< typename > class Allocator = mds::base::CRefData>
mds::img::CImage< T, Allocator >::CImage ( const CImage< T, Allocator > &  Image)

Copy constructor.

  • Makes own copy of the data.
template<typename T , template< typename > class Allocator = mds::base::CRefData>
mds::img::CImage< T, Allocator >::CImage ( const CImage< T, Allocator > &  Image,
EMakeRef   
)

Copy constructor.

  • Only reference to the original data.
template<typename T , template< typename > class A>
CImage::~CImage ( ) [virtual]

Destructor.


Member Function Documentation

template<typename T , template< typename > class A>
CImage< T, A > & CImage::abs ( )

Absolute value of all pixels.

  • Returns reference to this.
void mds::base::CObject::addReference ( ) const [protected, inherited]

Increase the reference counter.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
T& mds::img::CImage< T, Allocator >::at ( tSize  x,
tSize  y 
)

Returns reference to the pixel [x][y].

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
const T& mds::img::CImage< T, Allocator >::at ( tSize  x,
tSize  y 
) const
template<typename T , template< typename > class Allocator = mds::base::CRefData>
T& mds::img::CImage< T, Allocator >::at ( tSize  i)

Returns the subscripted pixel.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
const T& mds::img::CImage< T, Allocator >::at ( tSize  i) const
template<typename T , template< typename > class A>
bool CImage::checkPosition ( tSize  x,
tSize  y 
) const

Checks the pixel position.

  • Returns 'true' if a specified position is satisfactory.
template<typename T , template< typename > class A>
T CImage::color2Pixel ( CColor  color) const

Converts a specified color to the image pixel format and range.

template<typename T , template< typename > class A>
template<typename Derived >
CImage< T, A > & mds::img::CImage< T, A >::convert ( const CImageBase< Derived > &  Image)

Conversion of images of different types.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<typename Derived >
CImage<T,A>& mds::img::CImage< T, Allocator >::convert ( const CImageBase< Derived > &  Image)
template<typename T , template< typename > class A>
CImage< T, A > & mds::img::CImage< T, A >::create ( tSize  XSize,
tSize  YSize,
tSize  Margin = 0 
)

Resizes the image.

Reimplemented in mds::img::CSlice.

template<typename T , template< typename > class A>
CImage< T, A > & mds::img::CImage< T, A >::create ( const CSize2i Size,
tSize  Margin = 0 
)

Resizes the image data.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
CImage& mds::img::CImage< T, Allocator >::create ( const CImage< T, Allocator > &  Image,
tSize  x,
tSize  y,
tSize  XSize,
tSize  YSize 
)

Creates subimage of a given image.

  • Makes own copy of the data.
template<typename T , template< typename > class Allocator = mds::base::CRefData>
CImage& mds::img::CImage< T, Allocator >::create ( const CImage< T, Allocator > &  Image,
tSize  x,
tSize  y,
tSize  XSize,
tSize  YSize,
EMakeRef   
)

Creates subimage of a given image.

  • Makes only reference to the data.
template<typename T , template< typename > class A>
CImage< T, A > & CImage::create ( const tRect Image)

Creates copy of a given image rectangle.

  • Makes own copy of the data.
template<typename T , template< typename > class A>
CImage< T, A > & CImage::create ( const tRect Image,
EMakeRef   
)

Creates reference to a given image rectangle.

  • Makes only a reference to the data.
template<typename T , template< typename > class Allocator = mds::base::CRefData>
CImage& mds::img::CImage< T, Allocator >::create ( const CImage< T, Allocator > &  Image)

Creates copy of an image.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
CImage& mds::img::CImage< T, Allocator >::create ( const CImage< T, Allocator > &  Image,
EMakeRef   
)

Creates reference to an image.

template<typename T , template< typename > class A>
CImage< T, A > & CImage::cut ( const T &  Lower,
const T &  Upper 
)

Cuts range of pixel values.

  • Returns reference to this.
bool mds::base::CObject::delReference ( ) const [protected, inherited]

Decrease the reference counter.

  • Returns true if the decremented number of references is lower or equal to zero and object must be deleted.
template<typename T , template< typename > class A>
template<class S >
void mds::img::CImage< T, A >::deserialize ( mds::mod::CChannelSerializer< S > &  Reader)

Deserializes all class members.

Reimplemented in mds::img::CSlice, and mds::img::CSlice.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class S >
void mds::img::CImage< T, Allocator >::deserialize ( mds::mod::CChannelSerializer< S > &  Reader)

Reimplemented in mds::img::CSlice, and mds::img::CSlice.

template<typename T , template< typename > class A>
CImage< T, A > & CImage::fill ( const T &  c)

Fills the image using a given pixel value.

  • Returns reference to this.
template<typename T , template< typename > class A>
CImage< T, A > & CImage::fillEntire ( const T &  c)

Fills the entire image including its margin using a given pixel value.

  • Returns reference to this.
template<typename T , template< typename > class A>
CImage< T, A > & CImage::fillMargin ( const T &  c)

Pads the image margin with constant value.

  • Returns reference to this.
template<typename T , template< typename > class A>
template<class Function >
Function mds::img::CImage< T, A >::forEach ( Function  Func)

Calls function object for every image pixel.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class A>
template<class Function >
Function mds::img::CImage< T, A >::forEach ( Function  Func) const

Calls function object for every image pixel.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class Function >
Function mds::img::CImage< T, Allocator >::forEach ( Function  Func)

Calls a function object for every image pixel.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class Function >
Function mds::img::CImage< T, Allocator >::forEach ( Function  Func) const

Calls a function object for every image pixel.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

static int mds::mod::CSerializable::getBlockSize ( ) [static, inherited]

Default block size.

static int mds::mod::CSerializable::getCompression ( ) [static, inherited]

Default compression method.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::getIdx ( tSize  x,
tSize  y 
) const

Calculates index of a specified pixel.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

tImage& mds::img::CImageBase< CImage< T, Allocator > >::getImpl ( ) [inherited]

Returns reference to the image implementation.

const tImage& mds::img::CImageBase< CImage< T, Allocator > >::getImpl ( ) const [inherited]
template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::getMargin ( ) const

Returns the image margin size in pixels.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

static const char* mds::mod::CSerializable::getName ( ) [static, inherited]

Default class name.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
T* mds::img::CImage< T, Allocator >::getPtr ( )

Returns pointer to the image data.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
const T* mds::img::CImage< T, Allocator >::getPtr ( ) const
template<typename T , template< typename > class Allocator = mds::base::CRefData>
T* mds::img::CImage< T, Allocator >::getPtr ( tSize  x,
tSize  y 
)

Returns pointer to the given pixel.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
const T* mds::img::CImage< T, Allocator >::getPtr ( tSize  x,
tSize  y 
) const

Returns the number of references.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
T* mds::img::CImage< T, Allocator >::getRowPtr ( tSize  y)

Returns pointer to the first element of the image row.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
const T* mds::img::CImage< T, Allocator >::getRowPtr ( tSize  y) const
template<typename T , template< typename > class Allocator = mds::base::CRefData>
CSize2i& mds::img::CImage< T, Allocator >::getSize ( )

Returns size of the rectangle.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
const CSize2i& mds::img::CImage< T, Allocator >::getSize ( ) const
template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::getXOffset ( ) const

Returns column offset in x-axis.

In other words, offset between two neighbouring image pixels in a row.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::getXSize ( ) const

Returns the image size (dimensions).

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::getYOffset ( ) const

Returns row offset in y-axis.

In other words, offset between two neighbouring image pixels in a column.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::getYSize ( ) const
template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::height ( ) const
template<typename T , template< typename > class A>
T CImage::interpolate ( const CPoint3D Point) const

Bilinear subpixel value interpolation.

bool mds::base::CObject::isOnHeap ( ) const [inherited]

Returns true if the object is allocated on the heap.

template<typename T , template< typename > class A>
CImage< T, A > & CImage::limit ( const T &  Lower,
const T &  Upper 
)

Clips a range of pixel values.

  • Returns reference to this.
template<typename T , template< typename > class Allocator = mds::base::CRefData>
mds::img::CImage< T, Allocator >::MDS_SHAREDPTR ( CImage< T, Allocator >  )

Declare smart pointer type tSmartPtr.

template<typename T , template< typename > class A>
CImage< T, A > & CImage::mirrorMargin ( )

Pads the image margin using a simple mirroring.

  • Returns reference to this.
static void* mds::base::CObject::operator new ( std::size_t  Size) [static, inherited]

Allocates a new object on the heap.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
T& mds::img::CImage< T, Allocator >::operator() ( tSize  x,
tSize  y 
)

Returns reference to the subscripted pixel [x][y].

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
const T& mds::img::CImage< T, Allocator >::operator() ( tSize  x,
tSize  y 
) const
template<typename T , template< typename > class Allocator = mds::base::CRefData>
T& mds::img::CImage< T, Allocator >::operator() ( tSize  i)

Returns the subscripted pixel.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
const T& mds::img::CImage< T, Allocator >::operator() ( tSize  i) const
template<typename T , template< typename > class A>
template<class Derived >
CImage< T, A > & mds::img::CImage< T, A >::operator*= ( const CImageBase< Derived > &  Image)

Pixel wise product.

template<typename T , template< typename > class A>
template<typename U >
CImage< T, A > & mds::img::CImage< T, A >::operator*= ( const CScalar< U > &  c)

Multiplies all pixels by scalar.

  • An operator that allows conversion U -> T must be defined!
template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class Derived >
CImage<T,A>& mds::img::CImage< T, Allocator >::operator*= ( const CImageBase< Derived > &  Image)
template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<typename U >
CImage<T,A>& mds::img::CImage< T, Allocator >::operator*= ( const CScalar< U > &  c)
template<typename T , template< typename > class A>
template<class Derived >
CImage< T, A > & mds::img::CImage< T, A >::operator+= ( const CImageBase< Derived > &  Image)

Pixel wise addition.

template<typename T , template< typename > class A>
template<typename U >
CImage< T, A > & mds::img::CImage< T, A >::operator+= ( const CScalar< U > &  c)

Adds scalar to all pixels.

  • An operator that allows conversion from U to T must be defined!
template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class Derived >
CImage<T,A>& mds::img::CImage< T, Allocator >::operator+= ( const CImageBase< Derived > &  Image)
template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<typename U >
CImage<T,A>& mds::img::CImage< T, Allocator >::operator+= ( const CScalar< U > &  c)
template<typename T , template< typename > class A>
template<class Derived >
CImage< T, A > & mds::img::CImage< T, A >::operator-= ( const CImageBase< Derived > &  Image)

Pixel wise subtraction.

template<typename T , template< typename > class A>
template<typename U >
CImage< T, A > & mds::img::CImage< T, A >::operator-= ( const CScalar< U > &  c)

Subtracts scalar from all pixels.

  • An operator that allows conversion U -> T must be defined!
template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class Derived >
CImage<T,A>& mds::img::CImage< T, Allocator >::operator-= ( const CImageBase< Derived > &  Image)
template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<typename U >
CImage<T,A>& mds::img::CImage< T, Allocator >::operator-= ( const CScalar< U > &  c)
template<typename T , template< typename > class A>
template<class Derived >
CImage< T, A > & mds::img::CImage< T, A >::operator/= ( const CImageBase< Derived > &  Image)

Pixel wise division.

template<typename T , template< typename > class A>
template<typename U >
CImage< T, A > & mds::img::CImage< T, A >::operator/= ( const CScalar< U > &  c)

Divides all pixels by scalar.

  • An operator that allows conversion U -> T must be defined!
template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class Derived >
CImage<T,A>& mds::img::CImage< T, Allocator >::operator/= ( const CImageBase< Derived > &  Image)
template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<typename U >
CImage<T,A>& mds::img::CImage< T, Allocator >::operator/= ( const CScalar< U > &  c)
template<typename T , template< typename > class A>
CImage< T, A > & CImage::operator= ( const CImage< T, Allocator > &  Image)

Assignment operator.

template<typename T , template< typename > class A>
template<class Function >
Function mds::img::CImage< T, A >::pforEach ( Function  Func)

Calls function object for every image pixel.

  • Parallel version.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class A>
template<class Function >
Function mds::img::CImage< T, A >::pforEach ( Function  Func) const

Calls function object for every image pixel.

  • Parallel version.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class Function >
Function mds::img::CImage< T, Allocator >::pforEach ( Function  Func)

Calls a function object for every image pixel.

  • Parallel version.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class Function >
Function mds::img::CImage< T, Allocator >::pforEach ( Function  Func) const

Calls a function object for every image pixel.

  • Parallel version.

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.

template<typename T , template< typename > class A>
CImage< T, A >::tRect CImage::rect ( const CPoint2i Position,
const CSize2i Size 
)

Returns a specified sub-image (i.e. rectangle).

template<typename T , template< typename > class A>
const CImage< T, A >::tRect mds::img::CImage< T, A >::rect ( const CPoint2i Position,
const CSize2i Size 
) const
template<typename T , template< typename > class A>
CImage< T, A >::tRect CImage::rect ( const CRange XRange,
const CRange YRange 
)

Returns a specified sub-image (i.e. rectangle).

template<typename T , template< typename > class A>
const CImage< T, A >::tRect mds::img::CImage< T, A >::rect ( const CRange XRange,
const CRange YRange 
) const
template<typename T , template< typename > class A>
CImage< T, A > & CImage::replace ( const T &  Value,
const T &  NewValue 
)

Replaces all pixels of a given value by a specified value.

  • Returns reference to this.
template<typename T , template< typename > class A>
CImage< T, A >::tRow CImage::row ( tSize  y)

Returns a specified row.

template<typename T , template< typename > class A>
const CImage< T, A >::tRow mds::img::CImage< T, A >::row ( tSize  y) const
template<typename T , template< typename > class A>
template<class S >
void mds::img::CImage< T, A >::serialize ( mds::mod::CChannelSerializer< S > &  Writer)

Serializes all class members.

Reimplemented in mds::img::CSlice, and mds::img::CSlice.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
template<class S >
void mds::img::CImage< T, Allocator >::serialize ( mds::mod::CChannelSerializer< S > &  Writer)

Reimplemented in mds::img::CSlice, and mds::img::CSlice.

tImage& mds::img::CImageBase< CImage< T, Allocator > >::set ( tSize  x,
tSize  y,
const tPixel Value 
) [inherited]

Sets the pixel at the position [x][y][z].

tImage& mds::img::CImageBase< CImage< T, Allocator > >::set ( tSize  i,
const tPixel Value 
) [inherited]

Sets the subscripted pixel.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
CImage& mds::img::CImage< T, Allocator >::set ( tSize  x,
tSize  y,
const T &  Value 
)

Sets the pixel at the position [x][y].

template<typename T , template< typename > class Allocator = mds::base::CRefData>
CImage& mds::img::CImage< T, Allocator >::set ( tSize  i,
const T &  Value 
)

Sets the subscripted voxel.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
CImage< T, A > & CImage::subSample ( const CImage< T, Allocator > &  Image,
tSize  k = 2,
tSize  l = 2 
)

Subsamples a given image and stores the result.

  • Returns reference to this.
template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::width ( ) const

Returns the image size (dimensions).

Reimplemented from mds::img::CImageBase< CImage< T, Allocator > >.


Member Data Documentation

template<typename T , template< typename > class Allocator = mds::base::CRefData>
tDataStorage mds::img::CImage< T, Allocator >::m_DataStorage [protected]

Image data.

int mds::base::CObject::m_iHeapObject [mutable, protected, inherited]

Flag initialized if the object is on the heap.

int mds::base::CObject::m_iReferences [mutable, protected, inherited]

The number of references to the object.

  • Zero if there is no reference.
template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::m_Margin [protected]

Image margin size.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
CSize2i mds::img::CImage< T, Allocator >::m_Size [protected]

Image dimensions.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::m_YOffset [protected]

Offset used by subscripting functions.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::m_ZeroOffset [protected]

Offset of the first pixel (0,0) from the beginning of data.


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