Package org.itk.simple
Class Transform
java.lang.Object
org.itk.simple.Transform
- Direct Known Subclasses:
AffineTransform
,BSplineTransform
,ComposeScaleSkewVersor3DTransform
,CompositeTransform
,DisplacementFieldTransform
,Euler2DTransform
,Euler3DTransform
,ScaleSkewVersor3DTransform
,ScaleTransform
,ScaleVersor3DTransform
,Similarity2DTransform
,Similarity3DTransform
,TranslationTransform
,VersorRigid3DTransform
,VersorTransform
A simplified wrapper around a variety of ITK transforms.
The interface to ITK transform objects to be used with the ImageRegistrationMethod, ResampleImageFilter and other SimpleITK process objects. The transforms are designed to
have a serialized array of parameters to facilitate optimization for
registration.
Provides a base class interface to any type of ITK transform. Objects
of this type may have their interface converted to a derived interface
while keeping the same reference to the ITK object.
Additionally, this class provides a basic interface to a composite
transforms.
See:
itk::CompositeTransform
C++ includes: sitkTransform.h
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation.protected
Transform
(long cPtr, boolean cMemoryOwn) Transform
(long dimensions, TransformEnum type) itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation.itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation.Transform
(Image displacement, TransformEnum type) itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation.itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation.itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
virtual itk::simple::Transform::~Transform()protected void
finalize()
protected static long
long
unsigned 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.getName()
virtual std::string itk::simple::Transform::GetName() const return user readable name for the SimpleITK transformlong
unsigned int itk::simple::Transform::GetNumberOfFixedParameters() const Get the number of fixed parameterslong
unsigned int itk::simple::Transform::GetNumberOfParameters() const Return the number of optimizable parametersTransformEnum itk::simple::Transform::GetTransformEnum() const Get the TransformEnum of the underlying Transform.boolean
isLinear()
virtual bool itk::simple::Transform::IsLinear() constvoid
void itk::simple::Transform::MakeUnique() Performs actually coping if needed to make object unique.void
setFixedParameters
(VectorDouble parameters) void
virtual void itk::simple::Transform::SetIdentity()boolean
virtual bool itk::simple::Transform::SetInverse() Try to change the current transform to it's inverse.void
setParameters
(VectorDouble parameters) protected static long
swigRelease
(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.void
writeTransform
(String filename) void itk::simple::Transform::WriteTransform(const std::string &filename) const
-
Field Details
-
swigCMemOwn
protected transient boolean swigCMemOwn
-
-
Constructor Details
-
Transform
protected Transform(long cPtr, boolean cMemoryOwn) -
Transform
public Transform()itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. Deprecated This constructor will be removed in future releases. -
Transform
itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. Deprecated This constructor will be removed in future releases. -
Transform
itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. Deprecated This constructor will be removed in future releases. -
Transform
itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. Deprecated This constructor will be removed in future releases. -
Transform
itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. Deprecated This constructor will be removed in future releases. -
Transform
itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. Deprecated This constructor will be removed in future releases.
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize() -
delete
public void delete()virtual itk::simple::Transform::~Transform() -
getITKBase
-
getDimension
public long getDimension()unsigned int itk::simple::Transform::GetDimension() const Return the dimension of the Transform ( 2D or 3D ) -
setParameters
-
getParameters
-
getNumberOfParameters
public long getNumberOfParameters()unsigned int itk::simple::Transform::GetNumberOfParameters() const Return the number of optimizable parameters -
setFixedParameters
-
getFixedParameters
-
getNumberOfFixedParameters
public long getNumberOfFixedParameters()unsigned int itk::simple::Transform::GetNumberOfFixedParameters() const Get the number of fixed parameters -
transformPoint
std::vector< double > itk::simple::Transform::TransformPoint(const std::vector< double > &point) const Apply transform to a point. The dimension of the point must match the transform. -
transformVector
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. The ITK concept of a vector is a direction at a specific point, for example the difference between two points is a vector. For linear transforms the point does not matter, in general the vector is transformed by the Jacobian with respect to point position. The dimension of the vector and point must match the transform. -
writeTransform
void itk::simple::Transform::WriteTransform(const std::string &filename) const -
isLinear
public boolean isLinear()virtual bool itk::simple::Transform::IsLinear() const -
setIdentity
public void setIdentity()virtual void itk::simple::Transform::SetIdentity() -
setInverse
public boolean setInverse()virtual bool itk::simple::Transform::SetInverse() Try to change the current transform to it's inverse. If the transform has an inverse, i.e. non-singular linear transforms, then a new ITK transform is created of the same type and this object is set to it. However not all transform have a direct inverse, if the inverse does not exist or fails false will be returned and this transform will not be modified. -
getInverse
Transform itk::simple::Transform::GetInverse() const Return a new inverse transform of the same type as this. Creates a new transform object and tries to set the value to the inverse. As not all transform types have inverse and some transforms are not invertible, an exception will be throw is there is no inverse. -
toString
std::string itk::simple::Transform::ToString() const -
getName
virtual std::string itk::simple::Transform::GetName() const return user readable name for the SimpleITK transform -
makeUnique
public void makeUnique()void itk::simple::Transform::MakeUnique() Performs actually coping if needed to make object unique. The Transform class by default performs lazy coping and assignment. This method make sure that coping actually happens to the itk::Transform pointed to is only pointed to by this object. -
getTransformEnum
TransformEnum itk::simple::Transform::GetTransformEnum() const Get the TransformEnum of the underlying Transform. A SimpleITK Transform object can internally hold any ITK transform. This method returns the TransformEnum representing the internal ITK transform. This value may be used to identify which SimpleITK class the transform can be converted to.
-