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

Class template representing a single row of an existing volume. More...

#include <mdsVolumeView.h>

Inheritance diagram for mds::img::CVolumeRow< V >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { CLASS_VOLUME_VIEW }
 Simple tag of "volume view" classes. More...
enum  { TEMPLATE_PARAMETER_IS_NOT_VOLUME = V::CLASS_VOLUME }
 Check that V is a volume. More...
typedef mds::math::CVectorBase
< CVolumeRow< V > > 
tBase
 Base class.
typedef CVectorTraits
< CVolumeRow< V > >::tElement 
tElement
 Element tyoe.
typedef CVolumeRow< V > tVector
 Vector type.
typedef V tVolume
 Volume type.
typedef V::tVoxel tVoxel
 Voxel type.

Public Member Functions

tVoxelat (tSize x)
 Returns a subscripted voxel of the row.
const tVoxelat (tSize x) const
void copyFrom (const tVoxel *pSrc)
 Fills the row using a given input buffer.
void copyTo (tVoxel *pDst) const
 Copies the row data to the output buffer.
 CVolumeRow (const tVolume &Volume, tSize y, tSize z)
 Constructor.
 CVolumeRow (const CVolumeRow &Row)
 Copy constructor.
CVolumeRowfill (const tVoxel &c)
 Fills the row using a given voxel value.
template<class Function >
Function forEach (Function Func)
 Calls a function object for every voxel in the row.
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every voxel in the row.
template<class Function >
Function forEach (Function Func)
 Calls a function object for every vector element.
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every vector element.
tVectorgetImpl ()
 Returns reference to the vector implementation.
const tVectorgetImpl () const
tSize getSize () const
 Returns the row size.
tSize getStride () const
 Returns stride between two neigbouring elements.
tVoxeloperator() (tSize x)
 Returns a subscripted voxel of the row.
const tVoxeloperator() (tSize x) const
template<class Derived >
CVolumeRowoperator*= (const mds::math::CVectorBase< Derived > &Row)
 Voxel wise product.
template<typename U >
CVolumeRowoperator*= (const U &c)
 Multiplies all voxels by scalar.
template<class Derived >
CVolumeRow< V > & operator*= (const mds::math::CVectorBase< Derived > &Row)
template<typename U >
CVolumeRow< V > & operator*= (const U &c)
template<class Derived >
CVolumeRowoperator+= (const mds::math::CVectorBase< Derived > &Row)
 Voxel wise addition.
template<typename U >
CVolumeRowoperator+= (const U &c)
 Adds scalar to all voxels.
template<class Derived >
CVolumeRow< V > & operator+= (const mds::math::CVectorBase< Derived > &Row)
template<typename U >
CVolumeRow< V > & operator+= (const U &c)
template<class Derived >
CVolumeRowoperator-= (const mds::math::CVectorBase< Derived > &Row)
 Voxel wise subtraction.
template<typename U >
CVolumeRowoperator-= (const U &c)
 Subtracts scalar from all voxels.
template<class Derived >
CVolumeRow< V > & operator-= (const mds::math::CVectorBase< Derived > &Row)
template<typename U >
CVolumeRow< V > & operator-= (const U &c)
template<class Derived >
CVolumeRowoperator/= (const mds::math::CVectorBase< Derived > &Row)
 Voxel wise division.
template<typename U >
CVolumeRowoperator/= (const U &c)
 Divides all voxels by scalar.
template<class Derived >
CVolumeRow< V > & operator/= (const mds::math::CVectorBase< Derived > &Row)
template<typename U >
CVolumeRow< V > & operator/= (const U &c)
template<class Function >
Function pforEach (Function Func)
 Calls a function object for every voxel in the row.
template<class Function >
Function pforEach (Function Func) const
 Calls a function object for every voxel in the row.
template<class Function >
Function pforEach (Function Func)
template<class Function >
Function pforEach (Function Func) const
tVectorset (tSize i, const tElement &Value)
 Sets the vector element at the position [i].
CVolumeRowset (tSize x, const tVoxel &Value)
 Changes value of a voxel in the row.
tSize size () const
 Returns the row size.

Protected Member Functions

CVolumeRowoperator= (const CVolumeRow &)
 Proctected assignment operator.

Protected Attributes

tVolumem_Volume
 Reference to the original volume.
tSize m_y
 Coordinates of the volume row.
tSize m_z

Detailed Description

template<class V>
class mds::img::CVolumeRow< V >

Class template representing a single row of an existing volume.


Member Typedef Documentation

template<class V >
typedef mds::math::CVectorBase<CVolumeRow<V> > mds::img::CVolumeRow< V >::tBase

Base class.

typedef CVectorTraits<CVolumeRow< V > >::tElement mds::math::CVectorBase< CVolumeRow< V > >::tElement [inherited]

Element tyoe.

typedef CVolumeRow< V > mds::math::CVectorBase< CVolumeRow< V > >::tVector [inherited]

Vector type.

template<class V >
typedef V mds::img::CVolumeRow< V >::tVolume

Volume type.

template<class V >
typedef V::tVoxel mds::img::CVolumeRow< V >::tVoxel

Voxel type.


Member Enumeration Documentation

anonymous enum [inherited]

Simple tag of "volume view" classes.

Enumerator:
CLASS_VOLUME_VIEW 
template<class V >
anonymous enum

Check that V is a volume.

You will see name of this enum somewhere in compiler error message if the type V is not volume.

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_VOLUME 

Constructor & Destructor Documentation

template<class V >
CVolumeRow::CVolumeRow ( const tVolume Volume,
tSize  y,
tSize  z 
)

Constructor.

template<class V >
CVolumeRow::CVolumeRow ( const CVolumeRow< V > &  Row)

Copy constructor.


Member Function Documentation

template<class V >
tVoxel& mds::img::CVolumeRow< V >::at ( tSize  x)

Returns a subscripted voxel of the row.

Reimplemented from mds::math::CVectorBase< CVolumeRow< V > >.

template<class V >
const tVoxel& mds::img::CVolumeRow< V >::at ( tSize  x) const
template<class V >
void CVolumeRow::copyFrom ( const tVoxel pSrc)

Fills the row using a given input buffer.

template<class V >
void CVolumeRow::copyTo ( tVoxel pDst) const

Copies the row data to the output buffer.

template<class V >
CVolumeRow< V > & CVolumeRow::fill ( const tVoxel c)

Fills the row using a given voxel value.

template<class V >
template<class Function >
Function mds::img::CVolumeRow< V >::forEach ( Function  Func)

Calls a function object for every voxel in the row.

Reimplemented from mds::math::CVectorBase< CVolumeRow< V > >.

template<class V >
template<class Function >
Function mds::img::CVolumeRow< V >::forEach ( Function  Func) const

Calls a function object for every voxel in the row.

Reimplemented from mds::math::CVectorBase< CVolumeRow< V > >.

template<class V >
template<class Function >
Function mds::img::CVolumeRow< V >::forEach ( Function  Func)

Calls a function object for every vector element.

Reimplemented from mds::math::CVectorBase< CVolumeRow< V > >.

template<class V >
template<class Function >
Function mds::img::CVolumeRow< V >::forEach ( Function  Func) const

Calls a function object for every vector element.

Reimplemented from mds::math::CVectorBase< CVolumeRow< V > >.

tVector& mds::math::CVectorBase< CVolumeRow< V > >::getImpl ( ) [inherited]

Returns reference to the vector implementation.

const tVector& mds::math::CVectorBase< CVolumeRow< V > >::getImpl ( ) const [inherited]
template<class V >
tSize mds::img::CVolumeRow< V >::getSize ( ) const

Returns the row size.

Reimplemented from mds::math::CVectorBase< CVolumeRow< V > >.

template<class V >
tSize mds::img::CVolumeRow< V >::getStride ( ) const

Returns stride between two neigbouring elements.

Reimplemented from mds::math::CVectorBase< CVolumeRow< V > >.

template<class V >
tVoxel& mds::img::CVolumeRow< V >::operator() ( tSize  x)

Returns a subscripted voxel of the row.

Reimplemented from mds::math::CVectorBase< CVolumeRow< V > >.

template<class V >
const tVoxel& mds::img::CVolumeRow< V >::operator() ( tSize  x) const
template<class V >
template<class Derived >
CVolumeRow< V > & mds::img::CVolumeRow< V >::operator*= ( const mds::math::CVectorBase< Derived > &  Row)

Voxel wise product.

template<class V >
template<typename U >
CVolumeRow< V > & mds::img::CVolumeRow< V >::operator*= ( const U &  c)

Multiplies all voxels by scalar.

  • An operator that allows conversion U -> T must be defined!
template<class V >
template<class Derived >
CVolumeRow<V>& mds::img::CVolumeRow< V >::operator*= ( const mds::math::CVectorBase< Derived > &  Row)
template<class V >
template<typename U >
CVolumeRow<V>& mds::img::CVolumeRow< V >::operator*= ( const U &  c)
template<class V >
template<class Derived >
CVolumeRow< V > & mds::img::CVolumeRow< V >::operator+= ( const mds::math::CVectorBase< Derived > &  Row)

Voxel wise addition.

template<class V >
template<typename U >
CVolumeRow< V > & mds::img::CVolumeRow< V >::operator+= ( const U &  c)

Adds scalar to all voxels.

  • An operator that allows conversion from U to T must be defined!
template<class V >
template<class Derived >
CVolumeRow<V>& mds::img::CVolumeRow< V >::operator+= ( const mds::math::CVectorBase< Derived > &  Row)
template<class V >
template<typename U >
CVolumeRow<V>& mds::img::CVolumeRow< V >::operator+= ( const U &  c)
template<class V >
template<class Derived >
CVolumeRow< V > & mds::img::CVolumeRow< V >::operator-= ( const mds::math::CVectorBase< Derived > &  Row)

Voxel wise subtraction.

template<class V >
template<typename U >
CVolumeRow< V > & mds::img::CVolumeRow< V >::operator-= ( const U &  c)

Subtracts scalar from all voxels.

  • An operator that allows conversion U -> T must be defined!
template<class V >
template<class Derived >
CVolumeRow<V>& mds::img::CVolumeRow< V >::operator-= ( const mds::math::CVectorBase< Derived > &  Row)
template<class V >
template<typename U >
CVolumeRow<V>& mds::img::CVolumeRow< V >::operator-= ( const U &  c)
template<class V >
template<class Derived >
CVolumeRow< V > & mds::img::CVolumeRow< V >::operator/= ( const mds::math::CVectorBase< Derived > &  Row)

Voxel wise division.

template<class V >
template<typename U >
CVolumeRow< V > & mds::img::CVolumeRow< V >::operator/= ( const U &  c)

Divides all voxels by scalar.

  • An operator that allows conversion U -> T must be defined!
template<class V >
template<class Derived >
CVolumeRow<V>& mds::img::CVolumeRow< V >::operator/= ( const mds::math::CVectorBase< Derived > &  Row)
template<class V >
template<typename U >
CVolumeRow<V>& mds::img::CVolumeRow< V >::operator/= ( const U &  c)
template<class V >
CVolumeRow& mds::img::CVolumeRow< V >::operator= ( const CVolumeRow< V > &  ) [protected]

Proctected assignment operator.

template<class V >
template<class Function >
Function mds::img::CVolumeRow< V >::pforEach ( Function  Func)

Calls a function object for every voxel in the row.

  • Parallel version.
template<class V >
template<class Function >
Function mds::img::CVolumeRow< V >::pforEach ( Function  Func) const

Calls a function object for every voxel in the row.

  • Parallel version.
template<class V >
template<class Function >
Function mds::img::CVolumeRow< V >::pforEach ( Function  Func)
template<class V >
template<class Function >
Function mds::img::CVolumeRow< V >::pforEach ( Function  Func) const
tVector& mds::math::CVectorBase< CVolumeRow< V > >::set ( tSize  i,
const tElement Value 
) [inherited]

Sets the vector element at the position [i].

template<class V >
CVolumeRow& mds::img::CVolumeRow< V >::set ( tSize  x,
const tVoxel Value 
)

Changes value of a voxel in the row.

template<class V >
tSize mds::img::CVolumeRow< V >::size ( ) const

Returns the row size.

Reimplemented from mds::math::CVectorBase< CVolumeRow< V > >.


Member Data Documentation

template<class V >
tVolume& mds::img::CVolumeRow< V >::m_Volume [protected]

Reference to the original volume.

template<class V >
tSize mds::img::CVolumeRow< V >::m_y [protected]

Coordinates of the volume row.

template<class V >
tSize mds::img::CVolumeRow< V >::m_z [protected]

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