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

Class ecapsulating volumetric density data. More...

#include <mdsDensityVolume.h>

Inheritance diagram for mds::img::CDensityVolume:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { DEFAULT_MARGIN = 3 }
 Default size of the volume margin. More...
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 CDVolume tBase
 Base type.
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
 CDensityVolume ()
 Default constructor.
 CDensityVolume (tSize XSize, tSize YSize, tSize ZSize, tSize Margin=DEFAULT_MARGIN)
 Constructor.
 CDensityVolume (const CDensityVolume &Volume)
 Copy constructor.
 CDensityVolume (const CDensityVolume &Volume, EMakeRef)
 Copy constructor.
 CDensityVolume (const tBase &Volume)
 Copy constructor.
 CDensityVolume (const tBase &Volume, EMakeRef)
 Copy constructor.
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)
CDensityVolumecreate (tSize XSize, tSize YSize, tSize ZSize, tSize Margin=DEFAULT_MARGIN)
 Creates a new volume.
CDensityVolumecreate (const tBase &Volume)
 Creates a new volume.
CDensityVolumecreate (const tBase &Volume, EMakeRef)
 Creates a new volume.
CDensityVolumecreate (const CDensityVolume &Volume)
 Creates a new volume.
CDensityVolumecreate (const CDensityVolume &Volume, EMakeRef)
 Creates a new volume.
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.
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)
 Deserializes all class members.
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.
double getDX () const
 Returns the real voxel size in x-axis.
double getDY () const
 Returns the real voxel size in y-axis.
double getDZ () const
 Returns the real voxel size in z-axis.
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
bool getSlice (double dPosition, CSlice &Plane)
 Cuts the volume using plane by given slice and saves obtained data to the slice.
bool getSliceXY (tSize z, CSlice &Plane)
 Cuts the volume using plane XY and saves obtained data to a given slice.
bool getSliceXY (double dZ, CSlice &Plane)
 Cuts the volume using plane XY and saves obtained data to a given slice.
bool getSliceXZ (tSize y, CSlice &Plane)
 Cuts the volume using plane XZ and saves obtained data to a given slice.
bool getSliceXZ (double dY, CSlice &Plane)
 Cuts the volume using plane XZ and saves obtained data to a given slice.
bool getSliceYZ (tSize x, CSlice &Plane)
 Cuts the volume using plane YZ and saves obtained data to a given slice.
bool getSliceYZ (double dX, CSlice &Plane)
 Cuts the volume using plane YZ and saves obtained data to a given slice.
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
void initSlice (CSlice &Slice, EPlane eOrientation)
 Initializes slice parameters (size and etc.) with respect to the volume parameters in a given direction.
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_ENTITY_COMPRESSION (mds::mod::CC_RAW)
 Standard method getEntityCompression().
 MDS_ENTITY_NAME ("DensityVolume")
 Standard method getEntityName().
 MDS_SHAREDPTR (CDensityVolume)
 Smart pointer type.
 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)
CDensityVolumeoperator= (const CDensityVolume &Volume)
 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)
 Serializes all class members.
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.
CDensityVolumesetDX (double dValue)
 Set the real voxel size in x-axis.
CDensityVolumesetDY (double dValue)
 Set the real voxel size in y-axis.
CDensityVolumesetDZ (double dValue)
 Set the real voxel size in z-axis.
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.
CDensityVolumesetVoxel (double dDX, double dDY, double dDZ)
 Sets voxel dimensions.
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 ~CDensityVolume ()
 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.
double m_dDX
 Real voxel size.
double m_dDY
double m_dDZ
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

Class ecapsulating volumetric density data.


Member Typedef Documentation

Base type.

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

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

Volume data storage type.

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

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

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

Voxel type.

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


Member Enumeration Documentation

anonymous enum

Default size of the volume margin.

Enumerator:
DEFAULT_MARGIN 
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
anonymous enum [inherited]

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

Default constructor.

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

Constructor.

Copy constructor.

  • Makes a new copy of the volume data.

Copy constructor.

  • Makes only a reference to the exisiting data.

Copy constructor.

  • Makes a new copy of the volume data.

Copy constructor.

  • Makes only a reference to the exisiting data.

Destructor.


Member Function Documentation

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

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

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

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

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

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

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

Creates a new volume.

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

Creates a new volume.

  • Makes a new copy of the volume data.

Creates a new volume.

  • Makes only a reference to the exisiting data.

Creates a new volume.

  • Makes a new copy of the volume data.

Creates a new volume.

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

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

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

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

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

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

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

Creates reference to a given volume.

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

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 [inherited]
template<class S >
void mds::img::CDensityVolume::deserialize ( mds::mod::CChannelSerializer< S > &  Reader)

Deserializes all class members.

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

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

Deserializes all class members.

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

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

Fills the volume using a given voxel value.

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

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

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

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

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

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

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.

Returns the real voxel size in x-axis.

Returns the real voxel size in y-axis.

Returns the real voxel size in z-axis.

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

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

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

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

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

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

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

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

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

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

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 [inherited]
bool mds::img::CDensityVolume::getSlice ( double  dPosition,
CSlice Plane 
)

Cuts the volume using plane by given slice and saves obtained data to the slice.

Position of the plane is specified by the real position.

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

Position of the plane is specified by the Z index.

bool mds::img::CDensityVolume::getSliceXY ( double  dZ,
CSlice Plane 
)

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

Position of the plane is specified by the Z real position.

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

Position of the plane is specified by the Y index.

bool mds::img::CDensityVolume::getSliceXZ ( double  dY,
CSlice Plane 
)

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

Position of the plane is specified by the Y real position.

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

Position of the plane is specified by the X index.

bool mds::img::CDensityVolume::getSliceYZ ( double  dX,
CSlice Plane 
)

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

Position of the plane is specified by the X real position.

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

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

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

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 [inherited]
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::getZOffset ( ) const [inherited]

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 [inherited]
template<typename T , template< typename > class Allocator = mds::base::CPartedData>
tSize mds::img::CVolume< T, Allocator >::height ( ) const [inherited]
void mds::img::CDensityVolume::initSlice ( CSlice Slice,
EPlane  eOrientation 
)

Initializes slice parameters (size and etc.) with respect to the volume parameters in a given direction.

template<typename T , template< typename > class A>
T CVolume::interpolate ( const CPoint3D Point) const [inherited]

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

Limits the range of voxel values.

Standard method getEntityCompression().

Standard method getEntityName().

Smart pointer type.

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

Declare smart pointer type tSmartPtr.

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

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

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

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

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

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

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

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) [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::CPartedData>
template<class Derived >
CVolume<T,A>& mds::img::CVolume< T, Allocator >::operator/= ( const CVolumeBase< Derived > &  Volume) [inherited]
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) [inherited]
CDensityVolume & mds::img::CDensityVolume::operator= ( const CDensityVolume Volume)

Volume assignment operator.

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

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

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

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

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

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

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

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

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

Serializes all class members.

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

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

Serializes all class members.

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

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

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

Sets the subscripted voxel.

Set the real voxel size in x-axis.

Set the real voxel size in y-axis.

Set the real voxel size in z-axis.

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

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

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

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

CDensityVolume& mds::img::CDensityVolume::setVoxel ( double  dDX,
double  dDY,
double  dDZ 
)

Sets voxel dimensions.

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

Subsample the volume.

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

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

Volume data storage.

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

Real voxel size.

double mds::img::CDensityVolume::m_dDY [protected]
double mds::img::CDensityVolume::m_dDZ [protected]
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, inherited]

Volume margin size.

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

Volume dimensions.

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

Offsets used by subscripting functions.

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

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

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