ITK  5.4.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. He first adds the two Affines, then runs the optimization and both Affines transforms are optimized. Next, he adds the DF transform and calls 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 he runs 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.

Examples
Examples/IO/TransformReadWrite.cxx, Examples/RegistrationITKv4/DeformableRegistration15.cxx, Examples/RegistrationITKv4/ImageRegistration1.cxx, Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx, Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx, SphinxExamples/src/Core/Transform/CopyACompositeTransform/Code.cxx, SphinxExamples/src/Registration/Common/Perform2DTranslationRegistrationWithMeanSquares/Code.cxx, and SphinxExamples/src/Registration/Metricsv4/PerformRegistrationOnVectorImages/Code.cxx.

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

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< TParametersValueType, VDimension, VDimension >
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< TParametersValueType, VDimension, VSubDimensions >
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
 
virtual const std::string & GetInputSpaceName () const
 
bool GetInverse (Self *) const
 
const char * GetNameOfClass () const override
 
NumberOfParametersType GetNumberOfParameters () const override
 
unsigned int GetOutputSpaceDimension () const override
 
virtual const std::string & GetOutputSpaceName () const
 
const ParametersTypeGetParameters () const override
 
TransformCategoryEnum GetTransformCategory () const override
 
std::string GetTransformTypeAsString () const override
 
 itkCloneMacro (Self)
 
void SetFixedParameters (const FixedParametersType &) override=0
 
virtual void SetInputSpaceName (std::string _arg)
 
virtual void SetOutputSpaceName (std::string _arg)
 
void SetParameters (const ParametersType &) override=0
 
void SetParametersByValue (const ParametersType &p) override
 
virtual void ComputeJacobianWithRespectToPosition (const InputPointType &, JacobianPositionType &) const
 
 itkLegacyMacro (virtual void ComputeJacobianWithRespectToPosition(const InputPointType &x, JacobianType &jacobian) const)
 
 itkLegacyMacro (virtual void ComputeInverseJacobianWithRespectToPosition(const InputPointType &x, JacobianType &jacobian) const)
 
virtual void ComputeInverseJacobianWithRespectToPosition (const InputPointType &pnt, InverseJacobianPositionType &jacobian) const
 
std::enable_if_t< TImage::ImageDimension==VInputDimension &&TImage::ImageDimension==VOutputDimension, void > ApplyToImageMetadata (TImage *image) const
 
std::enable_if_t< TImage::ImageDimension==VInputDimension &&TImage::ImageDimension==VOutputDimension, void > ApplyToImageMetadata (SmartPointer< TImage > image) const
 
- Public Member Functions inherited from itk::TransformBaseTemplate< TParametersValueType >
virtual void SetParametersByValue (const ParametersType &p)=0
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int InputDimension = VDimension
 
static constexpr unsigned int OutputDimension = VDimension
 
- Static Public Attributes inherited from itk::MultiTransform< TParametersValueType, VDimension, VDimension >
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< TParametersValueType, VDimension, VSubDimensions >
static constexpr unsigned int InputSpaceDimension
 
static constexpr unsigned int OutputSpaceDimension
 

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< TParametersValueType, VDimension, VDimension >
 MultiTransform ()=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~MultiTransform () override=default
 
- Protected Member Functions inherited from itk::Transform< TParametersValueType, 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 itk::TransformBaseTemplate< TParametersValueType >
 TransformBaseTemplate ()=default
 
 ~TransformBaseTemplate () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

TransformsToOptimizeFlagsType m_TransformsToOptimizeFlags {}
 
TransformQueueType m_TransformsToOptimizeQueue {}
 
- Protected Attributes inherited from itk::MultiTransform< TParametersValueType, VDimension, VDimension >
ModifiedTimeType m_LocalParametersUpdateTime
 
NumberOfParametersType m_NumberOfLocalParameters
 
TransformQueueType m_TransformQueue
 
- Protected Attributes inherited from itk::Transform< TParametersValueType, VDimension, VSubDimensions >
FixedParametersType m_FixedParameters
 
ParametersType m_Parameters
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Private Attributes

ModifiedTimeType m_PreviousTransformsToOptimizeUpdateTime {}
 

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.

◆ 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.

◆ 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.

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< TParametersValueType, VDimension, VDimension >.

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< TParametersValueType, 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< TParametersValueType, 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 itk::TransformBaseTemplate< TParametersValueType >.

◆ 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< TParametersValueType, VDimension, VSubDimensions >.

◆ GetNameOfClass()

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

Run-time type information (and related methods).

Reimplemented from itk::Object.

◆ 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< TParametersValueType, 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< TParametersValueType, 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 itk::TransformBaseTemplate< TParametersValueType >.

◆ 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 itk::TransformBaseTemplate< TParametersValueType >.

◆ 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 itk::TransformBaseTemplate< TParametersValueType >.

◆ 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
overrideprotectedvirtual

Clone the current transform

Reimplemented from itk::LightObject.

◆ 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

◆ PopFrontTransform()

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

◆ PrintSelf()

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

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Object.

◆ PushBackTransform()

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

◆ PushFrontTransform()

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

◆ 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.

Implements itk::TransformBaseTemplate< TParametersValueType >.

◆ 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.

Implements itk::TransformBaseTemplate< TParametersValueType >.

◆ TransformCovariantVector() [1/4]

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

◆ 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< TParametersValueType, VDimension, VSubDimensions >.

◆ TransformCovariantVector() [3/4]

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

◆ 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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< TParametersValueType, 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: