#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 [30]. 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 [109].
Definition at line 57 of file itkKernelTransform.h.
Static Public Member Functions | |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | SpaceDimension = VDimension |
![]() | |
static constexpr unsigned int | InputSpaceDimension |
static constexpr unsigned int | InputSpaceDimension |
static constexpr unsigned int | OutputSpaceDimension |
static constexpr unsigned int | OutputSpaceDimension |
![]() | |
static constexpr TransformCategoryEnum | BSpline = TransformCategoryEnum::BSpline |
static constexpr TransformCategoryEnum | DisplacementField = TransformCategoryEnum::DisplacementField |
static constexpr TransformCategoryEnum | Linear = TransformCategoryEnum::Linear |
static constexpr TransformCategoryEnum | Spline = TransformCategoryEnum::Spline |
static constexpr TransformCategoryEnum | UnknownTransformCategory = TransformCategoryEnum::UnknownTransformCategory |
static constexpr TransformCategoryEnum | VelocityField = TransformCategoryEnum::VelocityField |
Protected Attributes | |
AMatrixType | m_AMatrix {} |
BMatrixType | m_BVector {} |
VectorSetPointer | m_Displacements {} |
DMatrixType | m_DMatrix {} |
GMatrixType | m_GMatrix {} |
IMatrixType | m_I {} |
KMatrixType | m_KMatrix {} |
LMatrixType | m_LMatrix {} |
PMatrixType | m_PMatrix {} |
PointSetPointer | m_SourceLandmarks {} |
double | m_Stiffness {} |
PointSetPointer | m_TargetLandmarks {} |
WMatrixType | m_WMatrix {} |
bool | m_WMatrixComputed {} |
YMatrixType | m_YMatrix {} |
![]() | |
FixedParametersType | m_FixedParameters |
FixedParametersType | m_FixedParameters |
ParametersType | m_Parameters |
ParametersType | m_Parameters |
Additional Inherited Members | |
![]() | |
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 268 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 271 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::ColumnMatrixType = vnl_matrix_fixed<TParametersValueType, VDimension, 1> |
Column matrix type alias.
Definition at line 277 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::ConstPointer = SmartPointer<const Self> |
Definition at line 66 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::DMatrixType = vnl_matrix<TParametersValueType> |
'D' matrix type alias. Deformation component
Definition at line 265 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::GMatrixType = vnl_matrix_fixed<TParametersValueType, VDimension, VDimension> |
'G' matrix type alias.
Definition at line 247 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::IMatrixType = vnl_matrix_fixed<TParametersValueType, VDimension, VDimension> |
'I' (identity) matrix type alias.
Definition at line 177 of file itkKernelTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InputCovariantVectorType |
Standard covariant vector type for this class
Definition at line 152 of file itkTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InputPointType |
Standard coordinate point type for this class
Definition at line 160 of file itkTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InputVectorType |
Standard vector type for this class.
Definition at line 135 of file itkTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InputVnlVectorType |
Standard vnl_vector type for this class.
Definition at line 156 of file itkTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::InverseJacobianPositionType |
Definition at line 132 of file itkTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::JacobianPositionType |
Definition at line 131 of file itkTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::JacobianType |
Type of the Jacobian matrix.
Definition at line 130 of file itkTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::KMatrixType = vnl_matrix<TParametersValueType> |
'K' matrix type alias.
Definition at line 253 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::LMatrixType = vnl_matrix<TParametersValueType> |
'L' matrix type alias.
Definition at line 250 of file itkKernelTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::OutputCovariantVectorType |
Definition at line 153 of file itkTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::OutputPointType |
Definition at line 161 of file itkTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::OutputVectorType |
Definition at line 136 of file itkTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::OutputVnlVectorType |
Definition at line 157 of file itkTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::PMatrixType = vnl_matrix<TParametersValueType> |
'P' matrix type alias.
Definition at line 256 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::Pointer = SmartPointer<Self> |
Definition at line 65 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::PointIdentifier = typename PointSetType::PointIdentifier |
Definition at line 121 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::PointsConstIterator = typename PointSetType::PointsContainerConstIterator |
Definition at line 120 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::PointsContainer = typename PointSetType::PointsContainer |
Definition at line 118 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::PointSetPointer = typename PointSetType::Pointer |
Definition at line 117 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 113 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::PointSetType = PointSet<InputPointType, VDimension, PointSetTraitsType> |
Definition at line 115 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::PointsIterator = typename PointSetType::PointsContainerIterator |
Definition at line 119 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::RowMatrixType = vnl_matrix_fixed<TParametersValueType, 1, VDimension> |
Row matrix type alias.
Definition at line 274 of file itkKernelTransform.h.
using itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::ScalarType |
Type of the scalar representing coordinate and vector elements.
Definition at line 127 of file itkTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::Self = KernelTransform |
Standard class type aliases.
Definition at line 63 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::Superclass = Transform<TParametersValueType, VDimension, VDimension> |
Definition at line 64 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::VectorSetPointer = typename VectorSetType::Pointer |
Definition at line 125 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::VectorSetType = itk::VectorContainer<InputVectorType> |
VectorSet type alias.
Definition at line 124 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::WMatrixType = vnl_matrix<TParametersValueType> |
'W' matrix type alias.
Definition at line 262 of file itkKernelTransform.h.
using itk::KernelTransform< TParametersValueType, VDimension >::YMatrixType = vnl_matrix<TParametersValueType> |
'Y' matrix type alias.
Definition at line 259 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 184 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::itk::LightObject::Pointer itk::KernelTransform< TParametersValueType, VDimension >::CreateAnother | ( | ) | const |
|
virtual |
|
overridevirtual |
Get Transform Fixed Parameters - Gets the Target Landmarks
Implements TransformBaseTemplate< TParametersValueType >.
|
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 \).
|
override |
|
overridevirtual |
Get the Transformation Parameters - Gets the Source Landmarks
Implements 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 [109].
|
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 TransformBaseTemplate< TParametersValueType >.
Definition at line 223 of file itkKernelTransform.h.
|
static |
New macro for creation of through a Smart Pointer
|
overrideprotected |
|
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 [109].
|
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 169 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 252 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 218 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 154 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 161 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 362 of file itkKernelTransform.h.
|
protected |
Translational part of the Affine component of the Transformation
Definition at line 365 of file itkKernelTransform.h.
|
protected |
The list of displacements. d[i] = q[i] - p[i];
Definition at line 337 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 359 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 370 of file itkKernelTransform.h.
|
protected |
Identity matrix.
Definition at line 376 of file itkKernelTransform.h.
|
protected |
The K matrix.
Definition at line 343 of file itkKernelTransform.h.
|
protected |
The L matrix.
Definition at line 340 of file itkKernelTransform.h.
|
protected |
The P matrix.
Definition at line 346 of file itkKernelTransform.h.
|
protected |
The list of source landmarks, denoted 'p'.
Definition at line 379 of file itkKernelTransform.h.
|
protected |
Stiffness parameter
Definition at line 333 of file itkKernelTransform.h.
|
protected |
The list of target landmarks, denoted 'q'.
Definition at line 382 of file itkKernelTransform.h.
|
protected |
The W matrix.
Definition at line 352 of file itkKernelTransform.h.
|
protected |
Has the W matrix been computed?
Definition at line 373 of file itkKernelTransform.h.
|
protected |
The Y matrix.
Definition at line 349 of file itkKernelTransform.h.
|
staticconstexpr |
Dimension of the domain space.
Definition at line 75 of file itkKernelTransform.h.