MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class template representing a rectangular box within an existing volume. More...
#include <mdsVolumeView.h>
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 CVolumeBase< CRectBox < V > > | tBase |
Base class. | |
typedef V | tVolume |
Volume type. | |
typedef V::tVoxel | tVoxel |
Voxel type. | |
Public Member Functions | |
tVoxel & | at (tSize x, tSize y, tSize z) |
Returns the voxel [x][y][z]. | |
const tVoxel & | at (tSize x, tSize y, tSize z) const |
tVoxel & | at (tSize i) |
Returns the subscripted voxel. | |
const tVoxel & | at (tSize i) const |
void | copyFrom (const tVoxel *pSrc) |
Fills the box using a given input buffer. | |
void | copyTo (tVoxel *pDst) const |
Copies the box data to the output buffer. | |
CRectBox (const tVolume &Volume, tSize x, tSize y, tSize z, tSize XSize, tSize YSize, tSize ZSize) | |
Constructor... | |
CRectBox (const tVolume &Volume, const CPoint3i &Pos, const CSize3i &Size) | |
Yet another constructor... | |
CRectBox (const tVolume &Volume, const CRange &XRange, const CRange &YRange, const CRange &ZRange) | |
Yet another constructor... | |
CRectBox (const CRectBox &Box) | |
Copy constructor. | |
tSize | depth () const |
CRectBox & | fill (const tVoxel &c) |
Fills the box using a given voxel value. | |
template<class Function > | |
Function | forEach (Function Func) |
Calls a function object for every voxel. | |
template<class Function > | |
Function | forEach (Function Func) |
Calls a function object for every voxel in the box. | |
template<class Function > | |
Function | forEach (Function Func) const |
Calls a function object for every voxel in the box. | |
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 the voxel [x][y][z]. | |
tVolume & | getImpl () |
Returns reference to the volume data implementation. | |
const tVolume & | getImpl () const |
tSize | getMargin () const |
Returns the volume Margin size in voxels. | |
CPoint3i & | getPos () |
Returns position of the left upper corner. | |
const CPoint3i & | getPos () const |
CSize3i & | getSize () |
Returns size of the rectangle. | |
const CSize3i & | getSize () const |
tVolume & | getVolumeRef () const |
Returns reference to the original volume. | |
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 |
tVoxel & | operator() (tSize x, tSize y, tSize z) |
Returns the subscripted voxel [x][y][z]. | |
const tVoxel & | operator() (tSize x, tSize y, tSize z) const |
tVoxel & | operator() (tSize i) |
Returns the subscripted voxel. | |
const tVoxel & | operator() (tSize i) const |
template<class Derived > | |
CRectBox< V > & | operator*= (const CVolumeBase< Derived > &Volume) |
template<class Derived > | |
CRectBox & | operator*= (const CVolumeBase< Derived > &Volume) |
Voxel wise product. | |
template<typename U > | |
CRectBox< V > & | operator*= (const U &c) |
template<typename U > | |
CRectBox & | operator*= (const U &c) |
Multiplies all voxels by scalar. | |
template<class Derived > | |
CRectBox< V > & | operator+= (const CVolumeBase< Derived > &Volume) |
template<typename U > | |
CRectBox< V > & | operator+= (const U &c) |
template<class Derived > | |
CRectBox & | operator+= (const CVolumeBase< Derived > &Volume) |
Voxel wise addition. | |
template<typename U > | |
CRectBox & | operator+= (const U &c) |
Adds scalar to all voxels. | |
template<class Derived > | |
CRectBox< V > & | operator-= (const CVolumeBase< Derived > &Volume) |
template<class Derived > | |
CRectBox & | operator-= (const CVolumeBase< Derived > &Volume) |
Voxel wise subtraction. | |
template<typename U > | |
CRectBox< V > & | operator-= (const U &c) |
template<typename U > | |
CRectBox & | operator-= (const U &c) |
Subtracts scalar from all voxels. | |
template<class Derived > | |
CRectBox< V > & | operator/= (const CVolumeBase< Derived > &Volume) |
template<class Derived > | |
CRectBox & | operator/= (const CVolumeBase< Derived > &Volume) |
Voxel wise division. | |
template<typename U > | |
CRectBox< V > & | operator/= (const U &c) |
template<typename U > | |
CRectBox & | operator/= (const U &c) |
Divides all voxels by scalar. | |
template<class Function > | |
Function | pforEach (Function Func) |
Calls a function object for every voxel in the box. | |
template<class Function > | |
Function | pforEach (Function Func) const |
Calls a function object for every voxel in the box. | |
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. | |
tVolume & | set (tSize x, tSize y, tSize z, const tVoxel &Value) |
Sets the voxel at the position [x][y][z]. | |
CRectBox & | set (tSize x, tSize y, tSize z, const tVoxel &Value) |
Sets the voxel at the position [x][y][z]. | |
tVolume & | set (tSize i, const tVoxel &Value) |
Sets the subscripted voxel. | |
CRectBox & | set (tSize i, const tVoxel &Value) |
Sets the subsripted voxel. | |
tSize | width () const |
Returns the volume size (dimensions). | |
Protected Member Functions | |
CRectBox & | operator= (const CRectBox &) |
Proctected assignment operator. | |
Protected Attributes | |
CPoint3i | m_Pos |
Coordinates of the box origin. | |
CSize3i | m_Size |
Size of the box. | |
tVolume & | m_Volume |
Reference to the original volume. |
Class template representing a rectangular box within an existing volume.
typedef CVolumeBase<CRectBox<V> > mds::img::CRectBox< V >::tBase |
Base class.
typedef V mds::img::CRectBox< V >::tVolume |
Volume type.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
typedef V::tVoxel mds::img::CRectBox< V >::tVoxel |
Voxel type.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
anonymous enum |
CRectBox::CRectBox | ( | const tVolume & | Volume, |
tSize | x, | ||
tSize | y, | ||
tSize | z, | ||
tSize | XSize, | ||
tSize | YSize, | ||
tSize | ZSize | ||
) |
Constructor...
CRectBox::CRectBox | ( | const tVolume & | Volume, |
const CPoint3i & | Pos, | ||
const CSize3i & | Size | ||
) |
Yet another constructor...
CRectBox::CRectBox | ( | const tVolume & | Volume, |
const CRange & | XRange, | ||
const CRange & | YRange, | ||
const CRange & | ZRange | ||
) |
Yet another constructor...
mds::img::CRectBox< V >::CRectBox | ( | const CRectBox< V > & | Box | ) |
Copy constructor.
Returns the voxel [x][y][z].
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tVoxel& mds::img::CRectBox< V >::at | ( | tSize | i | ) |
Returns the subscripted voxel.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
const tVoxel& mds::img::CRectBox< V >::at | ( | tSize | i | ) | const |
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
void CRectBox::copyFrom | ( | const tVoxel * | pSrc | ) |
Fills the box using a given input buffer.
void CRectBox::copyTo | ( | tVoxel * | pDst | ) | const |
Copies the box data to the output buffer.
tSize mds::img::CRectBox< V >::depth | ( | ) | const |
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
CRectBox< V > & CRectBox::fill | ( | const tVoxel & | c | ) |
Fills the box using a given voxel value.
Function mds::img::CRectBox< V >::forEach | ( | Function | Func | ) |
Calls a function object for every voxel.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
Function mds::img::CRectBox< V >::forEach | ( | Function | Func | ) |
Calls a function object for every voxel in the box.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
Function mds::img::CRectBox< V >::forEach | ( | Function | Func | ) | const |
Calls a function object for every voxel in the box.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
Function mds::img::CRectBox< V >::forEach | ( | Function | Func | ) | const |
Calls a function object for every voxel.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
Calculates index of the voxel [x][y][z].
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tVolume& mds::img::CVolumeBase< CRectBox< V > >::getImpl | ( | ) | [inherited] |
Returns reference to the volume data implementation.
const tVolume& mds::img::CVolumeBase< CRectBox< V > >::getImpl | ( | ) | const [inherited] |
tSize mds::img::CRectBox< V >::getMargin | ( | ) | const |
Returns the volume Margin size in voxels.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
CPoint3i& mds::img::CRectBox< V >::getPos | ( | ) |
Returns position of the left upper corner.
const CPoint3i& mds::img::CRectBox< V >::getPos | ( | ) | const |
CSize3i& mds::img::CRectBox< V >::getSize | ( | ) |
Returns size of the rectangle.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
const CSize3i& mds::img::CRectBox< V >::getSize | ( | ) | const |
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tVolume& mds::img::CRectBox< V >::getVolumeRef | ( | ) | const |
Returns reference to the original volume.
tSize mds::img::CRectBox< V >::getXOffset | ( | ) | const |
Returns offset between two neigbouring voxels in x-axis.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tSize mds::img::CRectBox< V >::getXSize | ( | ) | const |
Returns the volume size (dimensions).
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tSize mds::img::CRectBox< V >::getYOffset | ( | ) | const |
Returns offset between two neigbouring voxels in y-axis.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tSize mds::img::CRectBox< V >::getYSize | ( | ) | const |
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tSize mds::img::CRectBox< V >::getZOffset | ( | ) | const |
Returns offset between two neigbouring voxels in z-axis.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tSize mds::img::CRectBox< V >::getZSize | ( | ) | const |
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tSize mds::img::CRectBox< V >::height | ( | ) | const |
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tVoxel& mds::img::CRectBox< V >::operator() | ( | tSize | x, |
tSize | y, | ||
tSize | z | ||
) |
Returns the subscripted voxel [x][y][z].
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
const tVoxel& mds::img::CRectBox< V >::operator() | ( | tSize | x, |
tSize | y, | ||
tSize | z | ||
) | const |
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tVoxel& mds::img::CRectBox< V >::operator() | ( | tSize | i | ) |
Returns the subscripted voxel.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
const tVoxel& mds::img::CRectBox< V >::operator() | ( | tSize | i | ) | const |
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
CRectBox<V>& mds::img::CRectBox< V >::operator*= | ( | const CVolumeBase< Derived > & | Volume | ) |
CRectBox< V > & mds::img::CRectBox< V >::operator*= | ( | const CVolumeBase< Derived > & | Volume | ) |
Voxel wise product.
CRectBox<V>& mds::img::CRectBox< V >::operator*= | ( | const U & | c | ) |
CRectBox< V > & mds::img::CRectBox< V >::operator*= | ( | const U & | c | ) |
Multiplies all voxels by scalar.
CRectBox<V>& mds::img::CRectBox< V >::operator+= | ( | const CVolumeBase< Derived > & | Volume | ) |
CRectBox<V>& mds::img::CRectBox< V >::operator+= | ( | const U & | c | ) |
CRectBox< V > & mds::img::CRectBox< V >::operator+= | ( | const CVolumeBase< Derived > & | Volume | ) |
Voxel wise addition.
CRectBox< V > & mds::img::CRectBox< V >::operator+= | ( | const U & | c | ) |
Adds scalar to all voxels.
CRectBox<V>& mds::img::CRectBox< V >::operator-= | ( | const CVolumeBase< Derived > & | Volume | ) |
CRectBox< V > & mds::img::CRectBox< V >::operator-= | ( | const CVolumeBase< Derived > & | Volume | ) |
Voxel wise subtraction.
CRectBox<V>& mds::img::CRectBox< V >::operator-= | ( | const U & | c | ) |
CRectBox< V > & mds::img::CRectBox< V >::operator-= | ( | const U & | c | ) |
Subtracts scalar from all voxels.
CRectBox<V>& mds::img::CRectBox< V >::operator/= | ( | const CVolumeBase< Derived > & | Volume | ) |
CRectBox< V > & mds::img::CRectBox< V >::operator/= | ( | const CVolumeBase< Derived > & | Volume | ) |
Voxel wise division.
CRectBox<V>& mds::img::CRectBox< V >::operator/= | ( | const U & | c | ) |
CRectBox< V > & mds::img::CRectBox< V >::operator/= | ( | const U & | c | ) |
Divides all voxels by scalar.
CRectBox& mds::img::CRectBox< V >::operator= | ( | const CRectBox< V > & | ) | [protected] |
Proctected assignment operator.
Function mds::img::CRectBox< V >::pforEach | ( | Function | Func | ) |
Calls a function object for every voxel in the box.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
Function mds::img::CRectBox< V >::pforEach | ( | Function | Func | ) | const |
Calls a function object for every voxel in the box.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
Function mds::img::CRectBox< V >::pforEach | ( | Function | Func | ) |
Calls a function object for every voxel.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
Function mds::img::CRectBox< V >::pforEach | ( | Function | Func | ) | const |
Calls a function object for every voxel.
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
tVolume& mds::img::CVolumeBase< CRectBox< V > >::set | ( | tSize | x, |
tSize | y, | ||
tSize | z, | ||
const tVoxel & | Value | ||
) | [inherited] |
Sets the voxel at the position [x][y][z].
CRectBox& mds::img::CRectBox< V >::set | ( | tSize | x, |
tSize | y, | ||
tSize | z, | ||
const tVoxel & | Value | ||
) |
Sets the voxel at the position [x][y][z].
Sets the subscripted voxel.
CRectBox& mds::img::CRectBox< V >::set | ( | tSize | i, |
const tVoxel & | Value | ||
) |
Sets the subsripted voxel.
tSize mds::img::CRectBox< V >::width | ( | ) | const |
Returns the volume size (dimensions).
Reimplemented from mds::img::CVolumeBase< CRectBox< V > >.
CPoint3i mds::img::CRectBox< V >::m_Pos [protected] |
Coordinates of the box origin.
CSize3i mds::img::CRectBox< V >::m_Size [protected] |
Size of the box.
tVolume& mds::img::CRectBox< V >::m_Volume [protected] |
Reference to the original volume.