#include <elxSplineKernelTransform.h>
A transform based on the itk::KernelTransform2.
This transform is a nonrigid transformation, based on thin-plate-spline-like kernels.
The ITK code for this class is largely based on code by Rupert Brooks. For elastix a few modifications were made (making the transform thread safe, and make it support the AdvancedTransform framework).
This nonrigid transformation model allows the user to place control points at application-specific positions, unlike the BSplineTransform, which always uses a regular grid of control points.
NB: in order to use this class for registration, the -fp command line argument is mandatory! It is used to place the fixed image landmarks.
The parameters used in this class are:
Transform: Select this transform as follows:
(Transform "SplineKernelTransform")
SplineKernelType: Select the deformation model, which must be one of { ThinPlateSpline, ThinPlateR2LogRSpline, VolumeSpline, ElasticBodySpline, ElasticBodyReciprocalSpline). In 2D this option is ignored and a ThinPlateSpline will always be used.
example: (SplineKernelType "ElasticBodySpline")
Default: ThinPlateSpline. You cannot specify this parameter for each resolution differently.
SplineRelaxationFactor: make the spline interpolating or approximating. A value of 0.0 gives an interpolating transform. Higher values result in approximating splines.
example: (SplineRelaxationFactor 0.01 )
Default: 0.0. You cannot specify this parameter for each resolution differently.
SplinePoissonRatio: Set the poisson ratio for the ElasticBodySpline and the ElastixBodyReciprocalSpline. For other SplineKernelTypes this parameters is ignored.
example: (SplinePoissonRatio 0.3 )
Default: 0.3. You cannot specify this parameter for each resolution differently.
Valid values are withing -1.0 and 0.5. 0.5 means incompressible. Negative values are a bit odd, but possible. See Wikipedia on PoissonRatio.
-fp: a file specifying a set of points that will serve as fixed image landmarks.
example: -fp fixedImagePoints.txt
The fixedImagePoints.txt file should be structured: first line should be "index" or "point", depending if the user supplies voxel indices or real world coordinates. The second line should be the number of points that should be transformed. The third and following lines give the indices or points. The same structure thus as used for transformix.
-mp: an optional file specifying a set of points that will serve as moving image landmarks, used to initialize the transformation.
example: -mp movingImagePoints.txt
The movingImagePoints.txt should be structured like the fixedImagePoints.txt. The moving landmarks should be corresponding to the fixed landmarks. If no file is provided, the transformation is initialized to be the identity, i.e. the moving landmarks are chosen identical to the fixed landmarks.
Transform: Select this transform as follows:
(Transform "SplineKernelTransform")
SplineKernelType: Select the deformation model, which must be one of { ThinPlateSpline, ThinPlateR2LogRSpline, VolumeSpline, ElasticBodySpline, ElasticBodyReciprocalSpline). In 2D this option is ignored and a ThinPlateSpline will always be used.
example: (SplineKernelType "ElasticBodySpline")
*
SplineRelaxationFactor: make the spline interpolating or approximating. A value of 0.0 gives an interpolating transform. Higher values result in approximating splines.
example: (SplineRelaxationFactor 0.01 )
*
SplinePoissonRatio: Set the Poisson ratio for the ElasticBodySpline and the ElastixBodyReciprocalSpline. For other SplineKernelTypes this parameters is ignored.
example: (SplinePoissonRatio 0.3 )
Valid values are withing -1.0 and 0.5. 0.5 means incompressible. Negative values are a bit odd, but possible. See Wikipedia on PoissonRatio.
FixedImageLandmarks: The landmark positions in the fixed image, in world coordinates. Positions written as x1 y1 [z1] x2 y2 [z2] etc.
example: (FixedImageLandmarks 10.0 11.0 12.0 4.0 4.0 4.0 6.0 6.0 6.0 )
Definition at line 115 of file elxSplineKernelTransform.h.
Public Member Functions | |
int | BeforeAll () override |
void | BeforeRegistration () override |
elxClassNameMacro ("SplineKernelTransform") | |
virtual const char * | GetClassName () const |
ITK_DISALLOW_COPY_AND_MOVE (SplineKernelTransform) | |
itkStaticConstMacro (SpaceDimension, unsigned int, Superclass2::FixedImageDimension) | |
void | ReadFromFile () override |
Public Member Functions inherited from itk::AdvancedCombinationTransform< TScalarType, NDimensions > | |
void | EvaluateJacobianWithImageGradientProduct (const InputPointType &inputPoint, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
const FixedParametersType & | GetFixedParameters () const override |
bool | GetHasNonZeroSpatialHessian () const override |
bool | GetInverse (Self *inverse) const |
void | GetJacobian (const InputPointType &inputPoint, JacobianType &j, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
void | GetJacobianOfSpatialHessian (const InputPointType &inputPoint, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
void | GetJacobianOfSpatialHessian (const InputPointType &inputPoint, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
void | GetJacobianOfSpatialJacobian (const InputPointType &inputPoint, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
void | GetJacobianOfSpatialJacobian (const InputPointType &inputPoint, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
const TransformTypePointer | GetNthTransform (SizeValueType n) const |
NumberOfParametersType | GetNumberOfNonZeroJacobianIndices () const override |
NumberOfParametersType | GetNumberOfParameters () const override |
SizeValueType | GetNumberOfTransforms () const |
const ParametersType & | GetParameters () const override |
void | GetSpatialHessian (const InputPointType &inputPoint, SpatialHessianType &sh) const override |
void | GetSpatialJacobian (const InputPointType &inputPoint, SpatialJacobianType &sj) const override |
TransformCategoryEnum | GetTransformCategory () const override |
virtual bool | GetUseAddition () const |
virtual bool | GetUseComposition () const |
bool | HasNonZeroJacobianOfSpatialHessian () const |
bool | IsLinear () const override |
ITK_DISALLOW_COPY_AND_MOVE (AdvancedCombinationTransform) | |
itkGetModifiableObjectMacro (CurrentTransform, CurrentTransformType) | |
itkGetModifiableObjectMacro (InitialTransform, InitialTransformType) | |
itkStaticConstMacro (SpaceDimension, unsigned int, NDimensions) | |
void | SetCurrentTransform (CurrentTransformType *_arg) |
void | SetFixedParameters (const FixedParametersType &fixedParam) override |
void | SetInitialTransform (InitialTransformType *_arg) |
void | SetParameters (const ParametersType ¶m) override |
void | SetParametersByValue (const ParametersType ¶m) override |
void | SetUseAddition (bool _arg) |
void | SetUseComposition (bool _arg) |
OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &) const override |
OutputPointType | TransformPoint (const InputPointType &point) const override |
OutputVectorType | TransformVector (const InputVectorType &) const override |
OutputVnlVectorType | TransformVector (const InputVnlVectorType &) const override |
Public Member Functions inherited from itk::AdvancedTransform< TScalarType, 3, 3 > | |
void | ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &) const override |
virtual bool | GetHasNonZeroJacobianOfSpatialHessian () const |
ITK_DISALLOW_COPY_AND_MOVE (AdvancedTransform) | |
itkStaticConstMacro (InputSpaceDimension, unsigned int, NInputDimensions) | |
itkStaticConstMacro (OutputSpaceDimension, unsigned int, NOutputDimensions) | |
Public Member Functions inherited from elastix::TransformBase< TElastix > | |
int | BeforeAllTransformix () |
void | ComputeAndWriteSpatialJacobianDeterminantImage () const |
void | ComputeAndWriteSpatialJacobianMatrixImage () const |
SpatialJacobianDeterminantImageType::Pointer | ComputeSpatialJacobianDeterminantImage () const |
SpatialJacobianMatrixImageType::Pointer | ComputeSpatialJacobianMatrixImage () const |
void | CreateTransformParameterMap (const ParametersType ¶m, ParameterMapType ¶meterMap, const bool includeDerivedTransformParameters=true) const |
ITKBaseType * | GetAsITKBaseType () |
const ITKBaseType * | GetAsITKBaseType () const |
ITK_DISALLOW_COPY_AND_MOVE (TransformBase) | |
itkStaticConstMacro (FixedImageDimension, unsigned int, FixedImageType::ImageDimension) | |
itkStaticConstMacro (MovingImageDimension, unsigned int, MovingImageType::ImageDimension) | |
void | ReadInitialTransformFromFile (const std::string &transformParameterFileName) |
void | SetFinalParameters () |
void | SetInitialTransform (InitialTransformType *_arg) |
void | SetReadWriteTransformParameters (const bool _arg) |
void | SetTransformParameterFileName (const std::string &filename) |
template<typename TMesh > | |
TMesh::Pointer | TransformMesh (const TMesh &mesh) const |
void | TransformPoints () const |
void | WriteToFile (std::ostream &transformationParameterInfo, const ParametersType ¶m) const |
Public Member Functions inherited from elastix::BaseComponentSE< TElastix > | |
void | AddTargetCellToIterationInfo (const char *const name) |
const Configuration * | GetConfiguration () const |
ElastixType * | GetElastix () const |
auto & | GetIterationInfoAt (const char *const name) |
RegistrationType * | GetRegistration () const |
ITK_DISALLOW_COPY_AND_MOVE (BaseComponentSE) | |
void | RemoveTargetCellFromIterationInfo (const char *const name) |
void | SetConfiguration (const Configuration *_arg) |
void | SetElastix (ElastixType *_arg) |
Public Member Functions inherited from elastix::BaseComponent | |
virtual void | AfterEachIteration () |
virtual void | AfterEachIterationBase () |
virtual void | AfterEachResolution () |
virtual void | AfterEachResolutionBase () |
virtual void | AfterRegistration () |
virtual void | BeforeEachResolution () |
virtual void | BeforeEachResolutionBase () |
virtual const char * | elxGetClassName () const |
const char * | GetComponentLabel () const |
ITK_DISALLOW_COPY_AND_MOVE (BaseComponent) | |
itkTypeMacroNoParent (BaseComponent) | |
void | SetComponentLabel (const char *label, unsigned int idx) |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::AdvancedCombinationTransform< TScalarType, NDimensions > | |
static Pointer | New () |
Static Public Member Functions inherited from elastix::BaseComponent | |
template<typename TBaseComponent > | |
static auto | AsITKBaseType (TBaseComponent *const baseComponent) -> decltype(baseComponent->GetAsITKBaseType()) |
static void | InitializeElastixExecutable () |
static bool | IsElastixLibrary () |
Protected Types | |
using | EBKernelTransformType = itk::ElasticBodySplineKernelTransform2<CoordRepType, Self::SpaceDimension> |
using | EBRKernelTransformType = itk::ElasticBodyReciprocalSplineKernelTransform2<CoordRepType, Self::SpaceDimension> |
using | TPKernelTransformType = itk::ThinPlateSplineKernelTransform2<CoordRepType, Self::SpaceDimension> |
using | TPRKernelTransformType = itk::ThinPlateR2LogRSplineKernelTransform2<CoordRepType, Self::SpaceDimension> |
using | VKernelTransformType = itk::VolumeSplineKernelTransform2<CoordRepType, Self::SpaceDimension> |
Protected Attributes | |
KernelTransformPointer | m_KernelTransform |
Protected Attributes inherited from itk::AdvancedTransform< TScalarType, 3, 3 > | |
bool | m_HasNonZeroJacobianOfSpatialHessian |
bool | m_HasNonZeroSpatialHessian |
Protected Attributes inherited from elastix::BaseComponentSE< TElastix > | |
Configuration::ConstPointer | m_Configuration {} |
itk::WeakPointer< TElastix > | m_Elastix {} |
RegistrationType * | m_Registration {} |
Private Member Functions | |
ParameterMapType | CreateDerivedTransformParameterMap () const override |
Private Attributes | |
elxOverrideGetSelfMacro | |
std::string | m_SplineKernelType |
using elastix::SplineKernelTransform< TElastix >::CombinationTransformType = typename Superclass2::CombinationTransformType |
Definition at line 174 of file elxSplineKernelTransform.h.
using elastix::SplineKernelTransform< TElastix >::ConstPointer = itk::SmartPointer<const Self> |
Definition at line 135 of file elxSplineKernelTransform.h.
using elastix::TransformBase< TElastix >::CoordRepType |
Elastix typedef's.
Definition at line 156 of file elxTransformBase.h.
|
protected |
Definition at line 210 of file elxSplineKernelTransform.h.
|
protected |
Definition at line 211 of file elxSplineKernelTransform.h.
using elastix::TransformBase< TElastix >::FixedImageType |
Definition at line 157 of file elxTransformBase.h.
using elastix::SplineKernelTransform< TElastix >::ITKBaseType = typename Superclass2::ITKBaseType |
Definition at line 173 of file elxSplineKernelTransform.h.
using elastix::SplineKernelTransform< TElastix >::KernelTransformPointer = typename KernelTransformType::Pointer |
Extra typedefs
Definition at line 177 of file elxSplineKernelTransform.h.
using elastix::SplineKernelTransform< TElastix >::KernelTransformType |
The ITK-class that provides most of the functionality, and that is set as the "CurrentTransform" in the CombinationTransform.
Definition at line 132 of file elxSplineKernelTransform.h.
using elastix::TransformBase< TElastix >::MovingImageType |
Definition at line 158 of file elxTransformBase.h.
using elastix::TransformBase< TElastix >::ParameterMapType |
Typedef that is used in the elastix dll version.
Definition at line 199 of file elxTransformBase.h.
using elastix::SplineKernelTransform< TElastix >::Pointer = itk::SmartPointer<Self> |
Definition at line 134 of file elxSplineKernelTransform.h.
using elastix::SplineKernelTransform< TElastix >::PointSetPointer = typename PointSetType::Pointer |
Definition at line 179 of file elxSplineKernelTransform.h.
using elastix::SplineKernelTransform< TElastix >::PointSetType = typename KernelTransformType::PointSetType |
Definition at line 178 of file elxSplineKernelTransform.h.
using elastix::SplineKernelTransform< TElastix >::Self = SplineKernelTransform |
Standard ITK-stuff.
Definition at line 124 of file elxSplineKernelTransform.h.
using elastix::SplineKernelTransform< TElastix >::Superclass1 |
Definition at line 125 of file elxSplineKernelTransform.h.
using elastix::SplineKernelTransform< TElastix >::Superclass2 = elx::TransformBase<TElastix> |
Definition at line 127 of file elxSplineKernelTransform.h.
|
protected |
Definition at line 207 of file elxSplineKernelTransform.h.
|
protected |
Definition at line 208 of file elxSplineKernelTransform.h.
|
protected |
Definition at line 209 of file elxSplineKernelTransform.h.
|
protected |
The constructor.
|
overrideprotecteddefault |
The destructor.
|
overridevirtual |
Execute stuff before everything else:
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Execute stuff before the actual registration:
Reimplemented from elastix::BaseComponent.
|
overrideprivatevirtual |
Creates a map of the parameters specific for this (derived) transform type.
Implements elastix::TransformBase< TElastix >.
|
protectedvirtual |
Read source landmarks from fp file
|
protectedvirtual |
Read target landmarks from mp file or load identity.
elastix::SplineKernelTransform< TElastix >::elxClassNameMacro | ( | "SplineKernelTransform< TElastix >" | ) |
Name of this class. Use this name in the parameter file to select this specific transform.
example: (Transform "SplineKernelTransform")
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::AdvancedCombinationTransform< TScalarType, NDimensions >.
elastix::SplineKernelTransform< TElastix >::ITK_DISALLOW_COPY_AND_MOVE | ( | SplineKernelTransform< TElastix > | ) |
elastix::SplineKernelTransform< TElastix >::itkStaticConstMacro | ( | SpaceDimension | , |
unsigned int | , | ||
Superclass2::FixedImageDimension | ) |
Dimension of the domain space.
|
static |
Method for creation through the object factory.
|
overridevirtual |
Function to read transform-parameters from a file.
Reimplemented from elastix::TransformBase< TElastix >.
|
protected |
General function to read all landmarks.
|
protectedvirtual |
Create an instance of a kernel transform. Returns false if the kernelType is unknown.
|
private |
Definition at line 240 of file elxSplineKernelTransform.h.
|
protected |
The itk kernel transform.
Definition at line 237 of file elxSplineKernelTransform.h.
|
private |
Definition at line 246 of file elxSplineKernelTransform.h.
Generated on 2024-07-17 for elastix by 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) |