Pre-compute transformation for grid locations in a uniform volume. More...
#include <cmtkSplineWarpXformUniformVolume.h>
Public Types | |
typedef SplineWarpXformUniformVolume | Self |
This class. | |
typedef XformUniformVolume | Superclass |
Parent class. | |
typedef SmartPointer< Self > | SmartPtr |
Smart pointer to this class. | |
typedef SmartConstPointer< Self > | SmartConstPtr |
Smart pointer-to-const to this class. | |
Public Member Functions | |
SplineWarpXformUniformVolume (const UniformVolume &volume, const SplineWarpXform::SmartConstPtr &xform) | |
Constructor. | |
virtual | ~SplineWarpXformUniformVolume () |
Virtual destructor. | |
virtual void | GetTransformedGrid (Vector3D &v, const int idxX, const int idxY, const int idxZ) const |
Get transformed location of linked grid pixel. | |
virtual void | GetTransformedGridRow (Vector3D *const v, const size_t numPoints, const int idxX, const int idxY, const int idxZ) const |
Get transformed locations of a series (scanline) of linked grid pixels. | |
Private Member Functions | |
void | RegisterVolume (const UniformVolume &volume) |
Register axes points of the volume to be deformed. | |
void | RegisterVolumeAxis (const int, const Types::Coordinate delta, const Types::Coordinate origin, const int, const Types::Coordinate, std::vector< int > &g, std::vector< Types::Coordinate > &spline, std::vector< Types::Coordinate > &dspline) |
Register a single axis of the uniform volume to be deformed. | |
Private Attributes | |
const SplineWarpXform::SmartConstPtr | m_Xform |
The linked transformation. | |
int | GridPointOffset [48] |
Relative offsets of all control points in a 4 x 4 x 4 neighborhood. | |
Precomputed grid indices. | |
These arrays hold the precomputed grid indices of the deformed grid's voxels with respect to the control point grid of this deformation. | |
std::vector< int > | gX |
x-axis. | |
std::vector< int > | gY |
y-axis. | |
std::vector< int > | gZ |
z-axis. | |
Precomputed spline coefficients. | |
These arrays hold the precomputed spline coefficients for deforming the voxel locations in the associated deformed grid. | |
std::vector< Types::Coordinate > | splineX |
x-axis. | |
std::vector< Types::Coordinate > | splineY |
y-axis. | |
std::vector< Types::Coordinate > | splineZ |
z-axis. | |
Precomputed derivative spline coefficients. | |
These arrays hold the precomputed derivatives of the spline coefficients. This allows for rapid evaluation of the Jacobian determinant. | |
std::vector< Types::Coordinate > | dsplineX |
x-axis. | |
std::vector< Types::Coordinate > | dsplineY |
y-axis. | |
std::vector< Types::Coordinate > | dsplineZ |
z-axis. |
Pre-compute transformation for grid locations in a uniform volume.
Definition at line 52 of file cmtkSplineWarpXformUniformVolume.h.
This class.
Reimplemented from cmtk::XformUniformVolume.
Definition at line 58 of file cmtkSplineWarpXformUniformVolume.h.
Smart pointer-to-const to this class.
Reimplemented from cmtk::XformUniformVolume.
Definition at line 67 of file cmtkSplineWarpXformUniformVolume.h.
Smart pointer to this class.
Reimplemented from cmtk::XformUniformVolume.
Definition at line 64 of file cmtkSplineWarpXformUniformVolume.h.
Parent class.
Definition at line 61 of file cmtkSplineWarpXformUniformVolume.h.
cmtk::SplineWarpXformUniformVolume::SplineWarpXformUniformVolume | ( | const UniformVolume & | volume, |
const SplineWarpXform::SmartConstPtr & | xform | ||
) |
Constructor.
Definition at line 35 of file cmtkSplineWarpXformUniformVolume.cxx.
References RegisterVolume().
virtual cmtk::SplineWarpXformUniformVolume::~SplineWarpXformUniformVolume | ( | ) | [inline, virtual] |
Virtual destructor.
Definition at line 73 of file cmtkSplineWarpXformUniformVolume.h.
void cmtk::SplineWarpXformUniformVolume::GetTransformedGrid | ( | Vector3D & | v, |
const int | idxX, | ||
const int | idxY, | ||
const int | idxZ | ||
) | const [virtual] |
Get transformed location of linked grid pixel.
Implements cmtk::XformUniformVolume.
Definition at line 86 of file cmtkSplineWarpXformUniformVolume.cxx.
References cmtk::Xform::m_Parameters, cmtk::WarpXform::nextJ, and cmtk::WarpXform::nextK.
Referenced by cmtk::ReformatVolume::PlainReformat().
void cmtk::SplineWarpXformUniformVolume::GetTransformedGridRow | ( | Vector3D *const | v, |
const size_t | numPoints, | ||
const int | idxX, | ||
const int | idxY, | ||
const int | idxZ | ||
) | const [virtual] |
Get transformed locations of a series (scanline) of linked grid pixels.
Implements cmtk::XformUniformVolume.
Definition at line 122 of file cmtkSplineWarpXformUniformVolume.cxx.
References cmtk::Xform::m_Parameters, and cmtk::WarpXform::nextI.
void cmtk::SplineWarpXformUniformVolume::RegisterVolume | ( | const UniformVolume & | volume ) | [private] |
Register axes points of the volume to be deformed.
Definition at line 67 of file cmtkSplineWarpXformUniformVolume.cxx.
References cmtk::WarpXform::InverseSpacing, cmtk::UniformVolume::m_Delta, cmtk::WarpXform::m_Dims, cmtk::DataGrid::m_Dims, cmtk::Volume::m_Offset, cmtk::WarpXform::nextI, cmtk::WarpXform::nextJ, and cmtk::WarpXform::nextK.
Referenced by SplineWarpXformUniformVolume().
void cmtk::SplineWarpXformUniformVolume::RegisterVolumeAxis | ( | const int | dim, |
const Types::Coordinate | delta, | ||
const Types::Coordinate | origin, | ||
const int | cpgDim, | ||
const Types::Coordinate | invCpgSpacing, | ||
std::vector< int > & | g, | ||
std::vector< Types::Coordinate > & | spline, | ||
std::vector< Types::Coordinate > & | dspline | ||
) | [private] |
Register a single axis of the uniform volume to be deformed.
Definition at line 43 of file cmtkSplineWarpXformUniformVolume.cxx.
References cmtk::CubicSpline::ApproxSpline(), and cmtk::CubicSpline::DerivApproxSpline().
std::vector<Types::Coordinate> cmtk::SplineWarpXformUniformVolume::dsplineX [private] |
x-axis.
Definition at line 126 of file cmtkSplineWarpXformUniformVolume.h.
std::vector<Types::Coordinate> cmtk::SplineWarpXformUniformVolume::dsplineY [private] |
y-axis.
Definition at line 128 of file cmtkSplineWarpXformUniformVolume.h.
std::vector<Types::Coordinate> cmtk::SplineWarpXformUniformVolume::dsplineZ [private] |
z-axis.
Definition at line 130 of file cmtkSplineWarpXformUniformVolume.h.
int cmtk::SplineWarpXformUniformVolume::GridPointOffset[48] [private] |
Relative offsets of all control points in a 4 x 4 x 4 neighborhood.
Definition at line 134 of file cmtkSplineWarpXformUniformVolume.h.
std::vector<int> cmtk::SplineWarpXformUniformVolume::gX [private] |
x-axis.
Definition at line 100 of file cmtkSplineWarpXformUniformVolume.h.
std::vector<int> cmtk::SplineWarpXformUniformVolume::gY [private] |
y-axis.
Definition at line 102 of file cmtkSplineWarpXformUniformVolume.h.
std::vector<int> cmtk::SplineWarpXformUniformVolume::gZ [private] |
z-axis.
Definition at line 104 of file cmtkSplineWarpXformUniformVolume.h.
The linked transformation.
Definition at line 85 of file cmtkSplineWarpXformUniformVolume.h.
std::vector<Types::Coordinate> cmtk::SplineWarpXformUniformVolume::splineX [private] |
x-axis.
Definition at line 113 of file cmtkSplineWarpXformUniformVolume.h.
std::vector<Types::Coordinate> cmtk::SplineWarpXformUniformVolume::splineY [private] |
y-axis.
Definition at line 115 of file cmtkSplineWarpXformUniformVolume.h.
std::vector<Types::Coordinate> cmtk::SplineWarpXformUniformVolume::splineZ [private] |
z-axis.
Definition at line 117 of file cmtkSplineWarpXformUniformVolume.h.