ITK
4.3.0
Insight Segmentation and Registration Toolkit
|
#include <itkKernelTransform.h>
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.
KernelTransform: 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.
Definition at line 63 of file itkKernelTransform.h.
Public Types | |
typedef vnl_matrix_fixed < TScalarType, NDimensions, NDimensions > | AMatrixType |
typedef vnl_vector_fixed < TScalarType, NDimensions > | BMatrixType |
typedef vnl_matrix_fixed < TScalarType, NDimensions, 1 > | ColumnMatrixType |
typedef SmartPointer< const Self > | ConstPointer |
typedef vnl_matrix< TScalarType > | DMatrixType |
typedef vnl_matrix_fixed < TScalarType, NDimensions, NDimensions > | GMatrixType |
typedef vnl_matrix_fixed < TScalarType, NDimensions, NDimensions > | IMatrixType |
typedef Superclass::InputCovariantVectorType | InputCovariantVectorType |
typedef Superclass::InputPointType | InputPointType |
typedef Superclass::InputVectorType | InputVectorType |
typedef Superclass::InputVnlVectorType | InputVnlVectorType |
typedef Superclass::JacobianType | JacobianType |
typedef vnl_matrix< TScalarType > | KMatrixType |
typedef vnl_matrix< TScalarType > | LMatrixType |
typedef Superclass::OutputCovariantVectorType | OutputCovariantVectorType |
typedef Superclass::OutputPointType | OutputPointType |
typedef Superclass::OutputVectorType | OutputVectorType |
typedef Superclass::OutputVnlVectorType | OutputVnlVectorType |
typedef Superclass::ParametersType | ParametersType |
typedef vnl_matrix< TScalarType > | PMatrixType |
typedef SmartPointer< Self > | Pointer |
typedef PointSetType::PointIdentifier | PointIdentifier |
typedef PointSetType::PointsContainerConstIterator | PointsConstIterator |
typedef PointSetType::PointsContainer | PointsContainer |
typedef PointSetType::Pointer | PointSetPointer |
typedef DefaultStaticMeshTraits < TScalarType, NDimensions, NDimensions, TScalarType, TScalarType > | PointSetTraitsType |
typedef PointSet < InputPointType, NDimensions, PointSetTraitsType > | PointSetType |
typedef PointSetType::PointsContainerIterator | PointsIterator |
typedef vnl_matrix_fixed < TScalarType, 1, NDimensions > | RowMatrixType |
typedef Superclass::ScalarType | ScalarType |
typedef KernelTransform | Self |
typedef Transform< TScalarType, NDimensions, NDimensions > | Superclass |
typedef Superclass::TransformCategoryType | TransformCategoryType |
typedef VectorSetType::Pointer | VectorSetPointer |
typedef itk::VectorContainer < SizeValueType, InputVectorType > | VectorSetType |
typedef vnl_matrix< TScalarType > | WMatrixType |
typedef vnl_matrix< TScalarType > | YMatrixType |
Public Types inherited from itk::Transform< TScalarType, NDimensions, NDimensions > | |
typedef SmartPointer< const Self > | ConstPointer |
typedef Array < ParametersValueType > | DerivativeType |
typedef Matrix< double, itkGetStaticConstMacro(OutputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension)> | DirectionChangeMatrix |
typedef CovariantVector < TScalarType, NInputDimensions > | InputCovariantVectorType |
typedef DiffusionTensor3D < TScalarType > | InputDiffusionTensor3DType |
typedef Matrix< double, itkGetStaticConstMacro(InputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension)> | InputDirectionMatrix |
typedef Point< TScalarType, NInputDimensions > | InputPointType |
typedef SymmetricSecondRankTensor < TScalarType, NInputDimensions > | InputSymmetricSecondRankTensorType |
typedef VariableLengthVector < TScalarType > | InputVectorPixelType |
typedef Vector< TScalarType, NInputDimensions > | InputVectorType |
typedef vnl_vector_fixed < TScalarType, NInputDimensions > | InputVnlVectorType |
typedef InverseTransformBaseType::Pointer | InverseTransformBasePointer |
typedef Transform< TScalarType, NOutputDimensions, NInputDimensions > | InverseTransformBaseType |
typedef Array2D < ParametersValueType > | JacobianType |
typedef Matrix< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension)> | MatrixType |
typedef Superclass::NumberOfParametersType | NumberOfParametersType |
typedef CovariantVector < TScalarType, NOutputDimensions > | OutputCovariantVectorType |
typedef DiffusionTensor3D < TScalarType > | OutputDiffusionTensor3DType |
typedef Matrix< double, itkGetStaticConstMacro(OutputSpaceDimension), itkGetStaticConstMacro(OutputSpaceDimension)> | OutputDirectionMatrix |
typedef Point< TScalarType, NOutputDimensions > | OutputPointType |
typedef SymmetricSecondRankTensor < TScalarType, NOutputDimensions > | OutputSymmetricSecondRankTensorType |
typedef VariableLengthVector < TScalarType > | OutputVectorPixelType |
typedef Vector< TScalarType, NOutputDimensions > | OutputVectorType |
typedef vnl_vector_fixed < TScalarType, NOutputDimensions > | OutputVnlVectorType |
typedef Superclass::ParametersType | ParametersType |
typedef Superclass::ParametersValueType | ParametersValueType |
typedef SmartPointer< Self > | Pointer |
typedef TScalarType | ScalarType |
typedef Transform | Self |
typedef TransformBase | Superclass |
Public Types inherited from itk::TransformBase | |
typedef SmartPointer< const Self > | ConstPointer |
typedef IdentifierType | NumberOfParametersType |
typedef OptimizerParameters < ParametersValueType > | ParametersType |
typedef double | ParametersValueType |
typedef SmartPointer< Self > | Pointer |
typedef TransformBase | Self |
typedef Object | Superclass |
enum | TransformCategoryType { UnknownTransformCategory =0, Linear =1, BSpline =2, Spline =3, DisplacementField =4, VelocityField =5 } |
Public Types inherited from itk::Object | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef Object | Self |
typedef LightObject | Superclass |
Public Types inherited from itk::LightObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef LightObject | Self |
Static Public Member Functions | |
static Pointer | New () |
Static Public Attributes | |
static const unsigned int | SpaceDimension = NDimensions |
Static Public Attributes inherited from itk::Transform< TScalarType, NDimensions, NDimensions > | |
static const unsigned int | InputSpaceDimension |
static const unsigned int | OutputSpaceDimension |
Protected Member Functions | |
void | ComputeD () |
virtual void | ComputeDeformationContribution (const InputPointType &inputPoint, OutputPointType &result) const |
virtual void | ComputeG (const InputVectorType &landmarkVector, GMatrixType &gmatrix) const |
void | ComputeK () |
void | ComputeL () |
void | ComputeP () |
virtual const GMatrixType & | ComputeReflexiveG (PointsIterator) const |
void | ComputeY () |
KernelTransform () | |
void | PrintSelf (std::ostream &os, Indent indent) const |
void | ReorganizeW (void) |
virtual | ~KernelTransform () |
Protected Member Functions inherited from itk::Transform< TScalarType, NDimensions, NDimensions > | |
virtual LightObject::Pointer | InternalClone () const |
OutputDiffusionTensor3DType | PreservationOfPrincipalDirectionDiffusionTensor3DReorientation (const InputDiffusionTensor3DType, const JacobianType) const |
Transform () | |
Transform (NumberOfParametersType NumberOfParameters) | |
virtual | ~Transform () |
Protected Member Functions inherited from itk::TransformBase | |
TransformBase () | |
virtual | ~TransformBase () |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &time) |
virtual | ~Object () |
Protected Member Functions inherited from itk::LightObject | |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Member Functions | |
KernelTransform (const Self &) | |
void | operator= (const Self &) |
Additional Inherited Members | |
Protected Types inherited from itk::LightObject | |
typedef int | InternalReferenceCountType |
typedef vnl_matrix_fixed<TScalarType, NDimensions, NDimensions> itk::KernelTransform< TScalarType, NDimensions >::AMatrixType |
'A' matrix typedef. Rotational part of the Affine component
Definition at line 256 of file itkKernelTransform.h.
typedef vnl_vector_fixed<TScalarType, NDimensions> itk::KernelTransform< TScalarType, NDimensions >::BMatrixType |
'B' matrix typedef. Translational part of the Affine component
Definition at line 259 of file itkKernelTransform.h.
typedef vnl_matrix_fixed<TScalarType, NDimensions, 1> itk::KernelTransform< TScalarType, NDimensions >::ColumnMatrixType |
Column matrix typedef.
Definition at line 265 of file itkKernelTransform.h.
typedef SmartPointer<const Self> itk::KernelTransform< TScalarType, NDimensions >::ConstPointer |
Definition at line 71 of file itkKernelTransform.h.
typedef vnl_matrix<TScalarType> itk::KernelTransform< TScalarType, NDimensions >::DMatrixType |
'D' matrix typedef. Deformation component
Definition at line 253 of file itkKernelTransform.h.
typedef vnl_matrix_fixed<TScalarType, NDimensions, NDimensions> itk::KernelTransform< TScalarType, NDimensions >::GMatrixType |
'G' matrix typedef.
Definition at line 235 of file itkKernelTransform.h.
typedef vnl_matrix_fixed<TScalarType, NDimensions, NDimensions> itk::KernelTransform< TScalarType, NDimensions >::IMatrixType |
'I' (identity) matrix typedef.
Definition at line 172 of file itkKernelTransform.h.
typedef Superclass::InputCovariantVectorType itk::KernelTransform< TScalarType, NDimensions >::InputCovariantVectorType |
Standard covariant vector type for this class
Definition at line 103 of file itkKernelTransform.h.
typedef Superclass::InputPointType itk::KernelTransform< TScalarType, NDimensions >::InputPointType |
Standard coordinate point type for this class.
Definition at line 95 of file itkKernelTransform.h.
typedef Superclass::InputVectorType itk::KernelTransform< TScalarType, NDimensions >::InputVectorType |
Standard vector type for this class.
Definition at line 99 of file itkKernelTransform.h.
typedef Superclass::InputVnlVectorType itk::KernelTransform< TScalarType, NDimensions >::InputVnlVectorType |
Standard vnl_vector type for this class.
Definition at line 107 of file itkKernelTransform.h.
typedef Superclass::JacobianType itk::KernelTransform< TScalarType, NDimensions >::JacobianType |
Jacobian type.
Definition at line 89 of file itkKernelTransform.h.
typedef vnl_matrix<TScalarType> itk::KernelTransform< TScalarType, NDimensions >::KMatrixType |
'K' matrix typedef.
Definition at line 241 of file itkKernelTransform.h.
typedef vnl_matrix<TScalarType> itk::KernelTransform< TScalarType, NDimensions >::LMatrixType |
'L' matrix typedef.
Definition at line 238 of file itkKernelTransform.h.
typedef Superclass::OutputCovariantVectorType itk::KernelTransform< TScalarType, NDimensions >::OutputCovariantVectorType |
Definition at line 104 of file itkKernelTransform.h.
typedef Superclass::OutputPointType itk::KernelTransform< TScalarType, NDimensions >::OutputPointType |
Definition at line 96 of file itkKernelTransform.h.
typedef Superclass::OutputVectorType itk::KernelTransform< TScalarType, NDimensions >::OutputVectorType |
Definition at line 100 of file itkKernelTransform.h.
typedef Superclass::OutputVnlVectorType itk::KernelTransform< TScalarType, NDimensions >::OutputVnlVectorType |
Definition at line 108 of file itkKernelTransform.h.
typedef Superclass::ParametersType itk::KernelTransform< TScalarType, NDimensions >::ParametersType |
Parameters type.
Definition at line 86 of file itkKernelTransform.h.
typedef vnl_matrix<TScalarType> itk::KernelTransform< TScalarType, NDimensions >::PMatrixType |
'P' matrix typedef.
Definition at line 244 of file itkKernelTransform.h.
typedef SmartPointer<Self> itk::KernelTransform< TScalarType, NDimensions >::Pointer |
Definition at line 70 of file itkKernelTransform.h.
typedef PointSetType::PointIdentifier itk::KernelTransform< TScalarType, NDimensions >::PointIdentifier |
Definition at line 119 of file itkKernelTransform.h.
typedef PointSetType::PointsContainerConstIterator itk::KernelTransform< TScalarType, NDimensions >::PointsConstIterator |
Definition at line 118 of file itkKernelTransform.h.
typedef PointSetType::PointsContainer itk::KernelTransform< TScalarType, NDimensions >::PointsContainer |
Definition at line 116 of file itkKernelTransform.h.
typedef PointSetType::Pointer itk::KernelTransform< TScalarType, NDimensions >::PointSetPointer |
Definition at line 115 of file itkKernelTransform.h.
typedef DefaultStaticMeshTraits<TScalarType, NDimensions, NDimensions, TScalarType, TScalarType> itk::KernelTransform< TScalarType, NDimensions >::PointSetTraitsType |
PointList typedef. This type is used for maintaining lists of points, specifically, the source and target landmark lists.
Definition at line 112 of file itkKernelTransform.h.
typedef PointSet<InputPointType, NDimensions, PointSetTraitsType> itk::KernelTransform< TScalarType, NDimensions >::PointSetType |
Definition at line 113 of file itkKernelTransform.h.
typedef PointSetType::PointsContainerIterator itk::KernelTransform< TScalarType, NDimensions >::PointsIterator |
Definition at line 117 of file itkKernelTransform.h.
typedef vnl_matrix_fixed<TScalarType, 1, NDimensions> itk::KernelTransform< TScalarType, NDimensions >::RowMatrixType |
Row matrix typedef.
Definition at line 262 of file itkKernelTransform.h.
typedef Superclass::ScalarType itk::KernelTransform< TScalarType, NDimensions >::ScalarType |
Scalar type.
Definition at line 83 of file itkKernelTransform.h.
typedef KernelTransform itk::KernelTransform< TScalarType, NDimensions >::Self |
Standard class typedefs.
Definition at line 68 of file itkKernelTransform.h.
typedef Transform<TScalarType, NDimensions, NDimensions> itk::KernelTransform< TScalarType, NDimensions >::Superclass |
Definition at line 69 of file itkKernelTransform.h.
typedef Superclass::TransformCategoryType itk::KernelTransform< TScalarType, NDimensions >::TransformCategoryType |
Transform category type.
Definition at line 92 of file itkKernelTransform.h.
typedef VectorSetType::Pointer itk::KernelTransform< TScalarType, NDimensions >::VectorSetPointer |
Definition at line 123 of file itkKernelTransform.h.
typedef itk::VectorContainer<SizeValueType, InputVectorType> itk::KernelTransform< TScalarType, NDimensions >::VectorSetType |
VectorSet typedef.
Definition at line 122 of file itkKernelTransform.h.
typedef vnl_matrix<TScalarType> itk::KernelTransform< TScalarType, NDimensions >::WMatrixType |
'W' matrix typedef.
Definition at line 250 of file itkKernelTransform.h.
typedef vnl_matrix<TScalarType> itk::KernelTransform< TScalarType, NDimensions >::YMatrixType |
'Y' matrix typedef.
Definition at line 247 of file itkKernelTransform.h.
|
protected |
|
protectedvirtual |
|
private |
|
protected |
Compute displacements .
|
protectedvirtual |
Compute the contribution of the landmarks weighted by the kernel funcion to the global deformation of the space
Reimplemented in itk::VolumeSplineKernelTransform< TScalarType, NDimensions >, itk::ThinPlateSplineKernelTransform< TScalarType, NDimensions >, and itk::ThinPlateR2LogRSplineKernelTransform< TScalarType, NDimensions >.
|
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::VolumeSplineKernelTransform< TScalarType, NDimensions >, itk::ThinPlateSplineKernelTransform< TScalarType, NDimensions >, and itk::ThinPlateR2LogRSplineKernelTransform< TScalarType, NDimensions >.
|
virtual |
Compute the Jacobian Matrix of the transformation at one point
|
inlinevirtual |
Definition at line 177 of file itkKernelTransform.h.
|
protected |
Compute K matrix.
|
protected |
Compute L matrix.
|
protected |
Compute P matrix.
|
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.
void itk::KernelTransform< TScalarType, NDimensions >::ComputeWMatrix | ( | void | ) |
Compute W matrix.
|
protected |
Compute Y matrix.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
Reimplemented in itk::ThinPlateR2LogRSplineKernelTransform< TScalarType, NDimensions >, itk::VolumeSplineKernelTransform< TScalarType, NDimensions >, and itk::ThinPlateSplineKernelTransform< TScalarType, NDimensions >.
|
virtual |
Get the displacements list, which we will denote , where .
|
virtual |
Get Transform Fixed Parameters - Gets the Target Landmarks
Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.
Reimplemented in itk::ElasticBodySplineKernelTransform< TScalarType, NDimensions >, itk::ElasticBodyReciprocalSplineKernelTransform< TScalarType, NDimensions >, itk::ThinPlateR2LogRSplineKernelTransform< TScalarType, NDimensions >, itk::VolumeSplineKernelTransform< TScalarType, NDimensions >, and itk::ThinPlateSplineKernelTransform< TScalarType, NDimensions >.
|
virtual |
Get the Transformation Parameters - Gets the Source Landmarks
Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.
|
virtual |
Get the source landmarks list, which we will denote .
|
virtual |
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.
|
virtual |
Get the target landmarks list, which we will denote .
|
inlinevirtual |
This transform is not linear, because the transformation of a linear combination of points is not equal to the linear combination of the transformations of individual points
Reimplemented from itk::Transform< TScalarType, NDimensions, NDimensions >.
Definition at line 209 of file itkKernelTransform.h.
|
static |
New macro for creation of through a Smart Pointer
|
private |
|
protectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::Object.
|
protected |
Reorganize the components of W into D (deformable), A (rotation part of affine) and B (translational part of affine ) components.
|
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
|
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>.
|
virtual |
Set the source landmarks list.
|
virtual |
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.
|
virtual |
Set the target landmarks list.
|
inlinevirtual |
Definition at line 164 of file itkKernelTransform.h.
|
virtual |
Compute the position of point in the new space
|
inlinevirtual |
Definition at line 149 of file itkKernelTransform.h.
|
inlinevirtual |
Definition at line 156 of file itkKernelTransform.h.
|
virtual |
Update the Parameters array from the landmarks corrdinates.
|
protected |
Rotatinoal/Shearing part of the Affine component of the Transformation
Definition at line 342 of file itkKernelTransform.h.
|
protected |
Translational part of the Affine component of the Transformation
Definition at line 345 of file itkKernelTransform.h.
|
protected |
The list of displacements. d[i] = q[i] - p[i];
Definition at line 317 of file itkKernelTransform.h.
|
protected |
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 339 of file itkKernelTransform.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 350 of file itkKernelTransform.h.
|
protected |
Identity matrix.
Definition at line 356 of file itkKernelTransform.h.
|
protected |
The K matrix.
Definition at line 323 of file itkKernelTransform.h.
|
protected |
The L matrix.
Definition at line 320 of file itkKernelTransform.h.
|
protected |
The P matrix.
Definition at line 326 of file itkKernelTransform.h.
|
protected |
The list of source landmarks, denoted 'p'.
Definition at line 359 of file itkKernelTransform.h.
|
protected |
Stiffness parameter
Definition at line 313 of file itkKernelTransform.h.
|
protected |
The list of target landmarks, denoted 'q'.
Definition at line 362 of file itkKernelTransform.h.
|
protected |
The W matrix.
Definition at line 332 of file itkKernelTransform.h.
|
protected |
Has the W matrix been computed?
Definition at line 353 of file itkKernelTransform.h.
|
protected |
The Y matrix.
Definition at line 329 of file itkKernelTransform.h.
|
static |
Dimension of the domain space.
Definition at line 80 of file itkKernelTransform.h.