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::CSlice Class Reference

Class ecapsulating a density slice. More...

#include <mdsSlice.h>

Inheritance diagram for mds::img::CSlice:
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  { DEFAULT_MARGIN = 16 }
 Default size of the slice margin. 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.
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)
CSlicecreate (tSize XSize, tSize YSize, tSize Margin=DEFAULT_MARGIN)
 Creates a new slice.
CSlicecreate (const CSlice &Slice)
 Creates a new slice.
CSlicecreate (const CSlice &Slice, EMakeRef)
 Creates a new slice.
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.
 CSlice ()
 Default constructor.
 CSlice (tSize XSize, tSize YSize, tSize Margin=DEFAULT_MARGIN)
 Constructor.
 CSlice (const CSlice &Slice)
 Copy constructor.
 CSlice (const CSlice &Slice, EMakeRef)
 Copy constructor.
 CSlice (const CDImage &Image)
 Copy constructor.
 CSlice (const CDImage &Image, EMakeRef)
 Copy constructor.
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)
 Deserializes all class members.
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.
double getDX () const
 Returns the real pixel size in x-axis.
double getDY () const
 Returns the real pixel size in y-axis.
tSize getIdx (tSize x, tSize y) const
 Calculates index of a specified pixel.
tImagegetImpl ()
 Returns reference to the image implementation.
const tImagegetImpl () const
int getIndex () const
 Gets the slice position index.
tSize getMargin () const
 Returns the image margin size in pixels.
EPlane getOrientation () const
 Returns orientation of the slice plane.
double getPosition () const
 Returns the slice position.
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
double getThickness () const
 Returns the slice thickness.
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_ENTITY_COMPRESSION (mds::mod::CC_RAW)
 Standard method getEntityCompression().
 MDS_ENTITY_NAME ("Slice")
 Standard method getEntityName().
 MDS_SHAREDPTR (CSlice)
 Smart pointer type.
 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)
bool operator< (const CSlice &Slice)
 Operator smaller for comparision of positions of two slices.
CSliceoperator= (const CSlice &Slice)
 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)
 Serializes all class members.
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.
CSlicesetIndex (int iIndex)
 Sets the position index.
CSlicesetOrientation (EPlane ePlane)
 Sets the slice plane orientation.
CSlicesetPixel (double dDX, double dDY)
 Sets the pixel size.
CSlicesetPosition (double dPosition)
 Sets the slice position.
CSlicesetThickness (double dThickness)
 Sets the slice thickness.
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).
 ~CSlice ()
 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.
double m_dDX
 Real pixel size.
double m_dDY
double m_dPosition
 Slice position.
double m_dThickness
 Slice thickness.
EPlane m_eOrientation
 Slice plane orientation.
int m_iHeapObject
 Flag initialized if the object is on the heap.
int m_iIndex
 Position index.
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

Class ecapsulating a density slice.


Member Typedef Documentation

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

Base class.

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

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 [inherited]

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 [inherited]

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 [inherited]

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 [inherited]

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

Enumerator:
CLASS_IMAGE 
anonymous enum

Default size of the slice margin.

Enumerator:
DEFAULT_MARGIN 
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

Default constructor.

mds::img::CSlice::CSlice ( tSize  XSize,
tSize  YSize,
tSize  Margin = DEFAULT_MARGIN 
)

Constructor.

mds::img::CSlice::CSlice ( const CSlice Slice)

Copy constructor.

  • Makes a new copy of the slice data.
mds::img::CSlice::CSlice ( const CSlice Slice,
EMakeRef   
)

Copy constructor.

  • Makes only reference to the exisiting data.
mds::img::CSlice::CSlice ( const CDImage Image)

Copy constructor.

  • Makes a new copy of the slice data.
mds::img::CSlice::CSlice ( const CDImage Image,
EMakeRef   
)

Copy constructor.

  • Makes only reference to the exisiting data.

Destructor.


Member Function Documentation

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

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 
) [inherited]

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 [inherited]
template<typename T , template< typename > class Allocator = mds::base::CRefData>
T& mds::img::CImage< T, Allocator >::at ( tSize  i) [inherited]

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 [inherited]
template<typename T , template< typename > class A>
bool CImage::checkPosition ( tSize  x,
tSize  y 
) const [inherited]

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 [inherited]

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) [inherited]

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) [inherited]
CSlice & mds::img::CSlice::create ( tSize  XSize,
tSize  YSize,
tSize  Margin = DEFAULT_MARGIN 
)

Creates a new slice.

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

CSlice & mds::img::CSlice::create ( const CSlice Slice)

Creates a new slice.

  • Makes a new copy of the slice data.
CSlice & mds::img::CSlice::create ( const CSlice Slice,
EMakeRef   
)

Creates a new slice.

  • Makes only reference to the exisiting data.
template<typename T , template< typename > class A>
CImage< T, A > & mds::img::CImage< T, A >::create ( const CSize2i Size,
tSize  Margin = 0 
) [inherited]

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 
) [inherited]

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   
) [inherited]

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) [inherited]

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   
) [inherited]

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) [inherited]

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   
) [inherited]

Creates reference to an image.

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

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<class S >
void mds::img::CSlice::deserialize ( mds::mod::CChannelSerializer< S > &  Reader)

Deserializes all class members.

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

template<class S >
void mds::img::CSlice::deserialize ( mds::mod::CChannelSerializer< S > &  Reader)

Deserializes all class members.

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

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

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) [inherited]

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) [inherited]

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) [inherited]

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 [inherited]

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) [inherited]

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 [inherited]

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.

double mds::img::CSlice::getDX ( ) const

Returns the real pixel size in x-axis.

double mds::img::CSlice::getDY ( ) const

Returns the real pixel size in y-axis.

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

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]

Gets the slice position index.

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

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.

Returns orientation of the slice plane.

Returns the slice position.

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

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 [inherited]
template<typename T , template< typename > class Allocator = mds::base::CRefData>
T* mds::img::CImage< T, Allocator >::getPtr ( tSize  x,
tSize  y 
) [inherited]

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 [inherited]

Returns the number of references.

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

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 [inherited]
template<typename T , template< typename > class Allocator = mds::base::CRefData>
CSize2i& mds::img::CImage< T, Allocator >::getSize ( ) [inherited]

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 [inherited]

Returns the slice thickness.

template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::getXOffset ( ) const [inherited]

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 [inherited]

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 [inherited]

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 [inherited]
template<typename T , template< typename > class Allocator = mds::base::CRefData>
tSize mds::img::CImage< T, Allocator >::height ( ) const [inherited]
template<typename T , template< typename > class A>
T CImage::interpolate ( const CPoint3D Point) const [inherited]

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 
) [inherited]

Clips a range of pixel values.

  • Returns reference to this.

Standard method getEntityCompression().

Standard method getEntityName().

Smart pointer type.

  • Declares type tSmartPtr.
template<typename T , template< typename > class Allocator = mds::base::CRefData>
mds::img::CImage< T, Allocator >::MDS_SHAREDPTR ( CImage< T, Allocator >  ) [inherited]

Declare smart pointer type tSmartPtr.

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

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 
) [inherited]

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 [inherited]
template<typename T , template< typename > class Allocator = mds::base::CRefData>
T& mds::img::CImage< T, Allocator >::operator() ( tSize  i) [inherited]

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 [inherited]
template<typename T , template< typename > class A>
template<class Derived >
CImage< T, A > & mds::img::CImage< T, A >::operator*= ( const CImageBase< Derived > &  Image) [inherited]

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) [inherited]

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) [inherited]
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) [inherited]
template<typename T , template< typename > class A>
template<class Derived >
CImage< T, A > & mds::img::CImage< T, A >::operator+= ( const CImageBase< Derived > &  Image) [inherited]

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) [inherited]

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) [inherited]
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) [inherited]
template<typename T , template< typename > class A>
template<class Derived >
CImage< T, A > & mds::img::CImage< T, A >::operator-= ( const CImageBase< Derived > &  Image) [inherited]

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) [inherited]

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) [inherited]
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) [inherited]
template<typename T , template< typename > class A>
template<class Derived >
CImage< T, A > & mds::img::CImage< T, A >::operator/= ( const CImageBase< Derived > &  Image) [inherited]

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) [inherited]

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) [inherited]
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) [inherited]
bool mds::img::CSlice::operator< ( const CSlice Slice)

Operator smaller for comparision of positions of two slices.

CSlice & mds::img::CSlice::operator= ( const CSlice Slice)

Image assignment operator.

Reimplemented in mds::img::CDicomSlice.

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

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 [inherited]

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) [inherited]

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 [inherited]

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 
) [inherited]

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 [inherited]
template<typename T , template< typename > class A>
CImage< T, A >::tRect CImage::rect ( const CRange XRange,
const CRange YRange 
) [inherited]

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 [inherited]
template<typename T , template< typename > class A>
CImage< T, A > & CImage::replace ( const T &  Value,
const T &  NewValue 
) [inherited]

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) [inherited]

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 [inherited]
template<class S >
void mds::img::CSlice::serialize ( mds::mod::CChannelSerializer< S > &  Writer)

Serializes all class members.

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

template<class S >
void mds::img::CSlice::serialize ( mds::mod::CChannelSerializer< S > &  Writer)

Serializes all class members.

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

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 
) [inherited]

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 
) [inherited]

Sets the subscripted voxel.

Sets the position index.

Sets the slice plane orientation.

CSlice& mds::img::CSlice::setPixel ( double  dDX,
double  dDY 
)

Sets the pixel size.

CSlice& mds::img::CSlice::setPosition ( double  dPosition)

Sets the slice position.

CSlice& mds::img::CSlice::setThickness ( double  dThickness)

Sets the slice thickness.

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 
) [inherited]

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 [inherited]

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, inherited]

Image data.

double mds::img::CSlice::m_dDX [protected]

Real pixel size.

double mds::img::CSlice::m_dDY [protected]
double mds::img::CSlice::m_dPosition [protected]

Slice position.

double mds::img::CSlice::m_dThickness [protected]

Slice thickness.

Slice plane orientation.

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

Flag initialized if the object is on the heap.

Position index.

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, inherited]

Image margin size.

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

Image dimensions.

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

Offset used by subscripting functions.

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

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


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