Class CompositeTransform
java.lang.Object
org.itk.simple.Transform
org.itk.simple.CompositeTransform
This class contains a stack of transforms and concatenates them by
composition.
The transforms are composed in reverse order with the back being applied first: $ T_0 o T_1 = T_0(T_1(x)) $ Transforms are stored in a queue, in the following order: $ T_0, T_1, ... , T_N-1 $
Transforms are added via AddTransform(). This adds the transforms to the back of the queue.
The only parameters of the transform at the back of the queue are
exposed and optimizable for registration.
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.
See:
itk::CompositeTransform
C++ includes: sitkCompositeTransform.h
-
Field Summary
Fields inherited from class Transform
swigCMemOwn -
Constructor Summary
ConstructorsModifierConstructorDescriptionCompositeTransform(long dimensions) itk::simple::CompositeTransform::CompositeTransform(unsigned int dimensions) Construct an empty CompositeTransform.protectedCompositeTransform(long cPtr, boolean cMemoryOwn) itk::simple::CompositeTransform::CompositeTransform(unsigned int dimensions) Construct an empty CompositeTransform.CompositeTransform(Transform arg0) itk::simple::CompositeTransform::CompositeTransform(unsigned int dimensions) Construct an empty CompositeTransform.itk::simple::CompositeTransform::CompositeTransform(unsigned int dimensions) Construct an empty CompositeTransform. -
Method Summary
Modifier and TypeMethodDescriptionvoidSelf& itk::simple::CompositeTransform::AddTransform(Transform t) Add a transform to the back of the stack.voidvoid itk::simple::CompositeTransform::ClearTransforms() Remove all transforms from the stack.voiddelete()itk::simple::CompositeTransform::~CompositeTransform() overrideprotected voidfinalize()voidSelf& itk::simple::CompositeTransform::FlattenTransform() Removes nested composite transforms.Transform itk::simple::CompositeTransform::GetBackTransform() Get a copy of the back transform.protected static longgetName()std::string itk::simple::CompositeTransform::GetName() const override Name of this classgetNthTransform(long n) Transform itk::simple::CompositeTransform::GetNthTransform(unsigned int n) Get a copy of a transform in the stack.longunsigned int itk::simple::CompositeTransform::GetNumberOfTransforms() const The number of transforms in the stack.voidvoid itk::simple::CompositeTransform::RemoveTransform() Remove the active transform at the back.protected static longMethods inherited from class Transform
getCPtr, getDimension, getFixedParameters, getInverse, getITKBase, getNumberOfFixedParameters, getNumberOfParameters, getParameters, getTransformEnum, isLinear, makeUnique, setFixedParameters, setIdentity, setInverse, setParameters, swigRelease, toString, transformPoint, transformVector, writeTransformModifier and TypeMethodDescriptionprotected static longlongunsigned int itk::simple::Transform::GetDimension() const Return the dimension of the Transform ( 2D or 3D )Transform itk::simple::Transform::GetInverse() const Return a new inverse transform of the same type as this.longunsigned int itk::simple::Transform::GetNumberOfFixedParameters() const Get the number of fixed parameterslongunsigned int itk::simple::Transform::GetNumberOfParameters() const Return the number of optimizable parametersTransformEnum itk::simple::Transform::GetTransformEnum() const Get the TransformEnum of the underlying Transform.booleanisLinear()virtual bool itk::simple::Transform::IsLinear() constvoidvoid itk::simple::Transform::MakeUnique() Performs actually coping if needed to make object unique.voidsetFixedParameters(VectorDouble parameters) voidvirtual void itk::simple::Transform::SetIdentity()booleanvirtual bool itk::simple::Transform::SetInverse() Try to change the current transform to it's inverse.voidsetParameters(VectorDouble parameters) protected static longswigRelease(Transform obj) toString()std::string itk::simple::Transform::ToString() consttransformPoint(VectorDouble point) std::vector<double> itk::simple::Transform::TransformPoint(const std::vector< double > &point) const Apply transform to a point.transformVector(VectorDouble vector, VectorDouble point) std::vector<double> itk::simple::Transform::TransformVector(const std::vector< double > &vector, const std::vector< double > &point) const Apply transform to a vector at a point.voidwriteTransform(String filename) void itk::simple::Transform::WriteTransform(const std::string &filename) const
-
Constructor Details
-
CompositeTransform
protected CompositeTransform(long cPtr, boolean cMemoryOwn) -
CompositeTransform
public CompositeTransform(long dimensions) itk::simple::CompositeTransform::CompositeTransform(unsigned int dimensions) Construct an empty CompositeTransform. The created CompositeTransform is initialized with zero transforms. Additional transforms of dimensions can be added. -
CompositeTransform
itk::simple::CompositeTransform::CompositeTransform(unsigned int dimensions) Construct an empty CompositeTransform. The created CompositeTransform is initialized with zero transforms. Additional transforms of dimensions can be added. -
CompositeTransform
itk::simple::CompositeTransform::CompositeTransform(unsigned int dimensions) Construct an empty CompositeTransform. The created CompositeTransform is initialized with zero transforms. Additional transforms of dimensions can be added. -
CompositeTransform
itk::simple::CompositeTransform::CompositeTransform(unsigned int dimensions) Construct an empty CompositeTransform. The created CompositeTransform is initialized with zero transforms. Additional transforms of dimensions can be added.
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
-
delete
-
getName
-
flattenTransform
public void flattenTransform()Self& itk::simple::CompositeTransform::FlattenTransform() Removes nested composite transforms. If this transform contains additional composite transforms, then these nested composite transformed are removed, while preserving the order of the regular transforms and transferring ownership to the parent CompositeTransform. Nested composite transform may not be written to a file. -
addTransform
Self& itk::simple::CompositeTransform::AddTransform(Transform t) Add a transform to the back of the stack. A deep-copy of the transform is performed. The added transform will have the optimizable parameters, while the other parameters are part of the fixed parameters. -
getNumberOfTransforms
public long getNumberOfTransforms()unsigned int itk::simple::CompositeTransform::GetNumberOfTransforms() const The number of transforms in the stack. -
clearTransforms
public void clearTransforms()void itk::simple::CompositeTransform::ClearTransforms() Remove all transforms from the stack. -
removeTransform
public void removeTransform()void itk::simple::CompositeTransform::RemoveTransform() Remove the active transform at the back. If the stack is empty an exception will be thrown. -
getBackTransform
Transform itk::simple::CompositeTransform::GetBackTransform() Get a copy of the back transform. If the stack is empty an exception will be thrown. -
getNthTransform
Transform itk::simple::CompositeTransform::GetNthTransform(unsigned int n) Get a copy of a transform in the stack. If n is equal or greater than the number of transforms, then an exception will be thrown.
-