Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

cmtk::UniformVolumeInterpolatorBase Class Reference
[cmtkBase Library]

Base class for kernel-based uniform volume. More...

#include <cmtkUniformVolumeInterpolatorBase.h>

Inheritance diagram for cmtk::UniformVolumeInterpolatorBase:
Inheritance graph
[legend]
Collaboration diagram for cmtk::UniformVolumeInterpolatorBase:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
UniformVolumeInterpolatorBase 
Self
 This class type.
typedef SmartPointer< SelfSmartPtr
 Smart pointer to this class.
typedef SmartConstPointer< SelfSmartConstPtr
 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::DataItemm_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).

Detailed Description

Base class for kernel-based uniform volume.

Definition at line 54 of file cmtkUniformVolumeInterpolatorBase.h.


Member Typedef Documentation

Smart pointer-to-const to this class.

Definition at line 64 of file cmtkUniformVolumeInterpolatorBase.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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).

Returns:
True is the interpolation was successful and a valid value is returned in "value".
Parameters:
vLocation for interpolation.
valueThe 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.

Returns:
Interpolated value.
Parameters:
imageGridPointGrid index in image
insidePixelRelative 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.

Parameters:
iGrid index #0
jGrid index #1
kGrid 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.

Parameters:
volumeSource 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.


Member Data Documentation

Index increment when increasing "j" pixel index (i.e., moving to next image row).

Definition at line 114 of file cmtkUniformVolumeInterpolatorBase.h.

Index increment when increasing "k" pixel index (i.e., moving to next image plane).

Definition at line 117 of file cmtkUniformVolumeInterpolatorBase.h.

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines