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

public class Transform extends Object
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
    Modifier and Type
    Field
    Description
    protected boolean
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    itk::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.
     
    Transform(Image displacement)
    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 Type
    Method
    Description
    void
    virtual itk::simple::Transform::~Transform()
    protected void
     
    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.
     
    virtual std::string itk::simple::Transform::GetName() const return user readable name for the SimpleITK transform
    long
    unsigned int itk::simple::Transform::GetNumberOfFixedParameters() const Get the number of fixed parameters
    long
    unsigned int itk::simple::Transform::GetNumberOfParameters() const Return the number of optimizable parameters
     
    TransformEnum itk::simple::Transform::GetTransformEnum() const Get the TransformEnum of the underlying Transform.
    boolean
    virtual bool itk::simple::Transform::IsLinear() const
    void
    void itk::simple::Transform::MakeUnique() Performs actually coping if needed to make object unique.
    void
     
    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
     
    protected static long
     
    std::string itk::simple::Transform::ToString() const
    std::vector< double > itk::simple::Transform::TransformPoint(const std::vector< double > &point) const Apply transform to a 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
    void itk::simple::Transform::WriteTransform(const std::string &filename) const

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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

      public Transform(long dimensions, TransformEnum type)
      itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. Deprecated This constructor will be removed in future releases.
    • Transform

      public Transform(Image displacement, TransformEnum type)
      itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. Deprecated This constructor will be removed in future releases.
    • Transform

      public Transform(Image displacement)
      itk::simple::Transform::Transform(unsigned int dimensions, TransformEnum type) Construct a specific transformation. Deprecated This constructor will be removed in future releases.
    • Transform

      public Transform(Transform arg0)
      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

      protected static long getCPtr(Transform obj)
    • swigRelease

      protected static long swigRelease(Transform obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • 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

      public void setParameters(VectorDouble parameters)
    • getParameters

      public VectorDouble getParameters()
    • getNumberOfParameters

      public long getNumberOfParameters()
      unsigned int itk::simple::Transform::GetNumberOfParameters() const Return the number of optimizable parameters
    • setFixedParameters

      public void setFixedParameters(VectorDouble parameters)
    • getFixedParameters

      public VectorDouble getFixedParameters()
    • getNumberOfFixedParameters

      public long getNumberOfFixedParameters()
      unsigned int itk::simple::Transform::GetNumberOfFixedParameters() const Get the number of fixed parameters
    • transformPoint

      public VectorDouble transformPoint(VectorDouble point)
      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

      public VectorDouble 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. 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

      public void writeTransform(String filename)
      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

      public Transform 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

      public String toString()
      std::string itk::simple::Transform::ToString() const
      Overrides:
      toString in class Object
    • getName

      public String 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

      public TransformEnum 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.