|
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 |
|
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 |
|
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 > |
|
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 |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = Object |
|
using | Superclass = LightObject |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = LightObject |
|
|
void | ClearTransformQueue () override |
|
void | ComputeJacobianWithRespectToParameters (const InputPointType &p, JacobianType &outJacobian) const override |
|
virtual void | FlattenTransformQueue () |
|
const FixedParametersType & | GetFixedParameters () const override |
|
bool | GetInverse (Self *inverse) const |
|
InverseTransformBasePointer | GetInverseTransform () const override |
|
virtual const char * | GetNameOfClass () const |
|
virtual bool | GetNthTransformToOptimize (SizeValueType i) const |
|
NumberOfParametersType | GetNumberOfFixedParameters () const override |
|
NumberOfParametersType | GetNumberOfLocalParameters () const override |
|
NumberOfParametersType | GetNumberOfParameters () const override |
|
const ParametersType & | GetParameters () const override |
|
TransformCategoryEnum | GetTransformCategory () const override |
|
virtual const TransformsToOptimizeFlagsType & | GetTransformsToOptimizeFlags () 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 |
|
virtual void | AddTransform (TransformType *t) |
|
virtual void | AppendTransform (TransformType *t) |
|
virtual const TransformType * | GetBackTransform () const |
|
const FixedParametersType & | GetFixedParameters () const override |
|
virtual const TransformType * | GetFrontTransform () const |
|
bool | GetInverse (Self *inverse) const |
|
virtual const TransformTypePointer | GetNthTransform (SizeValueType n) const |
|
virtual const TransformType * | GetNthTransformConstPointer (const SizeValueType n) const |
|
virtual TransformType * | GetNthTransformModifiablePointer (const SizeValueType n) const |
|
NumberOfParametersType | GetNumberOfFixedParameters () const override |
|
NumberOfParametersType | GetNumberOfLocalParameters () const override |
|
NumberOfParametersType | GetNumberOfParameters () const override |
|
virtual SizeValueType | GetNumberOfTransforms () const |
|
const ParametersType & | GetParameters () const override |
|
TransformCategoryEnum | GetTransformCategory () const override |
|
virtual const TransformQueueType & | GetTransformQueue () 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 |
|
void | CopyInFixedParameters (const FixedParametersValueType *const begin, const FixedParametersValueType *const end) override |
|
void | CopyInParameters (const ParametersValueType *const begin, const ParametersValueType *const end) override |
|
const FixedParametersType & | GetFixedParameters () const override |
|
unsigned int | GetInputSpaceDimension () const override |
|
virtual const std::string & | GetInputSpaceName () const |
|
bool | GetInverse (Self *) const |
|
NumberOfParametersType | GetNumberOfParameters () const override |
|
unsigned int | GetOutputSpaceDimension () const override |
|
virtual const std::string & | GetOutputSpaceName () const |
|
const ParametersType & | GetParameters () 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 |
|
virtual void | SetParametersByValue (const ParametersType &p)=0 |
|
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 |
|
Command * | GetCommand (unsigned long tag) |
|
bool | GetDebug () const |
|
MetaDataDictionary & | GetMetaDataDictionary () |
|
const MetaDataDictionary & | GetMetaDataDictionary () const |
|
virtual ModifiedTimeType | GetMTime () const |
|
virtual const TimeStamp & | GetTimeStamp () 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 |
|
Pointer | Clone () const |
|
virtual void | Delete () |
|
virtual int | GetReferenceCount () const |
|
| itkTypeMacroNoParent (LightObject) |
|
void | Print (std::ostream &os, Indent indent=0) const |
|
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.
template<typename TParametersValueType = double, unsigned int VDimension = 3>
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 >.