#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 [31]. Notation closely follows the 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 [119].
Definition at line 59 of file itkKernelTransform.h.
Inheritance diagram for itk::KernelTransform< TParametersValueType, VDimension >:
Collaboration diagram for itk::KernelTransform< TParametersValueType, VDimension >:Static Public Member Functions | |
| static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
| static bool | GetGlobalWarningDisplay () |
| static void | GlobalWarningDisplayOff () |
| static void | GlobalWarningDisplayOn () |
| static Pointer | New () |
| static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
| static void | BreakOnError () |
| static Pointer | New () |
Static Public Attributes | |
| static constexpr unsigned int | SpaceDimension = VDimension |
Static Public Attributes inherited from itk::Transform< TParametersValueType, VDimension, VDimension > | |
| static constexpr unsigned int | InputSpaceDimension |
| static constexpr unsigned int | InputSpaceDimension |
| static constexpr unsigned int | OutputSpaceDimension |
| static constexpr unsigned int | OutputSpaceDimension |
Protected Attributes | |
| AMatrixType | m_AMatrix {} |
| BMatrixType | m_BVector {} |
| VectorSetPointer | m_Displacements { VectorSetType::New() } |
| DMatrixType | m_DMatrix {} |
| GMatrixType | m_GMatrix {} |
| IMatrixType | m_I {} |
| KMatrixType | m_KMatrix {} |
| LMatrixType | m_LMatrix {} |
| PMatrixType | m_PMatrix {} |
| PointSetPointer | m_SourceLandmarks { PointSetType::New() } |
| double | m_Stiffness {} |
| PointSetPointer | m_TargetLandmarks { PointSetType::New() } |
| WMatrixType | m_WMatrix {} |
| bool | m_WMatrixComputed {} |
| YMatrixType | m_YMatrix {} |
Protected Attributes inherited from itk::Transform< TParametersValueType, VDimension, VDimension > | |
| FixedParametersType | m_FixedParameters |
| FixedParametersType | m_FixedParameters |
| ParametersType | m_Parameters |
| ParametersType | m_Parameters |
Protected Attributes inherited from itk::LightObject | |
| std::atomic< int > | m_ReferenceCount {} |
Additional Inherited Members | |
Static Protected Member Functions inherited from itk::Transform< TParametersValueType, VDimension, VDimension > | |
| static InverseTransformBasePointer | InvertTransform (const TTransform &transform) |
| static InverseTransformBasePointer | InvertTransform (const TTransform &transform) |
| using itk::KernelTransform< TParametersValueType, VDimension >::AMatrixType = vnl_matrix_fixed<TParametersValueType, VDimension, VDimension> |
'A' matrix type alias. Rotational part of the Affine component
Definition at line 292 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::BMatrixType = vnl_vector_fixed<TParametersValueType, VDimension> |
'B' matrix type alias. Translational part of the Affine component
Definition at line 295 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::ColumnMatrixType = vnl_matrix_fixed<TParametersValueType, VDimension, 1> |
Column matrix type alias.
Definition at line 301 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::ConstPointer = SmartPointer<const Self> |
Definition at line 68 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::DMatrixType = vnl_matrix<TParametersValueType> |
'D' matrix type alias. Deformation component
Definition at line 289 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::GMatrixType = vnl_matrix_fixed<TParametersValueType, VDimension, VDimension> |
'G' matrix type alias.
Definition at line 271 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::IMatrixType = vnl_matrix_fixed<TParametersValueType, VDimension, VDimension> |
'I' (identity) matrix type alias.
Definition at line 179 of file itkKernelTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InputCovariantVectorType |
Standard covariant vector type for this class
Definition at line 151 of file itkTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InputPointType |
Standard coordinate point type for this class
Definition at line 159 of file itkTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InputVectorType |
Standard vector type for this class.
Definition at line 134 of file itkTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InputVnlVectorType |
Standard vnl_vector type for this class.
Definition at line 155 of file itkTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InverseJacobianPositionType |
Definition at line 131 of file itkTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::InverseTransformBasePointer = typename Superclass::InverseTransformBasePointer |
Definition at line 243 of file itkKernelTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::JacobianPositionType |
Definition at line 130 of file itkTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::JacobianType |
Type of the Jacobian matrix.
Definition at line 129 of file itkTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::KMatrixType = vnl_matrix<TParametersValueType> |
'K' matrix type alias.
Definition at line 277 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::LMatrixType = vnl_matrix<TParametersValueType> |
'L' matrix type alias.
Definition at line 274 of file itkKernelTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::OutputCovariantVectorType |
Definition at line 152 of file itkTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::OutputPointType |
Definition at line 160 of file itkTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::OutputVectorType |
Definition at line 135 of file itkTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::OutputVnlVectorType |
Definition at line 156 of file itkTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::PMatrixType = vnl_matrix<TParametersValueType> |
'P' matrix type alias.
Definition at line 280 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::Pointer = SmartPointer<Self> |
Definition at line 67 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::PointIdentifier = typename PointSetType::PointIdentifier |
Definition at line 123 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::PointsConstIterator = typename PointSetType::PointsContainerConstIterator |
Definition at line 122 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::PointsContainer = typename PointSetType::PointsContainer |
Definition at line 120 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::PointSetPointer = typename PointSetType::Pointer |
Definition at line 119 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::PointSetTraitsType |
PointList type alias. This type is used for maintaining lists of points, specifically, the source and target landmark lists.
Definition at line 115 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::PointSetType = PointSet<InputPointType, VDimension, PointSetTraitsType> |
Definition at line 117 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::PointsIterator = typename PointSetType::PointsContainerIterator |
Definition at line 121 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::RowMatrixType = vnl_matrix_fixed<TParametersValueType, 1, VDimension> |
Row matrix type alias.
Definition at line 298 of file itkKernelTransform.h.
| using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::ScalarType |
Type of the scalar representing coordinate and vector elements.
Definition at line 126 of file itkTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::Self = KernelTransform |
Standard class type aliases.
Definition at line 65 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::Superclass = Transform<TParametersValueType, VDimension, VDimension> |
Definition at line 66 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::VectorSetPointer = typename VectorSetType::Pointer |
Definition at line 127 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::VectorSetType = itk::VectorContainer<InputVectorType> |
VectorSet type alias.
Definition at line 126 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::WMatrixType = vnl_matrix<TParametersValueType> |
'W' matrix type alias.
Definition at line 286 of file itkKernelTransform.h.
| using itk::KernelTransform< TParametersValueType, VDimension >::YMatrixType = vnl_matrix<TParametersValueType> |
'Y' matrix type alias.
Definition at line 283 of file itkKernelTransform.h.
|
protected |
|
overrideprotecteddefault |
|
protected |
Compute displacements \( q_i - p_i \).
|
protectedvirtual |
Compute the contribution of the landmarks weighted by the kernel function to the global deformation of the space
Reimplemented in itk::ThinPlateR2LogRSplineKernelTransform< TParametersValueType, VDimension >, itk::ThinPlateSplineKernelTransform< TParametersValueType, VDimension >, and itk::VolumeSplineKernelTransform< TParametersValueType, VDimension >.
|
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::ThinPlateR2LogRSplineKernelTransform< TParametersValueType, VDimension >, itk::ThinPlateSplineKernelTransform< TParametersValueType, VDimension >, and itk::VolumeSplineKernelTransform< TParametersValueType, VDimension >.
|
overridevirtual |
Compute the Jacobian Matrix of the transformation at one point
Implements itk::Transform< TParametersValueType, VDimension, VDimension >.
|
inlineoverridevirtual |
This provides the ability to get a local jacobian value in a dense/local transform, e.g. DisplacementFieldTransform. For such transforms it would be unclear what parameters would refer to. Generally, global transforms should return an identity jacobian since there is no change with respect to position.
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
Definition at line 186 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< TParametersValueType, VDimension >::ComputeWMatrix | ( | ) |
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::LightObject.
Reimplemented in itk::ThinPlateR2LogRSplineKernelTransform< TParametersValueType, VDimension >, itk::ThinPlateSplineKernelTransform< TParametersValueType, VDimension >, and itk::VolumeSplineKernelTransform< TParametersValueType, VDimension >.
|
virtual |
|
overridevirtual |
Get Transform Fixed Parameters - Gets the Target Landmarks
Implements itk::TransformBaseTemplate< TParametersValueType >.
|
inline |
Definition at line 238 of file itkKernelTransform.h.
| bool itk::KernelTransform< TParametersValueType, VDimension >::GetInverse | ( | TTransform * | inverseTransform | ) | const |
Returns a boolean indicating whether it is possible or not to compute the inverse of this current Transform. If it is possible, then the inverse of the transform is returned in the inverseTransform variable passed by the user. Inverting is possible if the variable is not a null pointer.
|
inlineoverridevirtual |
Return an inverse of this transform.
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
Reimplemented in itk::ThinPlateR2LogRSplineKernelTransform< TParametersValueType, VDimension >, itk::ThinPlateSplineKernelTransform< TParametersValueType, VDimension >, and itk::VolumeSplineKernelTransform< TParametersValueType, VDimension >.
Definition at line 247 of file itkKernelTransform.h.
|
virtual |
Get the displacements list, which we will denote \( d \), where \( d_i = q_i - p_i \).
|
virtual |
Get/Set the source landmarks list, which we will denote \( p \).
|
virtual |
Get the target landmarks list, which we will denote \( q \).
|
virtual |
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
Reimplemented in itk::ElasticBodyReciprocalSplineKernelTransform< TParametersValueType, VDimension >, itk::ElasticBodySplineKernelTransform< TParametersValueType, VDimension >, itk::ThinPlateR2LogRSplineKernelTransform< TParametersValueType, VDimension >, itk::ThinPlateSplineKernelTransform< TParametersValueType, VDimension >, and itk::VolumeSplineKernelTransform< TParametersValueType, VDimension >.
|
overridevirtual |
Get the Transformation Parameters - Gets the Source Landmarks
Implements itk::TransformBaseTemplate< TParametersValueType >.
|
virtual |
Get/Set the source landmarks list, which we will denote \( p \).
|
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 [119].
|
virtual |
Get the target landmarks list, which we will denote \( q \).
|
inlineoverridevirtual |
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
Implements itk::TransformBaseTemplate< TParametersValueType >.
Definition at line 223 of file itkKernelTransform.h.
|
static |
New macro for creation of through a Smart Pointer
|
overrideprotectedvirtual |
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::LightObject.
|
protected |
Reorganize the components of W into D (deformable), A (rotation part of affine) and B (translational part of affine ) components.
|
overridevirtual |
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
Implements itk::Transform< TParametersValueType, VDimension, VDimension >.
|
overridevirtual |
Set the Transformation Parameters and update the internal transformation. The parameters represent the source landmarks. Each landmark point is represented by VDimension doubles. All the landmarks are concatenated to form one flat Array<double>.
Implements itk::Transform< TParametersValueType, VDimension, VDimension >.
|
virtual |
Get/Set the source landmarks list, which we will denote \( p \).
|
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 [119].
|
virtual |
Get the target landmarks list, which we will denote \( q \).
|
inlineoverridevirtual |
Method to transform a CovariantVector.
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
Definition at line 172 of file itkKernelTransform.h.
|
virtual |
Method to transform a CovariantVector.
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
|
inlinevirtual |
Method to transform a CovariantVector.
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
Definition at line 245 of file itkTransform.h.
|
virtual |
Method to transform a CovariantVector.
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
|
overridevirtual |
Compute the position of point in the new space
Implements itk::Transform< TParametersValueType, VDimension, VDimension >.
|
inlinevirtual |
These vector transforms are not implemented for this transform
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
Definition at line 213 of file itkTransform.h.
|
virtual |
These vector transforms are not implemented for this transform
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
|
inlineoverridevirtual |
These vector transforms are not implemented for this transform
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
Definition at line 157 of file itkKernelTransform.h.
|
virtual |
These vector transforms are not implemented for this transform
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
|
inlineoverridevirtual |
Method to transform a vnl_vector.
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
Definition at line 163 of file itkKernelTransform.h.
|
virtual |
These vector transforms are not implemented for this transform
Reimplemented from itk::Transform< TParametersValueType, VDimension, VDimension >.
|
virtual |
Update the Parameters array from the landmarks coordinates.
|
protected |
Rotational/Shearing part of the Affine component of the Transformation
Definition at line 386 of file itkKernelTransform.h.
|
protected |
Translational part of the Affine component of the Transformation
Definition at line 389 of file itkKernelTransform.h.
|
protected |
The list of displacements. d[i] = q[i] - p[i];
Definition at line 361 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 383 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 394 of file itkKernelTransform.h.
|
protected |
Identity matrix.
Definition at line 400 of file itkKernelTransform.h.
|
protected |
The K matrix.
Definition at line 367 of file itkKernelTransform.h.
|
protected |
The L matrix.
Definition at line 364 of file itkKernelTransform.h.
|
protected |
The P matrix.
Definition at line 370 of file itkKernelTransform.h.
|
protected |
The list of source landmarks, denoted 'p'.
Definition at line 403 of file itkKernelTransform.h.
|
protected |
Stiffness parameter
Definition at line 357 of file itkKernelTransform.h.
|
protected |
The list of target landmarks, denoted 'q'.
Definition at line 406 of file itkKernelTransform.h.
|
protected |
The W matrix.
Definition at line 376 of file itkKernelTransform.h.
|
protected |
Has the W matrix been computed?
Definition at line 397 of file itkKernelTransform.h.
|
protected |
The Y matrix.
Definition at line 373 of file itkKernelTransform.h.
|
staticconstexpr |
Dimension of the domain space.
Definition at line 77 of file itkKernelTransform.h.