Class LandmarkBasedTransformInitializerFilter

java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.LandmarkBasedTransformInitializerFilter

public class LandmarkBasedTransformInitializerFilter extends ImageFilter
This class computes the transform that aligns the fixed and moving images given a set of pair landmarks. The class is templated over the Transform type as well as fixed image and moving image types. The transform computed gives the best fit transform that maps the fixed and moving images in a least squares sense. The indices are taken to correspond, so point 1 in the first set will get mapped close to point 1 in the second set, etc. Currently, the following transforms are supported by the class: VersorRigid3DTransform Similarity3DTransform Rigid2DTransform AffineTransform BSplineTransform An equal number of fixed and moving landmarks need to be specified using SetFixedLandmarks() and SetMovingLandmarks() . Any number of landmarks may be specified. In the case of using Affine or BSpline transforms, each landmark pair can contribute in the final transform based on its defined weight. Number of weights should be equal to the number of landmarks and can be specified using SetLandmarkWeight() . By defaults are weights are set to one. Call InitializeTransform() to initialize the transform. The class is based in part on Hybrid/vtkLandmarkTransform originally implemented in python by David G. Gobbi. The solution is based on Berthold K. P. Horn (1987), "Closed-form solution of absolute orientation using unit quaternions," http://people.csail.mit.edu/bkph/papers/Absolute_Orientation.pdf The Affine Transform initializer is based on an algorithm by H Spaeth, and is described in the Insight Journal Article "Affine Transformation for Landmark Based Registration Initializer in ITK" by Kim E.Y., Johnson H., Williams N. available at https://www.midasjournal.org/browse/publication/825 Wiki Examples: All Examples Rigidly register one image to another using manually specified landmarks See: itk::simple::LandmarkBasedTransformInitializerFilter for the procedural interface itk::LandmarkBasedTransformInitializer for the Doxygen on the original ITK class. C++ includes: sitkLandmarkBasedTransformInitializerFilter.h
  • Constructor Details

    • LandmarkBasedTransformInitializerFilter

      protected LandmarkBasedTransformInitializerFilter(long cPtr, boolean cMemoryOwn)
    • LandmarkBasedTransformInitializerFilter

      public LandmarkBasedTransformInitializerFilter()
      itk::simple::LandmarkBasedTransformInitializerFilter::LandmarkBasedTransformInitializerFilter() Default Constructor that takes no arguments and initializes default parameters
  • Method Details

    • getCPtr

      protected static long getCPtr(LandmarkBasedTransformInitializerFilter obj)
    • swigRelease

      protected static long swigRelease(LandmarkBasedTransformInitializerFilter obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class ImageFilter
    • delete

      public void delete()
      itk::simple::LandmarkBasedTransformInitializerFilter::~LandmarkBasedTransformInitializerFilter() override Destructor
      Overrides:
      delete in class ImageFilter
    • setFixedLandmarks

      public void setFixedLandmarks(VectorDouble FixedLandmarks)
      Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetFixedLandmarks(const std::vector< double > &FixedLandmarks) Set the Fixed landmark point containers
    • getFixedLandmarks

      public VectorDouble getFixedLandmarks()
      std::vector<double> itk::simple::LandmarkBasedTransformInitializerFilter::GetFixedLandmarks() const
    • setMovingLandmarks

      public void setMovingLandmarks(VectorDouble MovingLandmarks)
      Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetMovingLandmarks(const std::vector< double > &MovingLandmarks) Set the Moving landmark point containers
    • getMovingLandmarks

      public VectorDouble getMovingLandmarks()
      std::vector<double> itk::simple::LandmarkBasedTransformInitializerFilter::GetMovingLandmarks() const Get the shrink factors.
    • setLandmarkWeight

      public void setLandmarkWeight(VectorDouble LandmarkWeight)
      Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetLandmarkWeight(const std::vector< double > &LandmarkWeight) Set the landmark weight point containers Weight includes diagonal elements of weight matrix
    • getLandmarkWeight

      public VectorDouble getLandmarkWeight()
      std::vector<double> itk::simple::LandmarkBasedTransformInitializerFilter::GetLandmarkWeight() const
    • setReferenceImage

      public void setReferenceImage(Image ReferenceImage)
      Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetReferenceImage(const Image &ReferenceImage) Set the reference image to define the parametric domain for the BSpline transform
    • getReferenceImage

      public Image getReferenceImage()
      Image itk::simple::LandmarkBasedTransformInitializerFilter::GetReferenceImage() const
    • setBSplineNumberOfControlPoints

      public void setBSplineNumberOfControlPoints(long BSplineNumberOfControlPoints)
      Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetBSplineNumberOfControlPoints(unsigned int BSplineNumberOfControlPoints) Set/Get the number of control points
    • getBSplineNumberOfControlPoints

      public long getBSplineNumberOfControlPoints()
      unsigned int itk::simple::LandmarkBasedTransformInitializerFilter::GetBSplineNumberOfControlPoints() const Set/Get the number of control points
    • getName

      public String getName()
      std::string itk::simple::LandmarkBasedTransformInitializerFilter::GetName() const override Name of this class
      Overrides:
      getName in class ProcessObject
    • toString

      public String toString()
      std::string itk::simple::LandmarkBasedTransformInitializerFilter::ToString() const override Print ourselves out
      Overrides:
      toString in class ProcessObject
    • execute

      public Transform execute(Transform transform)
      Transform itk::simple::LandmarkBasedTransformInitializerFilter::Execute(const Transform &transform) Execute the filter on the input image