MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Member Functions
mds::img::CImageBase< I > Class Template Reference

Base class for all images. More...

#include <mdsImageBase.h>

Inheritance diagram for mds::img::CImageBase< I >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef I tImage
 Image type.
typedef CImageTraits< I >::tPixel tPixel
 Pixel type.

Public Member Functions

tPixelat (tSize x, tSize y)
 Returns the subscripted Pixel [x][y].
const tPixelat (tSize x, tSize y) const
tPixelat (tSize i)
 Returns the subscripted pixel.
const tPixelat (tSize i) const
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 pixel index.
tImagegetImpl ()
 Returns reference to the image implementation.
const tImagegetImpl () const
tSize getMargin () const
 Returns the image margin size in pixels.
CSize2igetSize ()
 Returns size of the image.
const CSize2igetSize () const
tSize getXOffset () const
 Returns offset between two neigbouring pixels in x-axis.
tSize getXSize () const
 Returns the image size (dimensions).
tSize getYOffset () const
 Returns offset between two neigbouring pixels in y-axis.
tSize getYSize () const
tSize height () const
tPixeloperator() (tSize x, tSize y)
 Returns the subscripted pixel [x][y].
const tPixeloperator() (tSize x, tSize y) const
tPixeloperator() (tSize i)
 Returns the subscripted pixel.
const tPixeloperator() (tSize i) const
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.
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.
tSize width () const
 Returns the image size (dimensions).

Protected Member Functions

 CImageBase ()
 Default constructor.
 CImageBase (const CImageBase &)
 Copy constructor.
CImageBaseoperator= (const CImageBase &)
 Assignment operator.

Detailed Description

template<class I>
class mds::img::CImageBase< I >

Base class for all images.


Member Typedef Documentation

template<class I>
typedef I mds::img::CImageBase< I >::tImage

Image type.

Reimplemented in mds::img::CRect< I >.

template<class I>
typedef CImageTraits<I>::tPixel mds::img::CImageBase< I >::tPixel

Constructor & Destructor Documentation

template<class I>
mds::img::CImageBase< I >::CImageBase ( ) [protected]

Default constructor.

template<class I>
mds::img::CImageBase< I >::CImageBase ( const CImageBase< I > &  ) [protected]

Copy constructor.


Member Function Documentation

template<class I>
tPixel& mds::img::CImageBase< I >::at ( tSize  x,
tSize  y 
)

Returns the subscripted Pixel [x][y].

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
const tPixel& mds::img::CImageBase< I >::at ( tSize  x,
tSize  y 
) const
template<class I>
tPixel& mds::img::CImageBase< I >::at ( tSize  i)

Returns the subscripted pixel.

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
const tPixel& mds::img::CImageBase< I >::at ( tSize  i) const
template<class I>
template<class Function >
Function mds::img::CImageBase< I >::forEach ( Function  Func)
template<class I>
template<class Function >
Function mds::img::CImageBase< I >::forEach ( Function  Func) const
template<class I>
tSize mds::img::CImageBase< I >::getIdx ( tSize  x,
tSize  y 
) const

Calculates pixel index.

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
tImage& mds::img::CImageBase< I >::getImpl ( )

Returns reference to the image implementation.

template<class I>
const tImage& mds::img::CImageBase< I >::getImpl ( ) const
template<class I>
tSize mds::img::CImageBase< I >::getMargin ( ) const

Returns the image margin size in pixels.

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
CSize2i& mds::img::CImageBase< I >::getSize ( )

Returns size of the image.

Reimplemented in mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
const CSize2i& mds::img::CImageBase< I >::getSize ( ) const
template<class I>
tSize mds::img::CImageBase< I >::getXOffset ( ) const

Returns offset between two neigbouring pixels in x-axis.

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
tSize mds::img::CImageBase< I >::getXSize ( ) const

Returns the image size (dimensions).

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
tSize mds::img::CImageBase< I >::getYOffset ( ) const

Returns offset between two neigbouring pixels in y-axis.

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
tSize mds::img::CImageBase< I >::getYSize ( ) const
template<class I>
tSize mds::img::CImageBase< I >::height ( ) const
template<class I>
tPixel& mds::img::CImageBase< I >::operator() ( tSize  x,
tSize  y 
)

Returns the subscripted pixel [x][y].

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
const tPixel& mds::img::CImageBase< I >::operator() ( tSize  x,
tSize  y 
) const
template<class I>
tPixel& mds::img::CImageBase< I >::operator() ( tSize  i)

Returns the subscripted pixel.

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.

template<class I>
const tPixel& mds::img::CImageBase< I >::operator() ( tSize  i) const
template<class I>
CImageBase& mds::img::CImageBase< I >::operator= ( const CImageBase< I > &  ) [protected]

Assignment operator.

template<class I>
template<class Function >
Function mds::img::CImageBase< I >::pforEach ( Function  Func)

Calls a function object for every image pixel.

  • Parallel version.

Reimplemented in mds::img::CImage< T, Allocator >, mds::img::CvImage< T >, mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, mds::img::CRect< I >, and mds::img::CRect< I >.

template<class I>
template<class Function >
Function mds::img::CImageBase< I >::pforEach ( Function  Func) const

Calls a function object for every image pixel.

  • Parallel version.

Reimplemented in mds::img::CImage< T, Allocator >, mds::img::CvImage< T >, mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, mds::img::CRect< I >, and mds::img::CRect< I >.

template<class I>
tImage& mds::img::CImageBase< I >::set ( tSize  x,
tSize  y,
const tPixel Value 
)

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

template<class I>
tImage& mds::img::CImageBase< I >::set ( tSize  i,
const tPixel Value 
)

Sets the subscripted pixel.

template<class I>
tSize mds::img::CImageBase< I >::width ( ) const

Returns the image size (dimensions).

Reimplemented in mds::img::CvImage< T >, mds::img::CImage< T, Allocator >, and mds::img::CRect< I >.


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