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.
|
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 |
|
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 |
|
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 |
|
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 |
|
|
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 |
|
const char * | GetNameOfClass () const override |
|
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 |
|
const char * | GetNameOfClass () const override |
|
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 |
|
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 FixedParametersType & | GetFixedParameters () 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 ParametersType & | GetParameters () 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 |
|
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 FixedParametersType & | GetFixedParameters () const=0 |
|
virtual unsigned int | GetInputSpaceDimension () const=0 |
|
virtual NumberOfParametersType | GetNumberOfParameters () const=0 |
|
virtual unsigned int | GetOutputSpaceDimension () const=0 |
|
virtual const ParametersType & | GetParameters () 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 |
|