Base class for kernel-based uniform volume. More...
#include <cmtkUniformVolumeInterpolatorBase.h>
Public Types | |
typedef UniformVolumeInterpolatorBase | Self |
This class type. | |
typedef SmartPointer< Self > | SmartPtr |
Smart pointer to this class. | |
typedef SmartConstPointer< Self > | SmartConstPtr |
Smart pointer-to-const to this class. | |
Public Member Functions | |
UniformVolumeInterpolatorBase (const UniformVolume &volume) | |
Constructor. | |
virtual | ~UniformVolumeInterpolatorBase () |
Virtual dummy destructor. | |
virtual void | SetVolume (const UniformVolume &volume) |
Set volume. | |
virtual bool | GetDataAt (const Vector3D &v, Types::DataItem &value) const =0 |
Get data at location. | |
virtual Types::DataItem | GetDataDirect (const int *imageGridPoint, const Types::Coordinate *insidePixel) const =0 |
Get data at a pre-computed relative pixel index. | |
Protected Member Functions | |
size_t | GetOffsetFromIndex (const int i, const int j, const int k) const |
Get offset from pixel index. | |
Protected Attributes | |
std::vector< Types::DataItem > | m_VolumeDataArray |
Pointer to volume data array. | |
DataGrid::IndexType | m_VolumeDims |
Image dimensions. | |
UniformVolume::CoordinateVectorType | m_VolumeDeltas |
Image pixel size. | |
UniformVolume::CoordinateVectorType | m_VolumeOffset |
Image offset vector. | |
int | m_NextJ |
Index increment when increasing "j" pixel index (i.e., moving to next image row). | |
int | m_NextK |
Index increment when increasing "k" pixel index (i.e., moving to next image plane). |
Base class for kernel-based uniform volume.
Definition at line 54 of file cmtkUniformVolumeInterpolatorBase.h.
This class type.
Reimplemented in cmtk::UniformVolumeInterpolator< TInterpolationFunction >, and cmtk::UniformVolumeInterpolatorPartialVolume.
Definition at line 58 of file cmtkUniformVolumeInterpolatorBase.h.
Smart pointer-to-const to this class.
Definition at line 64 of file cmtkUniformVolumeInterpolatorBase.h.
Smart pointer to this class.
Reimplemented in cmtk::UniformVolumeInterpolator< TInterpolationFunction >, and cmtk::UniformVolumeInterpolatorPartialVolume.
Definition at line 61 of file cmtkUniformVolumeInterpolatorBase.h.
cmtk::UniformVolumeInterpolatorBase::UniformVolumeInterpolatorBase | ( | const UniformVolume & | volume ) | [inline] |
Constructor.
Definition at line 67 of file cmtkUniformVolumeInterpolatorBase.h.
virtual cmtk::UniformVolumeInterpolatorBase::~UniformVolumeInterpolatorBase | ( | ) | [inline, virtual] |
Virtual dummy destructor.
Definition at line 73 of file cmtkUniformVolumeInterpolatorBase.h.
virtual bool cmtk::UniformVolumeInterpolatorBase::GetDataAt | ( | const Vector3D & | v, |
Types::DataItem & | value | ||
) | const [pure virtual] |
Get data at location.
This function performs interpolation of one value from m_Volume at location v using the interpolation function given as the class template parameter.
This function should return true if a value can be interpolated from m_Volume at v, and it should return false if v is outside the range where a value can be interpolated (i.e., outside the volume boundaries).
v | Location for interpolation. |
value | The interpolated value is stored via this reference |
Implemented in cmtk::UniformVolumeInterpolator< TInterpolationFunction >, and cmtk::UniformVolumeInterpolatorPartialVolume.
Referenced by cmtk::ReformatVolume::GetTransformedReferenceGrey().
virtual Types::DataItem cmtk::UniformVolumeInterpolatorBase::GetDataDirect | ( | const int * | imageGridPoint, |
const Types::Coordinate * | insidePixel | ||
) | const [pure virtual] |
Get data at a pre-computed relative pixel index.
This is faster if we already know the pixel index and fractional coordinate of a location.
imageGridPoint | Grid index in image |
insidePixel | Relative position inside indexed pixel |
Implemented in cmtk::UniformVolumeInterpolator< TInterpolationFunction >, and cmtk::UniformVolumeInterpolatorPartialVolume.
size_t cmtk::UniformVolumeInterpolatorBase::GetOffsetFromIndex | ( | const int | i, |
const int | j, | ||
const int | k | ||
) | const [inline, protected] |
Get offset from pixel index.
i | Grid index #0 |
j | Grid index #1 |
k | Grid index #2 |
Definition at line 120 of file cmtkUniformVolumeInterpolatorBase.h.
void cmtk::UniformVolumeInterpolatorBase::SetVolume | ( | const UniformVolume & | volume ) | [virtual] |
Set volume.
This function sets a smart pointer to the volume the class will interpolate from. It may also perform some pre-computations to speed up interpolation, such as indexing etc. It does not perform any interpolation itself.
volume | Source volume for interpolation |
Definition at line 39 of file cmtkUniformVolumeInterpolatorBase.cxx.
References cmtk::UniformVolume::Deltas(), cmtk::TypedArray::Get(), cmtk::TypedArray::GetDataSize(), cmtk::DataGrid::GetDims(), and cmtk::Volume::m_Offset.
int cmtk::UniformVolumeInterpolatorBase::m_NextJ [protected] |
Index increment when increasing "j" pixel index (i.e., moving to next image row).
Definition at line 114 of file cmtkUniformVolumeInterpolatorBase.h.
int cmtk::UniformVolumeInterpolatorBase::m_NextK [protected] |
Index increment when increasing "k" pixel index (i.e., moving to next image plane).
Definition at line 117 of file cmtkUniformVolumeInterpolatorBase.h.
std::vector<Types::DataItem> cmtk::UniformVolumeInterpolatorBase::m_VolumeDataArray [protected] |
Pointer to volume data array.
Definition at line 102 of file cmtkUniformVolumeInterpolatorBase.h.
Image pixel size.
Definition at line 108 of file cmtkUniformVolumeInterpolatorBase.h.
Image dimensions.
Definition at line 105 of file cmtkUniformVolumeInterpolatorBase.h.
Image offset vector.
Definition at line 111 of file cmtkUniformVolumeInterpolatorBase.h.