ITK
6.0.0
Insight Toolkit
|
#include <itkBSplineTransform.h>
Deformable transform using a BSpline representation.
This class encapsulates a deformable transform of points from one N-dimensional space to another N-dimensional space. The deformation field is modeled using B-splines. A deformation is defined on a sparse regular grid of control points \( \vec{\lambda}_j \) and is varied by defining a deformation \( \vec{g}(\vec{\lambda}_j) \) of each control point. The deformation \( D(\vec{x}) \) at any point \( \vec{x} \) is obtained by using a B-spline interpolation kernel.
The deformation field grid is defined by a user specified transform domain (origin, physical dimensions, direction) and B-spline mesh size where the mesh size is the number of polynomial patches comprising the finite domain of support. The relationship between the mesh size ( number of polynomial pieces) and the number of control points in any given dimension is
mesh size = number of control points - spline order
Each grid/control point has associated with it N deformation coefficients \( \vec{\delta}_j \), representing the N directional components of the deformation. Deformation outside the grid plus support region for the BSpline interpolation is assumed to be zero.
The parameters for this transform is N x N-D grid of spline coefficients. The user specifies the parameters as one flat array: each N-D grid is represented by an array in the same way an N-D image is represented in the buffer; the N arrays are then concatenated together to form a single array.
The following illustrates the typical usage of this class:
An alternative way to set the B-spline coefficients is via array of images. The fixed parameters of the transform are taken directly from the first image. It is assumed that the subsequent images are the same buffered region. The following illustrates the API:
The class is templated coordinate representation type (float or double), the space dimension and the spline order.
Definition at line 103 of file itkBSplineTransform.h.
Static Public Member Functions | |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | SpaceDimension = VDimension |
static constexpr unsigned int | SplineOrder = VSplineOrder |
Static Public Attributes inherited from itk::BSplineBaseTransform< double, 3, 3 > | |
static constexpr unsigned int | NumberOfWeights |
static constexpr unsigned int | SpaceDimension |
static constexpr unsigned int | SplineOrder |
Static Public Attributes inherited from itk::Transform< double, VDimension, VDimension > | |
static constexpr unsigned int | InputSpaceDimension |
static constexpr unsigned int | OutputSpaceDimension |
Static Public Attributes inherited from TransformBaseTemplate< double > | |
static constexpr TransformCategoryEnum | BSpline |
static constexpr TransformCategoryEnum | DisplacementField |
static constexpr TransformCategoryEnum | Linear |
static constexpr TransformCategoryEnum | Spline |
static constexpr TransformCategoryEnum | UnknownTransformCategory |
static constexpr TransformCategoryEnum | VelocityField |
Private Member Functions | |
bool | InsideValidRegion (ContinuousIndexType &) const override |
void | SetCoefficientImageInformationFromFixedParameters () override |
void | SetFixedParametersFromCoefficientImageInformation () |
void | SetFixedParametersFromTransformDomainInformation (const OriginType &meshOrigin, const PhysicalDimensionsType &meshPhysical, const DirectionType &meshDirection, const MeshSizeType &meshSize) |
void | SetFixedParametersGridSizeFromTransformDomainInformation () const override |
void | SetFixedParametersGridOriginFromTransformDomainInformation () const override |
void | SetFixedParametersGridSpacingFromTransformDomainInformation () const override |
void | SetFixedParametersGridDirectionFromTransformDomainInformation () const override |
Additional Inherited Members | |
Public Attributes inherited from itk::Transform< double, VDimension, VDimension > | |
InverseJacobianPositionType &jacobian | const |
Static Protected Member Functions inherited from itk::Transform< double, VDimension, VDimension > | |
static InverseTransformBasePointer | InvertTransform (const TTransform &transform) |
Protected Attributes inherited from itk::BSplineBaseTransform< double, 3, 3 > | |
CoefficientImageArray | m_CoefficientImages |
ParametersType | m_InternalParametersBuffer |
WeightsFunctionType::Pointer | m_WeightsFunction |
Protected Attributes inherited from itk::Transform< double, VDimension, VDimension > | |
FixedParametersType | m_FixedParameters |
ParametersType | m_Parameters |
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::CoefficientImageArray = FixedArray<ImagePointer, VDimension> |
Definition at line 181 of file itkBSplineBaseTransform.h.
using itk::BSplineTransform< TParametersValueType, VDimension, VSplineOrder >::ConstPointer = SmartPointer<const Self> |
Definition at line 112 of file itkBSplineTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::ContinuousIndexType = typename WeightsFunctionType::ContinuousIndexType |
Definition at line 236 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::DirectionType = typename ImageType::DirectionType |
Definition at line 225 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::ImagePointer = typename ImageType::Pointer |
Definition at line 180 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::ImageType = Image<ParametersValueType, Self::SpaceDimension> |
Definition at line 179 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::IndexType = typename RegionType::IndexType |
Definition at line 222 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::InputCovariantVectorType = CovariantVector<TParametersValueType, Self::SpaceDimension> |
Standard covariant vector type for this class.
Definition at line 80 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::InputPointType = Point<TParametersValueType, Self::SpaceDimension> |
Standard coordinate point type for this class.
Definition at line 88 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::InputVectorType = Vector<TParametersValueType, Self::SpaceDimension> |
Standard vector type for this class.
Definition at line 76 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::InputVnlVectorType = vnl_vector_fixed<TParametersValueType, SpaceDimension> |
Standard vnl_vector type for this class.
Definition at line 84 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::MeshSizeType = SizeType |
Definition at line 333 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::OriginType = typename ImageType::PointType |
Definition at line 226 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::OutputCovariantVectorType = CovariantVector<TParametersValueType, Self::SpaceDimension> |
Definition at line 81 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::OutputPointType = Point<TParametersValueType, Self::SpaceDimension> |
Definition at line 89 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::OutputVectorType = Vector<TParametersValueType, Self::SpaceDimension> |
Definition at line 77 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::OutputVnlVectorType = vnl_vector_fixed<TParametersValueType, SpaceDimension> |
Definition at line 85 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::ParameterIndexArrayType = FixedArray<unsigned long, NumberOfWeights> |
Parameter index array type.
Definition at line 242 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::ParametersValueType = typename ParametersType::ValueType |
Parameters as SpaceDimension number of images.
Definition at line 178 of file itkBSplineBaseTransform.h.
using itk::BSplineTransform< TParametersValueType, VDimension, VSplineOrder >::PhysicalDimensionsType = typename Superclass::SpacingType |
Definition at line 255 of file itkBSplineTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::PixelType = typename ImageType::PixelType |
Definition at line 331 of file itkBSplineBaseTransform.h.
using itk::BSplineTransform< TParametersValueType, VDimension, VSplineOrder >::Pointer = SmartPointer<Self> |
Definition at line 111 of file itkBSplineTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::RegionType = ImageRegion<Self::SpaceDimension> |
Typedefs for specifying the extent of the grid.
Definition at line 220 of file itkBSplineBaseTransform.h.
using itk::BSplineTransform< TParametersValueType, VDimension, VSplineOrder >::Self = BSplineTransform |
Standard class type aliases.
Definition at line 109 of file itkBSplineTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::SizeType = typename RegionType::SizeType |
Definition at line 223 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::SpacingType = typename ImageType::SpacingType |
Definition at line 224 of file itkBSplineBaseTransform.h.
using itk::BSplineTransform< TParametersValueType, VDimension, VSplineOrder >::Superclass = BSplineBaseTransform<TParametersValueType, VDimension, VSplineOrder> |
Definition at line 110 of file itkBSplineTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::WeightsFunctionType = BSplineInterpolationWeightFunction<ScalarType, Self::SpaceDimension, Self::SplineOrder> |
Interpolation weights function type.
Definition at line 233 of file itkBSplineBaseTransform.h.
using itk::BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder >::WeightsType = typename WeightsFunctionType::WeightsType |
Definition at line 235 of file itkBSplineBaseTransform.h.
|
protected |
|
overrideprotecteddefault |
|
overridevirtual |
Compute the Jacobian in one position.
Implements itk::BSplineBaseTransform< double, 3, 3 >.
|
override |
|
overridevirtual |
Return the number of parameters that completely define the Transform.
Implements itk::BSplineBaseTransform< double, 3, 3 >.
|
overridevirtual |
Return the number of parameters per dimension.
Implements itk::BSplineBaseTransform< double, 3, 3 >.
|
virtual |
Function to retrieve the transform domain direction.
|
virtual |
Function to retrieve the transform domain mesh size.
|
virtual |
Function to retrieve the transform domain origin.
|
virtual |
Function to retrieve the transform domain physical dimensions.
|
overridevirtual |
Generate a platform independent name
Implements TransformBaseTemplate< double >.
|
overrideprivatevirtual |
Check if a continuous index is inside the valid region.
Implements itk::BSplineBaseTransform< double, 3, 3 >.
|
static |
New macro for creation of through the object factory.
|
overrideprotected |
Print contents of an BSplineTransform.
|
overrideprivatevirtual |
Construct control point grid size from transform domain information in the fixed parameters.
Implements itk::BSplineBaseTransform< double, 3, 3 >.
|
overridevirtual |
Set the array of coefficient images.
This is an alternative API for setting the BSpline coefficients as an array of SpaceDimension images. The fixed parameters are taken from the first image. It is assumed that the buffered region of all the subsequent images are the same as the first image. Note that no error checking is done.
Warning: use either the SetParameters() or SetCoefficientImages() API. Mixing the two modes may results in unexpected results.
Implements itk::BSplineBaseTransform< double, 3, 3 >.
|
overridevirtual |
This method sets the fixed parameters of the transform. For a BSpline deformation transform, the fixed parameters are the following: grid size, grid origin, grid spacing, and grid direction. However, all of these are set via the much more intuitive SetTransformDomainXXX() functions
The fixed parameters are the three times the size of the templated dimensions. This function has the effect of make the following non- existing functional calls: transform->SetGridSpacing( spacing ); transform->SetGridOrigin( origin ); transform->SetGridDirection( direction ); transform->SetGridRegion( bsplineRegion );
With recent updates to this transform, however, all these parameters are set indirectly by setting the transform domain parameters unless the user sets them with SetFixedParameters().
This function was added to allow the transform to work with the itkTransformReader/Writer I/O filters.
Implements itk::BSplineBaseTransform< double, 3, 3 >.
|
private |
|
private |
|
inlineoverrideprivatevirtual |
Methods have empty implementations
Implements itk::BSplineBaseTransform< double, 3, 3 >.
Definition at line 316 of file itkBSplineTransform.h.
|
inlineoverrideprivatevirtual |
Methods have empty implementations
Implements itk::BSplineBaseTransform< double, 3, 3 >.
Definition at line 310 of file itkBSplineTransform.h.
|
inlineoverrideprivatevirtual |
Methods have empty implementations
Implements itk::BSplineBaseTransform< double, 3, 3 >.
Definition at line 307 of file itkBSplineTransform.h.
|
inlineoverrideprivatevirtual |
Methods have empty implementations
Implements itk::BSplineBaseTransform< double, 3, 3 >.
Definition at line 313 of file itkBSplineTransform.h.
|
virtual |
Function to specify the transform domain direction.
|
virtual |
Function to specify the transform domain mesh size.
|
virtual |
Function to specify the transform domain origin.
|
virtual |
Function to specify the transform domain physical dimensions.
|
virtual |
Transform points by a BSpline deformable transformation. On return, weights contains the interpolation weights used to compute the deformation and indices of the x (zeroth) dimension coefficient parameters in the support region used to compute the deformation. Parameter indices for the i-th dimension can be obtained by adding ( i * this->GetNumberOfParametersPerDimension() ) to the indices array.
Implements itk::BSplineBaseTransform< double, 3, 3 >.
|
override |
Transform points by a BSpline deformable transformation. On return, weights contains the interpolation weights used to compute the deformation and indices of the x (zeroth) dimension coefficient parameters in the support region used to compute the deformation. Parameter indices for the i-th dimension can be obtained by adding ( i * this->GetNumberOfParametersPerDimension() ) to the indices array.
|
overridevirtual |
Transform points by a BSpline deformable transformation. On return, weights contains the interpolation weights used to compute the deformation and indices of the x (zeroth) dimension coefficient parameters in the support region used to compute the deformation. Parameter indices for the i-th dimension can be obtained by adding ( i * this->GetNumberOfParametersPerDimension() ) to the indices array.
Implements itk::BSplineBaseTransform< double, 3, 3 >.
|
staticconstexpr |
Dimension of the domain space.
Definition at line 121 of file itkBSplineTransform.h.
|
staticconstexpr |
The BSpline order.
Definition at line 124 of file itkBSplineTransform.h.