Shapeworks Studio
2.1
Shape analysis software suite
|
#include <itkSparseKernelTransform.h>
Public Types | |
typedef SparseKernelTransform | Self |
typedef Transform< TScalarType, NDimensions, NDimensions > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef Superclass::ScalarType | ScalarType |
typedef Superclass::ParametersType | ParametersType |
typedef Superclass::JacobianType | JacobianType |
typedef Superclass::InputPointType | InputPointType |
typedef Superclass::OutputPointType | OutputPointType |
typedef Superclass::InputVectorType | InputVectorType |
typedef Superclass::OutputVectorType | OutputVectorType |
typedef DefaultStaticMeshTraits< TScalarType, NDimensions, NDimensions, TScalarType, TScalarType > | PointSetTraitsType |
typedef PointSet< InputPointType, NDimensions, PointSetTraitsType > | PointSetType |
typedef PointSetType::Pointer | PointSetPointer |
typedef PointSetType::PointsContainer | PointsContainer |
typedef PointSetType::PointsContainerIterator | PointsIterator |
typedef PointSetType::PointsContainerConstIterator | PointsConstIterator |
typedef itk::VectorContainer< unsigned long, InputVectorType > | VectorSetType |
typedef VectorSetType::Pointer | VectorSetPointer |
typedef Eigen::Matrix< TScalarType, NDimensions, NDimensions > | IMatrixType |
typedef Eigen::Triplet< TScalarType > | TripletType |
typedef Eigen::Matrix< TScalarType, NDimensions, NDimensions > | GMatrixType |
typedef Eigen::SparseMatrix< TScalarType > | LMatrixType |
typedef Eigen::SparseMatrix< TScalarType > | KMatrixType |
typedef Eigen::SparseMatrix< TScalarType > | PMatrixType |
typedef Eigen::Matrix< TScalarType, Eigen::Dynamic, Eigen::Dynamic > | YMatrixType |
typedef Eigen::Matrix< TScalarType, Eigen::Dynamic, Eigen::Dynamic > | WMatrixType |
typedef Eigen::Matrix< TScalarType, Eigen::Dynamic, Eigen::Dynamic > | DMatrixType |
typedef Eigen::Matrix< TScalarType, NDimensions, NDimensions > | AMatrixType |
typedef Eigen::Matrix< TScalarType, NDimensions, 1 > | BMatrixType |
typedef Eigen::Matrix< TScalarType, 1, NDimensions > | RowMatrixType |
typedef Eigen::Matrix< TScalarType, NDimensions, 1 > | ColumnMatrixType |
Public Member Functions | |
itkTypeMacro (SparseKernelTransform, Transform) | |
itkNewMacro (Self) | |
itkStaticConstMacro (SpaceDimension, unsigned int, NDimensions) | |
itkGetObjectMacro (SourceLandmarks, PointSetType) | |
virtual void | SetSourceLandmarks (PointSetType *) |
itkGetObjectMacro (TargetLandmarks, PointSetType) | |
virtual void | SetTargetLandmarks (PointSetType *) |
itkGetObjectMacro (Displacements, VectorSetType) | |
void | ComputeWMatrix (void) const |
virtual OutputPointType | TransformPoint (const InputPointType &thisPoint) const |
virtual void | SetIdentity () |
virtual void | SetParameters (const ParametersType &) |
virtual void | SetFixedParameters (const ParametersType &) |
virtual void | UpdateParameters (void) const |
virtual const ParametersType & | GetParameters (void) const |
virtual const ParametersType & | GetFixedParameters (void) const |
virtual void | ComputeJacobianWithRespectToParameters (const InputPointType &in, JacobianType &jacobian) const |
virtual void | SetStiffness (double stiffness) |
itkGetMacro (Stiffness, double) | |
Public Attributes | |
PointSetPointer | m_SourceLandmarks |
PointSetPointer | m_TargetLandmarks |
Protected Member Functions | |
void | PrintSelf (std::ostream &os, Indent indent) const |
virtual const GMatrixType & | ComputeG (const InputVectorType &landmarkVector) const |
virtual const GMatrixType & | ComputeReflexiveG (PointsIterator) const |
virtual void | ComputeDeformationContribution (const InputPointType &inputPoint, OutputPointType &result) const |
void | ComputeK () const |
void | ComputeL () const |
void | ComputeP () const |
void | ComputeY () const |
void | ComputeD () const |
void | ReorganizeW (void) const |
Protected Attributes | |
double | m_Stiffness |
VectorSetPointer | m_Displacements |
LMatrixType | m_LMatrix |
LMatrixType | m_LMatrixInverse |
KMatrixType | m_KMatrix |
PMatrixType | m_PMatrix |
YMatrixType | m_YMatrix |
WMatrixType | m_WMatrix |
DMatrixType | m_DMatrix |
AMatrixType | m_AMatrix |
BMatrixType | m_BVector |
GMatrixType | m_GMatrix |
bool | m_WMatrixComputed |
bool | m_LMatrixComputed |
bool | m_LInverseComputed |
IMatrixType | m_I |
Intended to be a base class for elastic body spline and thin plate spline. This is implemented in as straightforward a manner as possible from the IEEE TMI paper by Davis, Khotanzad, Flamig, and Harms, Vol. 16, No. 3 June 1997. Notation closely follows their paper, so if you have it in front of you, this code will make a lot more sense.
SparseKernelTransform: Provides support for defining source and target landmarks Defines a number of data types used in the computations Defines the mathematical framework used to compute all splines, so that subclasses need only provide a kernel specific to that spline
This formulation allows the stiffness of the spline to be adjusted, allowing the spline to vary from interpolating the landmarks to approximating the landmarks. This part of the formulation is based on the short paper by R. Sprengel, K. Rohr, H. Stiehl. "Thin-Plate Spline Approximation for Image Registration". In 18th International Conference of the IEEE Engineering in Medicine and Biology Society. 1996.
This class was modified to support its use in the ITK registration framework by Rupert Brooks, McGill Centre for Intelligent Machines, Montreal, Canada March 2007. See the Insight Journal Paper by Brooks, R., Arbel, T. "Improvements to the itk::KernelTransform and its subclasses."
Definition at line 76 of file itkSparseKernelTransform.h.
typedef Eigen::Matrix<TScalarType, NDimensions, NDimensions> itk::SparseKernelTransform< TScalarType, NDimensions >::AMatrixType |
'A' matrix typedef. Rotational part of the Affine component
Definition at line 249 of file itkSparseKernelTransform.h.
typedef Eigen::Matrix<TScalarType,NDimensions,1> itk::SparseKernelTransform< TScalarType, NDimensions >::BMatrixType |
'B' matrix typedef. Translational part of the Affine component
Definition at line 253 of file itkSparseKernelTransform.h.
typedef Eigen::Matrix<TScalarType,NDimensions,1> itk::SparseKernelTransform< TScalarType, NDimensions >::ColumnMatrixType |
Column matrix typedef.
Definition at line 261 of file itkSparseKernelTransform.h.
typedef Eigen::Matrix<TScalarType, Eigen::Dynamic, Eigen::Dynamic> itk::SparseKernelTransform< TScalarType, NDimensions >::DMatrixType |
'D' matrix typedef. Deformation component
Definition at line 245 of file itkSparseKernelTransform.h.
typedef Eigen::Matrix<TScalarType, NDimensions, NDimensions> itk::SparseKernelTransform< TScalarType, NDimensions >::GMatrixType |
'G' matrix typedef.
Definition at line 220 of file itkSparseKernelTransform.h.
typedef Eigen::Matrix<TScalarType, NDimensions, NDimensions> itk::SparseKernelTransform< TScalarType, NDimensions >::IMatrixType |
'I' (identity) matrix typedef.
Definition at line 155 of file itkSparseKernelTransform.h.
typedef Superclass::InputPointType itk::SparseKernelTransform< TScalarType, NDimensions >::InputPointType |
Standard coordinate point type for this class.
Definition at line 105 of file itkSparseKernelTransform.h.
typedef Superclass::InputVectorType itk::SparseKernelTransform< TScalarType, NDimensions >::InputVectorType |
Standard vector type for this class.
Definition at line 109 of file itkSparseKernelTransform.h.
typedef Superclass::JacobianType itk::SparseKernelTransform< TScalarType, NDimensions >::JacobianType |
Jacobian type.
Definition at line 102 of file itkSparseKernelTransform.h.
typedef Eigen::SparseMatrix<TScalarType> itk::SparseKernelTransform< TScalarType, NDimensions >::KMatrixType |
'K' matrix typedef.
Definition at line 228 of file itkSparseKernelTransform.h.
typedef Eigen::SparseMatrix<TScalarType> itk::SparseKernelTransform< TScalarType, NDimensions >::LMatrixType |
'L' matrix typedef.
Definition at line 224 of file itkSparseKernelTransform.h.
typedef Superclass::ParametersType itk::SparseKernelTransform< TScalarType, NDimensions >::ParametersType |
Parameters type.
Definition at line 99 of file itkSparseKernelTransform.h.
typedef Eigen::SparseMatrix<TScalarType> itk::SparseKernelTransform< TScalarType, NDimensions >::PMatrixType |
'P' matrix typedef.
Definition at line 232 of file itkSparseKernelTransform.h.
typedef DefaultStaticMeshTraits<TScalarType, NDimensions, NDimensions, TScalarType, TScalarType> itk::SparseKernelTransform< TScalarType, NDimensions >::PointSetTraitsType |
PointList typedef. This type is used for maintaining lists of points, specifically, the source and target landmark lists.
Definition at line 118 of file itkSparseKernelTransform.h.
typedef Eigen::Matrix<TScalarType,1,NDimensions> itk::SparseKernelTransform< TScalarType, NDimensions >::RowMatrixType |
Row matrix typedef.
Definition at line 257 of file itkSparseKernelTransform.h.
typedef Superclass::ScalarType itk::SparseKernelTransform< TScalarType, NDimensions >::ScalarType |
Scalar type.
Definition at line 96 of file itkSparseKernelTransform.h.
typedef SparseKernelTransform itk::SparseKernelTransform< TScalarType, NDimensions >::Self |
Standard class typedefs.
Definition at line 81 of file itkSparseKernelTransform.h.
typedef Eigen::Triplet<TScalarType> itk::SparseKernelTransform< TScalarType, NDimensions >::TripletType |
triplets used to fill sparse matrices.
Definition at line 217 of file itkSparseKernelTransform.h.
typedef itk::VectorContainer<unsigned long,InputVectorType> itk::SparseKernelTransform< TScalarType, NDimensions >::VectorSetType |
VectorSet typedef.
Definition at line 126 of file itkSparseKernelTransform.h.
typedef Eigen::Matrix<TScalarType, Eigen::Dynamic, Eigen::Dynamic> itk::SparseKernelTransform< TScalarType, NDimensions >::WMatrixType |
'W' matrix typedef.
Definition at line 241 of file itkSparseKernelTransform.h.
typedef Eigen::Matrix<TScalarType, Eigen::Dynamic, Eigen::Dynamic> itk::SparseKernelTransform< TScalarType, NDimensions >::YMatrixType |
'Y' matrix typedef.
Definition at line 237 of file itkSparseKernelTransform.h.
|
protected |
Compute displacements .
Definition at line 199 of file itkSparseKernelTransform.hxx.
|
protectedvirtual |
Compute the contribution of the landmarks weighted by the kernel funcion to the global deformation of the space
Default implementation of the the method. This can be overloaded in transforms whose kernel produce diagonal G matrices.
Reimplemented in itk::CompactlySupportedRBFSparseKernelTransform< TScalarType, NDimensions >.
Definition at line 170 of file itkSparseKernelTransform.hxx.
|
protectedvirtual |
Compute G(x) This is essentially the kernel of the transform. By overriding this method, we can obtain (among others): Elastic body spline Thin plate spline Volume spline
Reimplemented in itk::CompactlySupportedRBFSparseKernelTransform< TScalarType, NDimensions >.
Definition at line 133 of file itkSparseKernelTransform.hxx.
|
protected |
Compute K matrix.
Definition at line 417 of file itkSparseKernelTransform.hxx.
|
protected |
Compute L matrix.
postponed till needing the jacobian for this class
Definition at line 351 of file itkSparseKernelTransform.hxx.
|
protected |
Compute P matrix.
Definition at line 512 of file itkSparseKernelTransform.hxx.
|
protectedvirtual |
Compute a G(x) for a point to itself (i.e. for the block diagonal elements of the matrix K. Parameter indicates for which landmark the reflexive G is to be computed. The default implementation for the reflexive contribution is a diagonal matrix where the diagonal elements are the stiffness of the spline.
Definition at line 148 of file itkSparseKernelTransform.hxx.
void itk::SparseKernelTransform< TScalarType, NDimensions >::ComputeWMatrix | ( | void | ) | const |
Compute W matrix.
Definition at line 225 of file itkSparseKernelTransform.hxx.
|
protected |
Compute Y matrix.
Definition at line 563 of file itkSparseKernelTransform.hxx.
|
virtual |
Get Transform Fixed Parameters - Gets the Target Landmarks
Definition at line 893 of file itkSparseKernelTransform.hxx.
|
virtual |
Get the Transformation Parameters - Gets the Source Landmarks
Definition at line 879 of file itkSparseKernelTransform.hxx.
itk::SparseKernelTransform< TScalarType, NDimensions >::itkGetObjectMacro | ( | SourceLandmarks | , |
PointSetType | |||
) |
Get the source landmarks list, which we will denote .
itk::SparseKernelTransform< TScalarType, NDimensions >::itkGetObjectMacro | ( | TargetLandmarks | , |
PointSetType | |||
) |
Get the target landmarks list, which we will denote .
itk::SparseKernelTransform< TScalarType, NDimensions >::itkGetObjectMacro | ( | Displacements | , |
VectorSetType | |||
) |
Get the displacements list, which we will denote , where .
itk::SparseKernelTransform< TScalarType, NDimensions >::itkNewMacro | ( | Self | ) |
New macro for creation of through a Smart Pointer
itk::SparseKernelTransform< TScalarType, NDimensions >::itkStaticConstMacro | ( | SpaceDimension | , |
unsigned | int, | ||
NDimensions | |||
) |
Dimension of the domain space.
itk::SparseKernelTransform< TScalarType, NDimensions >::itkTypeMacro | ( | SparseKernelTransform< TScalarType, NDimensions > | , |
Transform | |||
) |
Run-time type information (and related methods).
|
protected |
Reorganize the components of W into D (deformable), A (rotation part of affine) and B (translational part of affine ) components.
Definition at line 600 of file itkSparseKernelTransform.hxx.
|
virtual |
Set Transform Fixed Parameters: To support the transform file writer this function was added to set the target landmarks similar to the SetParameters function setting the source landmarks
Definition at line 807 of file itkSparseKernelTransform.hxx.
|
virtual |
Compute the Jacobian Matrix of the transformation at one point Set the Transformation Parameters to be an identity transform
Definition at line 745 of file itkSparseKernelTransform.hxx.
|
virtual |
Set the Transformation Parameters and update the internal transformation. The parameters represent the source landmarks. Each landmark point is represented by NDimensions doubles. All the landmarks are concatenated to form one flat Array<double>.
Definition at line 759 of file itkSparseKernelTransform.hxx.
|
virtual |
Set the source landmarks list.
Definition at line 79 of file itkSparseKernelTransform.hxx.
|
inlinevirtual |
Stiffness of the spline. A stiffness of zero results in the standard interpolating spline. A non-zero stiffness allows the spline to approximate rather than interpolate the landmarks. Stiffness values are usually rather small, typically in the range of 0.001 to 0.1. The approximating spline formulation is based on the short paper by R. Sprengel, K. Rohr, H. Stiehl. "Thin-Plate Spline Approximation for Image Registration". In 18th International Conference of the IEEE Engineering in Medicine and Biology Society. 1996.
Definition at line 199 of file itkSparseKernelTransform.h.
|
virtual |
Set the target landmarks list.
Definition at line 110 of file itkSparseKernelTransform.hxx.
|
virtual |
Compute L matrix inverse. Compute the position of point in the new space
Definition at line 656 of file itkSparseKernelTransform.hxx.
|
virtual |
Update the Parameters array from the landmarks corrdinates.
Definition at line 851 of file itkSparseKernelTransform.hxx.
|
mutableprotected |
Rotatinoal/Shearing part of the Affine component of the Transformation
Definition at line 348 of file itkSparseKernelTransform.h.
|
mutableprotected |
Translational part of the Affine component of the Transformation
Definition at line 351 of file itkSparseKernelTransform.h.
|
protected |
The list of displacements. d[i] = q[i] - p[i];
Definition at line 320 of file itkSparseKernelTransform.h.
|
mutableprotected |
The Deformation matrix. This is an auxiliary matrix that will hold the Deformation (non-affine) part of the transform. Those are the coefficients that will multiply the Kernel function
Definition at line 345 of file itkSparseKernelTransform.h.
|
mutableprotected |
The G matrix. It is made mutable because m_GMatrix was made an ivar only to avoid copying the matrix at return time
Definition at line 356 of file itkSparseKernelTransform.h.
|
protected |
Identity matrix.
Definition at line 366 of file itkSparseKernelTransform.h.
|
mutableprotected |
The K matrix.
Definition at line 329 of file itkSparseKernelTransform.h.
|
mutableprotected |
Has the L inverse matrix been computed?
Definition at line 363 of file itkSparseKernelTransform.h.
|
mutableprotected |
The L matrix.
Definition at line 323 of file itkSparseKernelTransform.h.
|
mutableprotected |
Has the L matrix been computed?
Definition at line 361 of file itkSparseKernelTransform.h.
|
mutableprotected |
The inverse of L, which we also cache.
Definition at line 326 of file itkSparseKernelTransform.h.
|
mutableprotected |
The P matrix.
Definition at line 332 of file itkSparseKernelTransform.h.
PointSetPointer itk::SparseKernelTransform< TScalarType, NDimensions >::m_SourceLandmarks |
The list of source landmarks, denoted 'p'.
Definition at line 265 of file itkSparseKernelTransform.h.
|
protected |
Stiffness parameter
Definition at line 316 of file itkSparseKernelTransform.h.
PointSetPointer itk::SparseKernelTransform< TScalarType, NDimensions >::m_TargetLandmarks |
The list of target landmarks, denoted 'q'.
Definition at line 268 of file itkSparseKernelTransform.h.
|
mutableprotected |
The W matrix.
Definition at line 338 of file itkSparseKernelTransform.h.
|
mutableprotected |
Has the W matrix been computed?
Definition at line 359 of file itkSparseKernelTransform.h.
|
mutableprotected |
The Y matrix.
Definition at line 335 of file itkSparseKernelTransform.h.