ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
itk::CompositeTransform< TParametersValueType, VDimension > Class Template Reference

#include <itkCompositeTransform.h>

Detailed Description

template<typename TParametersValueType = double, unsigned int VDimension = 3>
class itk::CompositeTransform< TParametersValueType, VDimension >

This class contains a list of transforms and concatenates them by composition.

This class concatenates transforms in reverse queue order by means of composition: \( T_0 o T_1 = T_0(T_1(x)) \) Transforms are stored in a container (queue), in the following order: \( T_0, T_1, ... , T_N-1 \) Transforms are added via a single method, AddTransform(). This adds the transforms to the back of the queue. A single method for adding transforms is meant to simplify the interface and prevent errors. One use of the class is to optimize only a subset of included transforms.

The sub transforms are the same dimensionality as this class.

Example: A user wants to optimize two Affine transforms together, then add a Deformation Field (DF) transform, and optimize it separately. They first add the two Affines, then run the optimization and both Affines transform parameters are optimized. Next, they add the DF transform and call SetOnlyMostRecentTransformToOptimizeOn, which clears the optimization flags for both of the affine transforms, and leaves the flag set only for the DF transform, since it was the last transform added. Now they run the optimization and only the DF transform is optimized, but the affines are included in the transformation during the optimization.

Optimization Flags: The m_TransformsToOptimize flags hold one flag for each transform in the queue, designating if each transform is to be used for optimization. Note that all transforms in the queue are applied in TransformPoint, regardless of these flags states'. The methods GetParameters, SetParameters, ComputeJacobianWithRespectToParameters, GetTransformCategory, GetFixedParameters, and SetFixedParameters all query these flags and include only those transforms whose corresponding flag is set. Their input or output is a concatenated array of all transforms set for use in optimization. The goal is to be able to optimize multiple transforms at once, while leaving other transforms fixed. See the above example.

Setting Optimization Flags: A transform's optimization flag is set when it is added to the queue, and remains set as other transforms are added. The methods SetNthTransformToOptimize* and SetAllTransformToOptimize* are used to set and clear flags arbitrarily. SetOnlyMostRecentTransformToOptimizeOn is a convenience method for setting only the most recently added transform for optimization, with the idea that this will be a common practice.

Indexing: The index values used in GetNthTransform and SetNthTransformToOptimize* and SetAllTransformToOptimize* follow the order in which transforms were added. Thus, the first transform added is at index 0, the next at index 1, etc.

Inverse: The inverse transform is created by retrieving the inverse from each sub transform and adding them to a composite transform in reverse order. The m_TransformsToOptimizeFlags is copied in reverse for the inverse.

Definition at line 87 of file itkCompositeTransform.h.

+ Inheritance diagram for itk::CompositeTransform< TParametersValueType, VDimension >:
+ Collaboration diagram for itk::CompositeTransform< TParametersValueType, VDimension >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using ScalarType = ParametersValueType
 
using Self = CompositeTransform
 
using Superclass = MultiTransform< TParametersValueType, VDimension, VDimension >
 
using TransformQueueType = std::deque< TransformTypePointer >
 
using TransformsToOptimizeFlagsType = std::deque< bool >
 
using TransformType = typename Superclass::TransformType
 
using TransformTypePointer = typename TransformType::Pointer
 
- Public Types inherited from itk::MultiTransform< double, 3, 3 >
using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = Array< ParametersValueType >
 
using InputCovariantVectorType = CovariantVector< double, VInputDimension >
 
using InputDiffusionTensor3DType = DiffusionTensor3D< double >
 
using InputPointType = Point< double, VInputDimension >
 
using InputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< double, VInputDimension >
 
using InputVectorPixelType = VariableLengthVector< double >
 
using InputVectorType = Vector< double, VInputDimension >
 
using InputVnlVectorType = vnl_vector_fixed< double, VInputDimension >
 
using InverseJacobianPositionType = vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension >
 
using InverseTransformBasePointer = typename InverseTransformBaseType::Pointer
 
using JacobianPositionType = vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension >
 
using JacobianType = Array2D< ParametersValueType >
 
using OutputCovariantVectorType = CovariantVector< double, VOutputDimension >
 
using OutputDiffusionTensor3DType = DiffusionTensor3D< double >
 
using OutputPointType = Point< double, VOutputDimension >
 
using OutputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< double, VOutputDimension >
 
using OutputVectorPixelType = VariableLengthVector< double >
 
using OutputVectorType = Vector< double, VOutputDimension >
 
using OutputVnlVectorType = vnl_vector_fixed< double, VOutputDimension >
 
using Pointer = SmartPointer< Self >
 
using ScalarType = ParametersValueType
 
using Self = MultiTransform
 
using SubTransformInverseTransformBasePointer = typename TransformType::InverseTransformBasePointer
 
using Superclass = Transform< double, VDimension, VSubDimensions >
 
using TransformQueueType = std::deque< TransformTypePointer >
 
using TransformType = Transform< double, VSubDimensions, VSubDimensions >
 
using TransformTypePointer = typename TransformType::Pointer
 
- Public Types inherited from itk::Transform< double, VDimension, VSubDimensions >
using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = Array< ParametersValueType >
 
using DirectionChangeMatrix = Matrix< double, Self::OutputSpaceDimension, Self::InputSpaceDimension >
 
using FixedParametersType = OptimizerParameters< FixedParametersValueType >
 
using FixedParametersValueType = double
 
using InputCovariantVectorType = CovariantVector< double, VInputDimension >
 
using InputDiffusionTensor3DType = DiffusionTensor3D< double >
 
using InputDirectionMatrix = Matrix< double, Self::InputSpaceDimension, Self::InputSpaceDimension >
 
using InputPointType = Point< double, VInputDimension >
 
using InputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< double, VInputDimension >
 
using InputVectorPixelType = VariableLengthVector< double >
 
using InputVectorType = Vector< double, VInputDimension >
 
using InputVnlVectorType = vnl_vector_fixed< double, VInputDimension >
 
using InverseJacobianPositionType = vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension >
 
using InverseTransformBasePointer = typename InverseTransformBaseType::Pointer
 
using InverseTransformBaseType = Transform< double, VOutputDimension, VInputDimension >
 
using JacobianPositionType = vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension >
 
using JacobianType = Array2D< ParametersValueType >
 
using MatrixType = Matrix< double, Self::OutputSpaceDimension, Self::InputSpaceDimension >
 
using NumberOfParametersType = IdentifierType
 
using OutputCovariantVectorType = CovariantVector< double, VOutputDimension >
 
using OutputDiffusionTensor3DType = DiffusionTensor3D< double >
 
using OutputDirectionMatrix = Matrix< double, Self::OutputSpaceDimension, Self::OutputSpaceDimension >
 
using OutputPointType = Point< double, VOutputDimension >
 
using OutputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< double, VOutputDimension >
 
using OutputVectorPixelType = VariableLengthVector< double >
 
using OutputVectorType = Vector< double, VOutputDimension >
 
using OutputVnlVectorType = vnl_vector_fixed< double, VOutputDimension >
 
using ParametersType = OptimizerParameters< ParametersValueType >
 
using ParametersValueType = double
 
using Pointer = SmartPointer< Self >
 
using ScalarType = ParametersValueType
 
using Self = Transform
 
using Superclass = TransformBaseTemplate< double >
 
using TransformCategoryEnum = TransformBaseTemplateEnums::TransformCategory
 
- Public Types inherited from TransformBaseTemplate< double >
using ConstPointer = SmartPointer< const Self >
 
using FixedParametersType = OptimizerParameters< FixedParametersValueType >
 
using FixedParametersValueType = double
 
using NumberOfParametersType = IdentifierType
 
using ParametersType = OptimizerParameters< ParametersValueType >
 
using ParametersValueType = double
 
using Pointer = SmartPointer< Self >
 
using Self = TransformBaseTemplate
 
using Superclass = Object
 
using TransformCategoryEnum = TransformBaseTemplateEnums::TransformCategory
 
using TransformCategoryType = TransformCategoryEnum
 

Public Member Functions

void ClearTransformQueue () override
 
void ComputeJacobianWithRespectToParameters (const InputPointType &p, JacobianType &outJacobian) const override
 
virtual void FlattenTransformQueue ()
 
const FixedParametersTypeGetFixedParameters () const override
 
bool GetInverse (Self *inverse) const
 
InverseTransformBasePointer GetInverseTransform () const override
 
const char * GetNameOfClass () const override
 
virtual bool GetNthTransformToOptimize (SizeValueType i) const
 
NumberOfParametersType GetNumberOfFixedParameters () const override
 
NumberOfParametersType GetNumberOfLocalParameters () const override
 
NumberOfParametersType GetNumberOfParameters () const override
 
const ParametersTypeGetParameters () const override
 
TransformCategoryEnum GetTransformCategory () const override
 
virtual const TransformsToOptimizeFlagsTypeGetTransformsToOptimizeFlags () const
 
virtual void SetAllTransformsToOptimize (bool state)
 
virtual void SetAllTransformsToOptimizeOff ()
 
virtual void SetAllTransformsToOptimizeOn ()
 
void SetFixedParameters (const FixedParametersType &inputParameters) override
 
virtual void SetNthTransformToOptimize (SizeValueType i, bool state)
 
virtual void SetNthTransformToOptimizeOff (SizeValueType i)
 
virtual void SetNthTransformToOptimizeOn (SizeValueType i)
 
virtual void SetOnlyMostRecentTransformToOptimizeOn ()
 
void SetParameters (const ParametersType &inputParameters) override
 
OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &) const override
 
OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &inputVector, const InputPointType &inputPoint) const override
 
OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &) const override
 
OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &inputVector, const InputPointType &inputPoint) const override
 
OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &inputTensor) const override
 
OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &inputTensor, const InputPointType &inputPoint) const override
 
OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &inputTensor) const override
 
OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &inputTensor, const InputPointType &inputPoint) const override
 
OutputPointType TransformPoint (const InputPointType &inputPoint) const override
 
OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor) const override
 
OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor, const InputPointType &inputPoint) const override
 
OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor) const override
 
OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor, const InputPointType &inputPoint) const override
 
OutputVectorPixelType TransformVector (const InputVectorPixelType &inputVector) const override
 
OutputVectorPixelType TransformVector (const InputVectorPixelType &inputVector, const InputPointType &inputPoint) const override
 
OutputVectorType TransformVector (const InputVectorType &) const override
 
OutputVectorType TransformVector (const InputVectorType &inputVector, const InputPointType &inputPoint) const override
 
OutputVnlVectorType TransformVector (const InputVnlVectorType &inputVector) const override
 
OutputVnlVectorType TransformVector (const InputVnlVectorType &inputVector, const InputPointType &inputPoint) const override
 
void UpdateTransformParameters (const DerivativeType &update, ScalarType factor=1.0) override
 
void ComputeJacobianWithRespectToParametersCachedTemporaries (const InputPointType &p, JacobianType &outJacobian, JacobianType &cacheJacobian) const override
 
- Public Member Functions inherited from itk::MultiTransform< double, 3, 3 >
virtual void AddTransform (TransformType *t)
 
virtual void AppendTransform (TransformType *t)
 
virtual const TransformTypeGetBackTransform () const
 
const FixedParametersTypeGetFixedParameters () const override
 
virtual const TransformTypeGetFrontTransform () const
 
bool GetInverse (Self *inverse) const
 
const char * GetNameOfClass () const override
 
virtual const TransformTypePointer GetNthTransform (SizeValueType n) const
 
virtual const TransformTypeGetNthTransformConstPointer (const SizeValueType n) const
 
virtual TransformTypeGetNthTransformModifiablePointer (const SizeValueType n) const
 
NumberOfParametersType GetNumberOfFixedParameters () const override
 
NumberOfParametersType GetNumberOfLocalParameters () const override
 
NumberOfParametersType GetNumberOfParameters () const override
 
virtual SizeValueType GetNumberOfTransforms () const
 
const ParametersTypeGetParameters () const override
 
TransformCategoryEnum GetTransformCategory () const override
 
virtual const TransformQueueTypeGetTransformQueue () const
 
bool IsLinear () const override
 
virtual bool IsTransformQueueEmpty () const
 
virtual void PrependTransform (TransformType *t)
 
virtual void RemoveTransform ()
 
void SetFixedParameters (const FixedParametersType &inputParameters) override
 
void SetParameters (const ParametersType &inputParameters) override
 
void UpdateTransformParameters (const DerivativeType &update, ScalarType factor=1.0) override
 
- Public Member Functions inherited from itk::Transform< double, VDimension, VSubDimensions >
virtual void ComputeJacobianWithRespectToParametersCachedTemporaries (const InputPointType &p, JacobianType &jacobian, JacobianType &) const
 
void CopyInFixedParameters (const FixedParametersValueType *const begin, const FixedParametersValueType *const end) override
 
void CopyInParameters (const ParametersValueType *const begin, const ParametersValueType *const end) override
 
const FixedParametersTypeGetFixedParameters () const override
 
unsigned int GetInputSpaceDimension () const override
 
bool GetInverse (Self *) const
 
virtual InverseTransformBasePointer GetInverseTransform () const
 
const char * GetNameOfClass () const override
 
virtual NumberOfParametersType GetNumberOfFixedParameters () const
 
virtual NumberOfParametersType GetNumberOfLocalParameters () const
 
NumberOfParametersType GetNumberOfParameters () const override
 
unsigned int GetOutputSpaceDimension () const override
 
const ParametersTypeGetParameters () const override
 
TransformCategoryEnum GetTransformCategory () const override
 
std::string GetTransformTypeAsString () const override
 
virtual bool IsLinear () const
 
 itkCloneMacro (Self)
 
void SetFixedParameters (const FixedParametersType &) override=0
 
void SetParameters (const ParametersType &) override=0
 
void SetParametersByValue (const ParametersType &p) override
 
virtual OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &) const
 
virtual OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &vector, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &) const
 
virtual OutputVectorPixelType TransformCovariantVector (const InputVectorPixelType &vector, const InputPointType &point) const
 
virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &) const
 
virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D (const InputDiffusionTensor3DType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &) const
 
virtual OutputVectorPixelType TransformDiffusionTensor3D (const InputVectorPixelType &inputTensor, const InputPointType &point) const
 
virtual OutputPointType TransformPoint (const InputPointType &) const=0
 
virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &) const
 
virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &) const
 
virtual OutputVectorPixelType TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor, const InputPointType &point) const
 
virtual OutputVectorPixelType TransformVector (const InputVectorPixelType &) const
 
virtual OutputVectorPixelType TransformVector (const InputVectorPixelType &vector, const InputPointType &point) const
 
virtual OutputVectorType TransformVector (const InputVectorType &) const
 
virtual OutputVectorType TransformVector (const InputVectorType &vector, const InputPointType &point) const
 
virtual OutputVnlVectorType TransformVector (const InputVnlVectorType &) const
 
virtual OutputVnlVectorType TransformVector (const InputVnlVectorType &vector, const InputPointType &point) const
 
virtual void UpdateTransformParameters (const DerivativeType &update, ParametersValueType factor=1.0)
 
virtual void ComputeJacobianWithRespectToPosition (const InputPointType &, JacobianPositionType &) const
 
template< typename TImage > std std::enable_if_t< TImage::ImageDimension==VInputDimension &&TImage::ImageDimension==VOutputDimension, void > ApplyToImageMetadata (SmartPointer< TImage > image) const
 
- Public Member Functions inherited from TransformBaseTemplate< double >
virtual void CopyInFixedParameters (const FixedParametersValueType *const begin, const FixedParametersValueType *const end)=0
 
virtual void CopyInParameters (const ParametersValueType *const begin, const ParametersValueType *const end)=0
 
virtual const FixedParametersTypeGetFixedParameters () const=0
 
virtual unsigned int GetInputSpaceDimension () const=0
 
virtual NumberOfParametersType GetNumberOfParameters () const=0
 
virtual unsigned int GetOutputSpaceDimension () const=0
 
virtual const ParametersTypeGetParameters () const=0
 
virtual TransformCategoryEnum GetTransformCategory () const=0
 
virtual std::string GetTransformTypeAsString () const=0
 
 ITK_DISALLOW_COPY_AND_MOVE (TransformBaseTemplate)
 
 itkGetConstReferenceMacro (InputSpaceName, std::string)
 
 itkGetConstReferenceMacro (OutputSpaceName, std::string)
 
 itkOverrideGetNameOfClassMacro (TransformBaseTemplate)
 
 itkSetMacro (InputSpaceName, std::string)
 
 itkSetMacro (OutputSpaceName, std::string)
 
virtual void SetFixedParameters (const FixedParametersType &)=0
 
virtual void SetParameters (const ParametersType &)=0
 
virtual void SetParametersByValue (const ParametersType &p)=0
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int InputDimension = VDimension
 
static constexpr unsigned int OutputDimension = VDimension
 
- Static Public Attributes inherited from itk::MultiTransform< double, 3, 3 >
static constexpr unsigned int InputDimension
 
static constexpr unsigned int OutputDimension
 
static constexpr unsigned int SubInputDimension
 
static constexpr unsigned int SubOutputDimension
 
- Static Public Attributes inherited from itk::Transform< double, VDimension, VSubDimensions >
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
 

Protected Member Functions

 CompositeTransform ()=default
 
const TransformQueueTypeGetTransformsToOptimizeQueue () const
 
LightObject::Pointer InternalClone () const override
 
void PopBackTransform () override
 
void PopFrontTransform () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void PushBackTransform (TransformTypePointer t) override
 
void PushFrontTransform (TransformTypePointer t) override
 
 ~CompositeTransform () override=default
 
- Protected Member Functions inherited from itk::MultiTransform< double, 3, 3 >
 MultiTransform ()=default
 
virtual void PopBackTransform ()
 
virtual void PopFrontTransform ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void PushBackTransform (TransformTypePointer t)
 
virtual void PushFrontTransform (TransformTypePointer t)
 
 ~MultiTransform () override=default
 
- Protected Member Functions inherited from itk::Transform< double, VDimension, VSubDimensions >
LightObject::Pointer InternalClone () const override
 
OutputDiffusionTensor3DType PreservationOfPrincipalDirectionDiffusionTensor3DReorientation (const InputDiffusionTensor3DType &, const InverseJacobianPositionType &) const
 
 Transform ()=default
 
 Transform (NumberOfParametersType numberOfParameters)
 
 ~Transform () override=default
 
- Protected Member Functions inherited from TransformBaseTemplate< double >
 TransformBaseTemplate ()=default
 
 ~TransformBaseTemplate () override=default
 

Protected Attributes

TransformsToOptimizeFlagsType m_TransformsToOptimizeFlags {}
 
TransformQueueType m_TransformsToOptimizeQueue {}
 
- Protected Attributes inherited from itk::MultiTransform< double, 3, 3 >
ModifiedTimeType m_LocalParametersUpdateTime
 
NumberOfParametersType m_NumberOfLocalParameters
 
TransformQueueType m_TransformQueue
 
- Protected Attributes inherited from itk::Transform< double, VDimension, VSubDimensions >
FixedParametersType m_FixedParameters
 
ParametersType m_Parameters
 

Private Attributes

ModifiedTimeType m_PreviousTransformsToOptimizeUpdateTime {}
 

Additional Inherited Members

- Public Attributes inherited from itk::Transform< double, VDimension, VSubDimensions >
InverseJacobianPositionType &jacobian const
 
- Static Protected Member Functions inherited from itk::Transform< double, VDimension, VSubDimensions >
static InverseTransformBasePointer InvertTransform (const TTransform &transform)
 

Member Typedef Documentation

◆ ConstPointer

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::CompositeTransform< TParametersValueType, VDimension >::ConstPointer = SmartPointer<const Self>

Definition at line 96 of file itkCompositeTransform.h.

◆ Pointer

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::CompositeTransform< TParametersValueType, VDimension >::Pointer = SmartPointer<Self>

Definition at line 95 of file itkCompositeTransform.h.

◆ ScalarType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MultiTransform< TParametersValueType, VDimension, VSubDimensions >::ScalarType = ParametersValueType

Definition at line 88 of file itkMultiTransform.h.

◆ Self

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::CompositeTransform< TParametersValueType, VDimension >::Self = CompositeTransform

Standard class type aliases.

Definition at line 93 of file itkCompositeTransform.h.

◆ Superclass

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::CompositeTransform< TParametersValueType, VDimension >::Superclass = MultiTransform<TParametersValueType, VDimension, VDimension>

Definition at line 94 of file itkCompositeTransform.h.

◆ TransformQueueType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MultiTransform< TParametersValueType, VDimension, VSubDimensions >::TransformQueueType = std::deque<TransformTypePointer>

Transform queue type

Definition at line 140 of file itkMultiTransform.h.

◆ TransformsToOptimizeFlagsType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::CompositeTransform< TParametersValueType, VDimension >::TransformsToOptimizeFlagsType = std::deque<bool>

Optimization flags queue type

Definition at line 166 of file itkCompositeTransform.h.

◆ TransformType

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::CompositeTransform< TParametersValueType, VDimension >::TransformType = typename Superclass::TransformType

Sub transform type

Definition at line 105 of file itkCompositeTransform.h.

◆ TransformTypePointer

template<typename TParametersValueType = double, unsigned int VDimension = 3>
using itk::MultiTransform< TParametersValueType, VDimension, VSubDimensions >::TransformTypePointer = typename TransformType::Pointer

Definition at line 79 of file itkMultiTransform.h.

Constructor & Destructor Documentation

◆ CompositeTransform()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
itk::CompositeTransform< TParametersValueType, VDimension >::CompositeTransform ( )
protecteddefault

◆ ~CompositeTransform()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
itk::CompositeTransform< TParametersValueType, VDimension >::~CompositeTransform ( )
overrideprotecteddefault

Member Function Documentation

◆ ClearTransformQueue()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::ClearTransformQueue ( )
inlineoverridevirtual

Clear the transform queue.

Reimplemented from itk::MultiTransform< double, 3, 3 >.

Definition at line 240 of file itkCompositeTransform.h.

◆ ComputeJacobianWithRespectToParameters()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::ComputeJacobianWithRespectToParameters ( const InputPointType p,
JacobianType outJacobian 
) const
overridevirtual

Compute the Jacobian with respect to the parameters for the composite transform using Jacobian rule. See comments in the implementation.

Implements itk::Transform< double, VDimension, VSubDimensions >.

◆ ComputeJacobianWithRespectToParametersCachedTemporaries()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::ComputeJacobianWithRespectToParametersCachedTemporaries ( const InputPointType p,
JacobianType outJacobian,
JacobianType cacheJacobian 
) const
overridevirtual

Expanded interface to Compute the Jacobian with respect to the parameters for the composite transform using Jacobian rule. This version takes in temporary variables to avoid excessive constructions and memory allocations. NOTE: outJacobian MUST be sized correctly prior to the call; outJacobian's size should be [VDimension, this->GetNumberOfLocalParameters() ] jacobianCache may be resized internally and will be reused between calls

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ FlattenTransformQueue()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual void itk::CompositeTransform< TParametersValueType, VDimension >::FlattenTransformQueue ( )
virtual

Flatten the transform queue such that there are no nested composite transforms.

◆ GetFixedParameters()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
const FixedParametersType & itk::CompositeTransform< TParametersValueType, VDimension >::GetFixedParameters ( ) const
overridevirtual

Get the fixed parameters.

Implements TransformBaseTemplate< double >.

◆ GetInverse()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
bool itk::CompositeTransform< TParametersValueType, VDimension >::GetInverse ( Self inverse) 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. The inverse consists of the inverse of each sub-transform, in the reverse order of the forward transforms.

◆ GetInverseTransform()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
InverseTransformBasePointer itk::CompositeTransform< TParametersValueType, VDimension >::GetInverseTransform ( ) const
overridevirtual

Return an inverse of this transform. If the inverse has not been implemented, return nullptr. The type of the inverse transform does not necessarily need to match the type of the forward transform. This allows one to return a numeric inverse transform instead.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ GetNameOfClass()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
const char * itk::CompositeTransform< TParametersValueType, VDimension >::GetNameOfClass ( ) const
override

◆ GetNthTransformToOptimize()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual bool itk::CompositeTransform< TParametersValueType, VDimension >::GetNthTransformToOptimize ( SizeValueType  i) const
inlinevirtual

Definition at line 227 of file itkCompositeTransform.h.

◆ GetNumberOfFixedParameters()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
NumberOfParametersType itk::CompositeTransform< TParametersValueType, VDimension >::GetNumberOfFixedParameters ( ) const
overridevirtual

Return the number of parameters that define the constant elements of a Transform

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ GetNumberOfLocalParameters()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
NumberOfParametersType itk::CompositeTransform< TParametersValueType, VDimension >::GetNumberOfLocalParameters ( ) const
overridevirtual

Return the number of local parameters that completely defines the Transform at an individual voxel. For transforms with local support, this will enable downstream computation of the jacobian wrt only the local support region. For instance, in the case of a deformation field, this will be equal to the number of image dimensions. If it is an affine transform, this will be the same as the GetNumberOfParameters().

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ GetNumberOfParameters()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
NumberOfParametersType itk::CompositeTransform< TParametersValueType, VDimension >::GetNumberOfParameters ( ) const
overridevirtual

Return the number of parameters that completely define the Transform

Implements TransformBaseTemplate< double >.

◆ GetParameters()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
const ParametersType & itk::CompositeTransform< TParametersValueType, VDimension >::GetParameters ( ) const
overridevirtual

Get/Set Parameter functions work on the current list of transforms that are set to be optimized (active) using the 'Set[Nth|All]TransformToOptimize' routines. The parameter data from each active transform is concatenated into a single ParametersType object.

Note
The sub-transforms are read in reverse queue order, so the returned array is ordered in the same way. That is, the last sub-transform to be added is returned first in the parameter array. This is the opposite of what's done in the parent MultiTransform class.

Implements TransformBaseTemplate< double >.

◆ GetTransformCategory()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
TransformCategoryEnum itk::CompositeTransform< TParametersValueType, VDimension >::GetTransformCategory ( ) const
overridevirtual

Special handling for composite transform. If all transforms are linear, then return category Linear. Otherwise if all transforms set to optimize are DisplacementFields, then return DisplacementField category.

Implements TransformBaseTemplate< double >.

◆ GetTransformsToOptimizeFlags()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual const TransformsToOptimizeFlagsType & itk::CompositeTransform< TParametersValueType, VDimension >::GetTransformsToOptimizeFlags ( ) const
inlinevirtual

Access optimize flags

Definition at line 234 of file itkCompositeTransform.h.

◆ GetTransformsToOptimizeQueue()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
const TransformQueueType & itk::CompositeTransform< TParametersValueType, VDimension >::GetTransformsToOptimizeQueue ( ) const
protected

Get a list of transforms to optimize. Helper function.

◆ InternalClone()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
LightObject::Pointer itk::CompositeTransform< TParametersValueType, VDimension >::InternalClone ( ) const
overrideprotected

Clone the current transform

◆ New()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
static Pointer itk::CompositeTransform< TParametersValueType, VDimension >::New ( )
static

New macro for creation of through a Smart Pointer

◆ PopBackTransform()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::PopBackTransform ( )
inlineoverrideprotectedvirtual

Reimplemented from itk::MultiTransform< double, 3, 3 >.

Definition at line 457 of file itkCompositeTransform.h.

◆ PopFrontTransform()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::PopFrontTransform ( )
inlineoverrideprotectedvirtual

Reimplemented from itk::MultiTransform< double, 3, 3 >.

Definition at line 450 of file itkCompositeTransform.h.

◆ PrintSelf()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected

◆ PushBackTransform()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::PushBackTransform ( TransformTypePointer  t)
inlineoverrideprotected

Definition at line 442 of file itkCompositeTransform.h.

◆ PushFrontTransform()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::PushFrontTransform ( TransformTypePointer  t)
inlineoverrideprotected

Definition at line 434 of file itkCompositeTransform.h.

◆ SetAllTransformsToOptimize()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual void itk::CompositeTransform< TParametersValueType, VDimension >::SetAllTransformsToOptimize ( bool  state)
inlinevirtual

Definition at line 194 of file itkCompositeTransform.h.

◆ SetAllTransformsToOptimizeOff()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual void itk::CompositeTransform< TParametersValueType, VDimension >::SetAllTransformsToOptimizeOff ( )
inlinevirtual

Definition at line 207 of file itkCompositeTransform.h.

◆ SetAllTransformsToOptimizeOn()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual void itk::CompositeTransform< TParametersValueType, VDimension >::SetAllTransformsToOptimizeOn ( )
inlinevirtual

Definition at line 201 of file itkCompositeTransform.h.

◆ SetFixedParameters()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::SetFixedParameters ( const FixedParametersType )
overridevirtual

Set the fixed parameters and update internal transformation.

Implements itk::Transform< double, VDimension, VSubDimensions >.

◆ SetNthTransformToOptimize()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual void itk::CompositeTransform< TParametersValueType, VDimension >::SetNthTransformToOptimize ( SizeValueType  i,
bool  state 
)
inlinevirtual

Active Transform state manipulation

Definition at line 175 of file itkCompositeTransform.h.

◆ SetNthTransformToOptimizeOff()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual void itk::CompositeTransform< TParametersValueType, VDimension >::SetNthTransformToOptimizeOff ( SizeValueType  i)
inlinevirtual

Definition at line 188 of file itkCompositeTransform.h.

◆ SetNthTransformToOptimizeOn()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual void itk::CompositeTransform< TParametersValueType, VDimension >::SetNthTransformToOptimizeOn ( SizeValueType  i)
inlinevirtual

Definition at line 182 of file itkCompositeTransform.h.

◆ SetOnlyMostRecentTransformToOptimizeOn()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
virtual void itk::CompositeTransform< TParametersValueType, VDimension >::SetOnlyMostRecentTransformToOptimizeOn ( )
inlinevirtual

Definition at line 216 of file itkCompositeTransform.h.

◆ SetParameters()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::SetParameters ( const ParametersType )
overridevirtual

Set the transformation parameters and update internal transformation. SetParameters gives the transform the option to set it's parameters by keeping a reference to the parameters, or by copying. To force the transform to copy its parameters call SetParametersByValue.

See also
SetParametersByValue

Implements itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformCovariantVector() [1/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputCovariantVectorType itk::CompositeTransform< TParametersValueType, VDimension >::TransformCovariantVector ( const InputCovariantVectorType ) const
overridevirtual

Method to transform a CovariantVector.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformCovariantVector() [2/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputCovariantVectorType itk::CompositeTransform< TParametersValueType, VDimension >::TransformCovariantVector ( const InputCovariantVectorType vector,
const InputPointType point 
) const
overridevirtual

Method to transform a CovariantVector, using a point. Global transforms can ignore the point parameter. Local transforms (e.g. deformation field transform) must override and provide required behavior. By default, point is ignored and TransformCovariantVector(vector) is called

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformCovariantVector() [3/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorPixelType itk::CompositeTransform< TParametersValueType, VDimension >::TransformCovariantVector ( const InputVectorPixelType ) const
overridevirtual

Method to transform a CovariantVector stored in a VectorImage.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformCovariantVector() [4/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorPixelType itk::CompositeTransform< TParametersValueType, VDimension >::TransformCovariantVector ( const InputVectorPixelType vector,
const InputPointType point 
) const
overridevirtual

Method to transform a CovariantVector, using a point. Global transforms can ignore the point parameter. Local transforms (e.g. deformation field transform) must override and provide required behavior. By default, point is ignored and TransformCovariantVector(vector) is called

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformDiffusionTensor3D() [1/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputDiffusionTensor3DType itk::CompositeTransform< TParametersValueType, VDimension >::TransformDiffusionTensor3D ( const InputDiffusionTensor3DType ) const
overridevirtual

Method to transform a diffusion tensor

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformDiffusionTensor3D() [2/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputDiffusionTensor3DType itk::CompositeTransform< TParametersValueType, VDimension >::TransformDiffusionTensor3D ( const InputDiffusionTensor3DType inputTensor,
const InputPointType point 
) const
overridevirtual

Method to transform a diffusion tensor at a point. Global transforms can ignore the point parameter. Local transforms (e.g. deformation field transform) must override and provide required behavior. By default, point is ignored and TransformDiffusionTensor(tensor) is called

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformDiffusionTensor3D() [3/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorPixelType itk::CompositeTransform< TParametersValueType, VDimension >::TransformDiffusionTensor3D ( const InputVectorPixelType ) const
overridevirtual

Method to transform a diffusion tensor stored in a VectorImage

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformDiffusionTensor3D() [4/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorPixelType itk::CompositeTransform< TParametersValueType, VDimension >::TransformDiffusionTensor3D ( const InputVectorPixelType inputTensor,
const InputPointType inputPoint 
) const
overridevirtual

◆ TransformPoint()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputPointType itk::CompositeTransform< TParametersValueType, VDimension >::TransformPoint ( const InputPointType inputPoint) const
overridevirtual

Compute the position of point in the new space.

Transforms are applied starting from the back of the queue. That is, in reverse order of which they were added, in order to work properly with ResampleFilter.

Imagine a user wants to apply an Affine transform followed by a Deformation Field (DF) transform. He adds the Affine, then the DF. Because the user typically conceptualizes a transformation as being applied from the Moving image to the Fixed image, this makes intuitive sense. But since the ResampleFilter expects to transform from the Fixed image to the Moving image, the transforms are applied in reverse order of addition, i.e. from the back of the queue, and thus, DF then Affine.

Implements itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformSymmetricSecondRankTensor() [1/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputSymmetricSecondRankTensorType itk::CompositeTransform< TParametersValueType, VDimension >::TransformSymmetricSecondRankTensor ( const InputSymmetricSecondRankTensorType ) const
overridevirtual

Method to transform a ssr tensor stored in a VectorImage

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformSymmetricSecondRankTensor() [2/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputSymmetricSecondRankTensorType itk::CompositeTransform< TParametersValueType, VDimension >::TransformSymmetricSecondRankTensor ( const InputSymmetricSecondRankTensorType inputTensor,
const InputPointType point 
) const
overridevirtual

Method to transform a diffusion tensor at a point. Global transforms can ignore the point parameter. Local transforms (e.g. deformation field transform) must override and provide required behavior. By default, point is ignored and TransformSymmetricSecondRankTensor(tensor) is called

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformSymmetricSecondRankTensor() [3/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorPixelType itk::CompositeTransform< TParametersValueType, VDimension >::TransformSymmetricSecondRankTensor ( const InputVectorPixelType ) const
overridevirtual

Method to transform a ssr tensor stored in a VectorImage

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformSymmetricSecondRankTensor() [4/4]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorPixelType itk::CompositeTransform< TParametersValueType, VDimension >::TransformSymmetricSecondRankTensor ( const InputVectorPixelType inputTensor,
const InputPointType point 
) const
overridevirtual

Method to transform a diffusion tensor stored in a VectorImage, at a point. Global transforms can ignore the point parameter. Local transforms (e.g. deformation field transform) must override and provide required behavior. By default, point is ignored and TransformDiffusionTensor(tensor) is called

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformVector() [1/6]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorPixelType itk::CompositeTransform< TParametersValueType, VDimension >::TransformVector ( const InputVectorPixelType ) const
overridevirtual

Method to transform a vector stored in a VectorImage.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformVector() [2/6]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorPixelType itk::CompositeTransform< TParametersValueType, VDimension >::TransformVector ( const InputVectorPixelType vector,
const InputPointType point 
) const
overridevirtual

Method to transform a vector stored in a VectorImage, at a point. For global transforms, point is ignored and TransformVector( vector ) is called. Local transforms (e.g. deformation field transform) must override and provide required behavior.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformVector() [3/6]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorType itk::CompositeTransform< TParametersValueType, VDimension >::TransformVector ( const InputVectorType ) const
overridevirtual

Method to transform a vector.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformVector() [4/6]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVectorType itk::CompositeTransform< TParametersValueType, VDimension >::TransformVector ( const InputVectorType vector,
const InputPointType point 
) const
overridevirtual

Method to transform a vector at a given location. For global transforms, point is ignored and TransformVector( vector ) is called. Local transforms (e.g. deformation field transform) must override and provide required behavior.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformVector() [5/6]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVnlVectorType itk::CompositeTransform< TParametersValueType, VDimension >::TransformVector ( const InputVnlVectorType ) const
overridevirtual

Method to transform a vnl_vector.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ TransformVector() [6/6]

template<typename TParametersValueType = double, unsigned int VDimension = 3>
OutputVnlVectorType itk::CompositeTransform< TParametersValueType, VDimension >::TransformVector ( const InputVnlVectorType vector,
const InputPointType point 
) const
overridevirtual

Method to transform a vnl_vector, at a point. For global transforms, point is ignored and TransformVector( vector ) is called. Local transforms (e.g. deformation field transform) must override and provide required behavior.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

◆ UpdateTransformParameters()

template<typename TParametersValueType = double, unsigned int VDimension = 3>
void itk::CompositeTransform< TParametersValueType, VDimension >::UpdateTransformParameters ( const DerivativeType update,
ScalarType  factor = 1.0 
)
overridevirtual

Update the transform's parameters by the values in update. See GetParameters() for parameter ordering.

Reimplemented from itk::Transform< double, VDimension, VSubDimensions >.

Member Data Documentation

◆ InputDimension

template<typename TParametersValueType = double, unsigned int VDimension = 3>
constexpr unsigned int itk::CompositeTransform< TParametersValueType, VDimension >::InputDimension = VDimension
staticconstexpr

Dimension of the domain spaces.

Definition at line 169 of file itkCompositeTransform.h.

◆ m_PreviousTransformsToOptimizeUpdateTime

template<typename TParametersValueType = double, unsigned int VDimension = 3>
ModifiedTimeType itk::CompositeTransform< TParametersValueType, VDimension >::m_PreviousTransformsToOptimizeUpdateTime {}
mutableprivate

Definition at line 471 of file itkCompositeTransform.h.

◆ m_TransformsToOptimizeFlags

template<typename TParametersValueType = double, unsigned int VDimension = 3>
TransformsToOptimizeFlagsType itk::CompositeTransform< TParametersValueType, VDimension >::m_TransformsToOptimizeFlags {}
protected

Definition at line 468 of file itkCompositeTransform.h.

◆ m_TransformsToOptimizeQueue

template<typename TParametersValueType = double, unsigned int VDimension = 3>
TransformQueueType itk::CompositeTransform< TParametersValueType, VDimension >::m_TransformsToOptimizeQueue {}
mutableprotected

Definition at line 467 of file itkCompositeTransform.h.

◆ OutputDimension

template<typename TParametersValueType = double, unsigned int VDimension = 3>
constexpr unsigned int itk::CompositeTransform< TParametersValueType, VDimension >::OutputDimension = VDimension
staticconstexpr

Definition at line 170 of file itkCompositeTransform.h.


The documentation for this class was generated from the following file: