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::CVolume< T, Allocator > Class Template Reference

Class template representing volumetric data. More...

#include <mdsVolume.h>

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

List of all members.

Public Types

enum  { CLASS_VOLUME }
 Templates that require members of the CVolume class can 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 CVolumeBase< CVolume
< T, Allocator > > 
tBase
typedef Allocator< T > tDataStorage
 Volume data storage type.
typedef CRectBox< CVolumetRect
 View of the volume (i.e. rectangular box).
typedef CVolumeRow< CVolumetRow
 Volume row (the x coordinate is varying while y and z coordinates are fixed).
typedef CVolume< T, Allocator > tVolume
 Volume type.
typedef T tVoxel
 Voxel type.

Public Member Functions

CVolumeabs ()
 Absolute value of all voxels.
T & at (tSize x, tSize y, tSize z)
 Returns the subscripted voxel [x][y][z].
const T & at (tSize x, tSize y, tSize z) const
T & at (tSize i)
 Returns the subscripted voxel.
const T & at (tSize i) const
bool checkPosition (tSize x, tSize y, tSize z) const
 Checks the voxel position.
color2Voxel (CColor Color) const
 Converts a specified color to the volume voxel format and range.
template<class Derived >
CVolumeconvert (const CVolumeBase< Derived > &Volume)
 Conversion between volumes of different types.
template<typename Derived >
CVolume< T, A > & convert (const CVolumeBase< Derived > &Volume)
CVolumecreate (tSize XSize, tSize YSize, tSize ZSize, tSize Margin=0)
 Resizes the volume data.
CVolumecreate (const CSize3i &Size, tSize Margin=0)
 Resizes the volume data.
CVolumecreate (const CVolume &Volume, tSize x, tSize y, tSize z, tSize XSize, tSize YSize, tSize ZSize)
 Creates a subvolume of a given volume.
CVolumecreate (const CVolume &Volume, tSize x, tSize y, tSize z, tSize XSize, tSize YSize, tSize ZSize, EMakeRef)
 Creates a subvolume of a given volume.
CVolumecreate (const tRect &Volume)
 Creates copy of a given subvolume.
CVolumecreate (const tRect &Volume, EMakeRef)
 Creates reference to a given subvolume.
CVolumecreate (const CVolume &Volume)
 Creates copy of a volume.
CVolumecreate (const CVolume &Volume, EMakeRef)
 Creates reference to a given volume.
CVolumecut (const T &Lower, const T &Upper)
 Cuts range of voxel values.
 CVolume ()
 Declare tterator types tIterator and tConstIterator.
 CVolume (tSize XSize, tSize YSize, tSize ZSize, tSize Margin=0)
 Constructor.
 CVolume (const CSize3i &Size, tSize Margin=0)
 Constructor.
 CVolume (const CVolume &Volume, tSize x, tSize y, tSize z, tSize XSize, tSize YSize, tSize ZSize)
 Constructor.
 CVolume (const CVolume &Volume, tSize x, tSize y, tSize z, tSize XSize, tSize YSize, tSize ZSize, EMakeRef)
 Constructor.
 CVolume (const tRect &Volume)
 Constructor.
 CVolume (const tRect &Volume, EMakeRef)
 Constructor.
 CVolume (const CVolume &Volume)
 Copy constructor.
 CVolume (const CVolume &Volume, EMakeRef)
 Copy constructor.
tSize depth () const
template<class S >
void deserialize (mds::mod::CChannelSerializer< S > &Reader)
 Deserializes all class members.
template<class S >
void deserialize (mds::mod::CChannelSerializer< S > &Reader)
CVolumefill (const T &c)
 Fills the volume using a given voxel value.
CVolumefillEntire (const T &c)
 Fills the entire volume including its margin using a given voxel value.
CVolumefillMargin (const T &c)
 Pads the volume margin with constant value.
template<class Function >
Function forEach (Function Func)
 Calls a function object for every voxel.
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every voxel.
template<class Function >
Function forEach (Function Func)
 Calls a function object for every voxel.
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every voxel.
tSize getIdx (tSize x, tSize y, tSize z) const
 Calculates index of a voxel.
tVolumegetImpl ()
 Returns reference to the volume data implementation.
const tVolumegetImpl () const
tSize getMargin () const
 Returns the volume Margin size in voxels.
bool getPlaneXY (tSize z, CImage< T > &Plane)
 Cuts the volume using plane XY and saves obtained data to a given image.
bool getPlaneXZ (tSize y, CImage< T > &Plane)
 Cuts the volume using plane XZ and saves obtained data to a given image.
bool getPlaneYZ (tSize x, CImage< T > &Plane)
 Cuts the volume using plane YZ and saves obtained data to a given image.
T * getPtr ()
 Returns pointer to the volume data.
const T * getPtr () const
T * getPtr (tSize x, tSize y, tSize z)
 Returns pointer to the given voxel.
const T * getPtr (tSize x, tSize y, tSize z) const
int getReferencesCount () const
 Returns the number of references.
T * getRowPtr (tSize y, tSize z)
 Returns pointer to the first element of the volume row.
const T * getRowPtr (tSize y, tSize z) const
CSize3igetSize ()
 Returns the volume size.
const CSize3igetSize () const
tSize getXOffset () const
 Returns offset between two neigbouring voxels in x-axis.
tSize getXSize () const
 Returns the volume size (dimensions).
tSize getYOffset () const
 Returns offset between two neigbouring voxels in y-axis.
tSize getYSize () const
tSize getZOffset () const
 Returns offset between two neigbouring voxels in z-axis.
tSize getZSize () const
tSize height () const
interpolate (const CPoint3D &Point) const
 Bilinear subvoxel value interpolation.
bool isOnHeap () const
 Returns true if the object is allocated on the heap.
CVolumelimit (const T &Lower, const T &Upper)
 Limits the range of voxel values.
 MDS_SHAREDPTR (CVolume)
 Declare smart pointer type tSmartPtr.
CVolumemirrorMargin ()
 Pads the volume margin using a simple mirroring.
T & operator() (tSize x, tSize y, tSize z)
 Returns the subscripted voxel [x][y][z].
const T & operator() (tSize x, tSize y, tSize z) const
T & operator() (tSize i)
 Returns the subscripted voxel.
const T & operator() (tSize i) const
template<class Derived >
CVolumeoperator*= (const CVolumeBase< Derived > &Volume)
 Pixel wise product.
template<typename U >
CVolumeoperator*= (const CScalar< U > &c)
 Multiplies all pixels by scalar.
template<class Derived >
CVolume< T, A > & operator*= (const CVolumeBase< Derived > &Volume)
template<typename U >
CVolume< T, A > & operator*= (const CScalar< U > &c)
template<class Derived >
CVolumeoperator+= (const CVolumeBase< Derived > &Volume)
 Pixel wise addition.
template<typename U >
CVolumeoperator+= (const CScalar< U > &c)
 Adds scalar to all pixels.
template<class Derived >
CVolume< T, A > & operator+= (const CVolumeBase< Derived > &Volume)
template<typename U >
CVolume< T, A > & operator+= (const CScalar< U > &c)
template<class Derived >
CVolumeoperator-= (const CVolumeBase< Derived > &Volume)
 Pixel wise subtraction.
template<typename U >
CVolumeoperator-= (const CScalar< U > &c)
 Subtracts scalar from all pixels.
template<class Derived >
CVolume< T, A > & operator-= (const CVolumeBase< Derived > &Volume)
template<typename U >
CVolume< T, A > & operator-= (const CScalar< U > &c)
template<class Derived >
CVolumeoperator/= (const CVolumeBase< Derived > &Volume)
 Pixel wise division.
template<typename U >
CVolumeoperator/= (const CScalar< U > &c)
 Divides all pixels by scalar.
template<class Derived >
CVolume< T, A > & operator/= (const CVolumeBase< Derived > &Volume)
template<typename U >
CVolume< T, A > & operator/= (const CScalar< U > &c)
virtual CVolumeoperator= (const CVolume &Volume)
 Assignment operator.
template<class Function >
Function pforEach (Function Func)
 Calls a function object for every voxel.
template<class Function >
Function pforEach (Function Func) const
 Calls a function object for every voxel.
template<class Function >
Function pforEach (Function Func)
 Calls a function object for every voxel.
template<class Function >
Function pforEach (Function Func) const
 Calls a function object for every voxel.
tRect rect (const CPoint3i &Position, const CSize3i &Size)
 Returns a specified sub-volume (i.e. rectangular box).
const tRect rect (const CPoint3i &Position, const CSize3i &Size) const
tRect rect (const CRange &XRange, const CRange &YRange, const CRange &ZRange)
 Returns a specified sub-volume (i.e. rectangular box).
const tRect rect (const CRange &XRange, const CRange &YRange, const CRange &ZRange) const
CVolumereplace (const T &Value, const T &NewValue)
 Replaces all voxels of a given value by a specified value.
tRow row (tSize y, tSize z)
 Returns a specified row.
const tRow row (tSize y, tSize z) 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)
tVolumeset (tSize x, tSize y, tSize z, const tVoxel &Value)
 Sets the voxel at the position [x][y][z].
tVolumeset (tSize i, const tVoxel &Value)
 Sets the subscripted voxel.
CVolumeset (tSize x, tSize y, tSize z, const T &Value)
 Sets the voxel at the position [x][y][z].
CVolumeset (tSize i, const T &Value)
 Sets the subscripted voxel.
bool setPlaneXY (tSize z, const CImage< T > &Plane)
 Projects a given image data to the volume using a specified plane.
bool setPlaneXZ (tSize y, const CImage< T > &Plane)
 Projects a given image data to the volume using a specified plane.
bool setPlaneYZ (tSize x, const CImage< T > &Plane)
 Projects a given image data to the volume using a specified plane.
CVolumesubSample (const CVolume &Volume, tSize l=2, tSize m=2, tSize n=2)
 Subsample the volume.
tSize width () const
 Returns the volume size (dimensions).
virtual ~CVolume ()
 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
 Volume data storage.
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
 Volume margin size.
CSize3i m_Size
 Volume dimensions.
tSize m_YOffset
 Offsets used by subscripting functions.
tSize m_ZeroOffset
 Offset of the first voxel (0,0,0) from the beginning of data.
tSize m_ZOffset

Detailed Description

template<typename T, template< typename > class Allocator = mds::base::CPartedData>
class mds::img::CVolume< T, Allocator >

Class template representing volumetric data.


Member Typedef Documentation

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
typedef CVolumeBase<CVolume<T, Allocator> > mds::img::CVolume< T, Allocator >::tBase

Reimplemented in mds::img::CDensityVolume.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
typedef Allocator<T> mds::img::CVolume< T, Allocator >::tDataStorage

Volume data storage type.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
typedef CRectBox<CVolume> mds::img::CVolume< T, Allocator >::tRect

View of the volume (i.e. rectangular box).

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
typedef CVolumeRow<CVolume> mds::img::CVolume< T, Allocator >::tRow

Volume row (the x coordinate is varying while y and z coordinates are fixed).

typedef CVolume< T, Allocator > mds::img::CVolumeBase< CVolume< T, Allocator > >::tVolume [inherited]

Volume type.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
typedef T mds::img::CVolume< T, Allocator >::tVoxel

Voxel type.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.


Member Enumeration Documentation

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

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

Enumerator:
CLASS_VOLUME 
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>
CVolume::CVolume ( )

Declare tterator types tIterator and tConstIterator.

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

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

Constructor.

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

Constructor.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
mds::img::CVolume< T, Allocator >::CVolume ( const CVolume< T, Allocator > &  Volume,
tSize  x,
tSize  y,
tSize  z,
tSize  XSize,
tSize  YSize,
tSize  ZSize 
)

Constructor.

  • Creates a subvolume of a given volume.
  • Makes own copy of the data.
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
mds::img::CVolume< T, Allocator >::CVolume ( const CVolume< T, Allocator > &  Volume,
tSize  x,
tSize  y,
tSize  z,
tSize  XSize,
tSize  YSize,
tSize  ZSize,
EMakeRef   
)

Constructor.

  • Creates a subvolume of a given volume.
  • Makes only a reference to the data.
template<typename T , template< typename > class A>
CVolume::CVolume ( const tRect Volume)

Constructor.

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

Constructor.

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

Copy constructor.

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

Copy constructor.

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

Destructor.


Member Function Documentation

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

Absolute value of all voxels.

void mds::base::CObject::addReference ( ) const [protected, inherited]

Increase the reference counter.

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

Returns the subscripted voxel [x][y][z].

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Returns the subscripted voxel.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Checks the voxel position.

  • Returns true if a specified position is satisfactory.
template<typename T , template< typename > class A>
T CVolume::color2Voxel ( CColor  Color) const

Converts a specified color to the volume voxel format and range.

template<typename T , template< typename > class A>
template<typename Derived >
CVolume< T, A > & mds::img::CVolume< T, A >::convert ( const CVolumeBase< Derived > &  Volume)

Conversion between volumes of different types.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
template<typename Derived >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::convert ( const CVolumeBase< Derived > &  Volume)
template<typename T , template< typename > class A>
CVolume< T, A > & mds::img::CVolume< T, A >::create ( tSize  XSize,
tSize  YSize,
tSize  ZSize,
tSize  Margin = 0 
)

Resizes the volume data.

Reimplemented in mds::img::CDensityVolume.

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

Resizes the volume data.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
CVolume& mds::img::CVolume< T, Allocator >::create ( const CVolume< T, Allocator > &  Volume,
tSize  x,
tSize  y,
tSize  z,
tSize  XSize,
tSize  YSize,
tSize  ZSize 
)

Creates a subvolume of a given volume.

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

Creates a subvolume of a given volume.

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

Creates copy of a given subvolume.

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

Creates reference to a given subvolume.

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

Creates copy of a volume.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
CVolume& mds::img::CVolume< T, Allocator >::create ( const CVolume< T, Allocator > &  Volume,
EMakeRef   
)

Creates reference to a given volume.

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

Cuts range of voxel values.

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 Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::depth ( ) const
template<typename T , template< typename > class A>
template<class S >
void mds::img::CVolume< T, A >::deserialize ( mds::mod::CChannelSerializer< S > &  Reader)

Deserializes all class members.

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

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
template<class S >
void mds::img::CVolume< T, Allocator >::deserialize ( mds::mod::CChannelSerializer< S > &  Reader)
template<typename T , template< typename > class A>
CVolume< T, A > & CVolume::fill ( const T &  c)

Fills the volume using a given voxel value.

template<typename T , template< typename > class A>
CVolume< T, A > & CVolume::fillEntire ( const T &  c)

Fills the entire volume including its margin using a given voxel value.

template<typename T , template< typename > class A>
CVolume< T, A > & CVolume::fillMargin ( const T &  c)

Pads the volume margin with constant value.

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

Calls a function object for every voxel.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Calls a function object for every voxel.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Calls a function object for every voxel.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Calls a function object for every voxel.

Reimplemented from mds::img::CVolumeBase< CVolume< 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::CPartedData>
tSize mds::img::CVolume< T, Allocator >::getIdx ( tSize  x,
tSize  y,
tSize  z 
) const

Calculates index of a voxel.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

tVolume& mds::img::CVolumeBase< CVolume< T, Allocator > >::getImpl ( ) [inherited]

Returns reference to the volume data implementation.

const tVolume& mds::img::CVolumeBase< CVolume< T, Allocator > >::getImpl ( ) const [inherited]
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::getMargin ( ) const

Returns the volume Margin size in voxels.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Default class name.

template<typename T , template< typename > class A>
bool CVolume::getPlaneXY ( tSize  z,
CImage< T > &  Plane 
)

Cuts the volume using plane XY and saves obtained data to a given image.

Position of the plane is specified by the z coordinate.

template<typename T , template< typename > class A>
bool CVolume::getPlaneXZ ( tSize  y,
CImage< T > &  Plane 
)

Cuts the volume using plane XZ and saves obtained data to a given image.

Position of the plane is specified by the y coordinate.

template<typename T , template< typename > class A>
bool CVolume::getPlaneYZ ( tSize  x,
CImage< T > &  Plane 
)

Cuts the volume using plane YZ and saves obtained data to a given image.

Position of the plane is specified by the x coordinate.

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

Returns pointer to the volume data.

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

Returns pointer to the given voxel.

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

Returns the number of references.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
T* mds::img::CVolume< T, Allocator >::getRowPtr ( tSize  y,
tSize  z 
)

Returns pointer to the first element of the volume row.

  • x coordinate is taken to be zero.
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
const T* mds::img::CVolume< T, Allocator >::getRowPtr ( tSize  y,
tSize  z 
) const
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
CSize3i& mds::img::CVolume< T, Allocator >::getSize ( )

Returns the volume size.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
const CSize3i& mds::img::CVolume< T, Allocator >::getSize ( ) const
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::getXOffset ( ) const

Returns offset between two neigbouring voxels in x-axis.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Returns the volume size (dimensions).

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Returns offset between two neigbouring voxels in y-axis.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::getYSize ( ) const
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::getZOffset ( ) const

Returns offset between two neigbouring voxels in z-axis.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::getZSize ( ) const
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::height ( ) const
template<typename T , template< typename > class A>
T CVolume::interpolate ( const CPoint3D Point) const

Bilinear subvoxel 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>
CVolume< T, A > & CVolume::limit ( const T &  Lower,
const T &  Upper 
)

Limits the range of voxel values.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
mds::img::CVolume< T, Allocator >::MDS_SHAREDPTR ( CVolume< T, Allocator >  )

Declare smart pointer type tSmartPtr.

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

Pads the volume margin using a simple mirroring.

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::CPartedData>
T& mds::img::CVolume< T, Allocator >::operator() ( tSize  x,
tSize  y,
tSize  z 
)

Returns the subscripted voxel [x][y][z].

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Returns the subscripted voxel.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
const T& mds::img::CVolume< T, Allocator >::operator() ( tSize  i) const
template<typename T , template< typename > class A>
template<class Derived >
CVolume< T, A > & mds::img::CVolume< T, A >::operator*= ( const CVolumeBase< Derived > &  Volume)

Pixel wise product.

template<typename T , template< typename > class A>
template<typename U >
CVolume< T, A > & mds::img::CVolume< 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::CPartedData>
template<class Derived >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::operator*= ( const CVolumeBase< Derived > &  Volume)
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
template<typename U >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::operator*= ( const CScalar< U > &  c)
template<typename T , template< typename > class A>
template<class Derived >
CVolume< T, A > & mds::img::CVolume< T, A >::operator+= ( const CVolumeBase< Derived > &  Volume)

Pixel wise addition.

template<typename T , template< typename > class A>
template<typename U >
CVolume< T, A > & mds::img::CVolume< 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::CPartedData>
template<class Derived >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::operator+= ( const CVolumeBase< Derived > &  Volume)
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
template<typename U >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::operator+= ( const CScalar< U > &  c)
template<typename T , template< typename > class A>
template<class Derived >
CVolume< T, A > & mds::img::CVolume< T, A >::operator-= ( const CVolumeBase< Derived > &  Volume)

Pixel wise subtraction.

template<typename T , template< typename > class A>
template<typename U >
CVolume< T, A > & mds::img::CVolume< 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::CPartedData>
template<class Derived >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::operator-= ( const CVolumeBase< Derived > &  Volume)
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
template<typename U >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::operator-= ( const CScalar< U > &  c)
template<typename T , template< typename > class A>
template<class Derived >
CVolume< T, A > & mds::img::CVolume< T, A >::operator/= ( const CVolumeBase< Derived > &  Volume)

Pixel wise division.

template<typename T , template< typename > class A>
template<typename U >
CVolume< T, A > & mds::img::CVolume< 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::CPartedData>
template<class Derived >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::operator/= ( const CVolumeBase< Derived > &  Volume)
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
template<typename U >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::operator/= ( const CScalar< U > &  c)
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
CVolume< T, A > & CVolume::operator= ( const CVolume< T, Allocator > &  Volume) [virtual]

Assignment operator.

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

Calls a function object for every voxel.

  • Parallel version.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Calls a function object for every voxel.

  • Parallel version.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Calls a function object for every voxel.

  • Parallel version.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

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

Calls a function object for every voxel.

  • Parallel version.

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.

template<typename T , template< typename > class A>
CVolume< T, A >::tRect CVolume::rect ( const CPoint3i Position,
const CSize3i Size 
)

Returns a specified sub-volume (i.e. rectangular box).

template<typename T , template< typename > class A>
const CVolume< T, A >::tRect mds::img::CVolume< T, A >::rect ( const CPoint3i Position,
const CSize3i Size 
) const
template<typename T , template< typename > class A>
CVolume< T, A >::tRect CVolume::rect ( const CRange XRange,
const CRange YRange,
const CRange ZRange 
)

Returns a specified sub-volume (i.e. rectangular box).

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

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

template<typename T , template< typename > class A>
CVolume< T, A >::tRow CVolume::row ( tSize  y,
tSize  z 
)

Returns a specified row.

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

Serializes all class members.

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

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
template<class S >
void mds::img::CVolume< T, Allocator >::serialize ( mds::mod::CChannelSerializer< S > &  Writer)
tVolume& mds::img::CVolumeBase< CVolume< T, Allocator > >::set ( tSize  x,
tSize  y,
tSize  z,
const tVoxel Value 
) [inherited]

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

tVolume& mds::img::CVolumeBase< CVolume< T, Allocator > >::set ( tSize  i,
const tVoxel Value 
) [inherited]

Sets the subscripted voxel.

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

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

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

Sets the subscripted voxel.

template<typename T , template< typename > class A>
bool CVolume::setPlaneXY ( tSize  z,
const CImage< T > &  Plane 
)

Projects a given image data to the volume using a specified plane.

template<typename T , template< typename > class A>
bool CVolume::setPlaneXZ ( tSize  y,
const CImage< T > &  Plane 
)

Projects a given image data to the volume using a specified plane.

template<typename T , template< typename > class A>
bool CVolume::setPlaneYZ ( tSize  x,
const CImage< T > &  Plane 
)

Projects a given image data to the volume using a specified plane.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
CVolume< T, A > & CVolume::subSample ( const CVolume< T, Allocator > &  Volume,
tSize  l = 2,
tSize  m = 2,
tSize  n = 2 
)

Subsample the volume.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::width ( ) const

Returns the volume size (dimensions).

Reimplemented from mds::img::CVolumeBase< CVolume< T, Allocator > >.


Member Data Documentation

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

Volume data storage.

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::CPartedData>
tSize mds::img::CVolume< T, Allocator >::m_Margin [protected]

Volume margin size.

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
CSize3i mds::img::CVolume< T, Allocator >::m_Size [protected]

Volume dimensions.

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

Offsets used by subscripting functions.

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

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

template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::m_ZOffset [protected]

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