Package org.itk.simple
Class LandmarkBasedTransformInitializerFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.LandmarkBasedTransformInitializerFilter
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
-
Field Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::LandmarkBasedTransformInitializerFilter::LandmarkBasedTransformInitializerFilter() Default Constructor that takes no arguments and initializes default parametersprotected
LandmarkBasedTransformInitializerFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
itk::simple::LandmarkBasedTransformInitializerFilter::~LandmarkBasedTransformInitializerFilter() override DestructorTransform itk::simple::LandmarkBasedTransformInitializerFilter::Execute(const Transform &transform) Execute the filter on the input imageprotected void
finalize()
long
unsigned int itk::simple::LandmarkBasedTransformInitializerFilter::GetBSplineNumberOfControlPoints() const Set/Get the number of control pointsprotected static long
std::vector<double> itk::simple::LandmarkBasedTransformInitializerFilter::GetFixedLandmarks() conststd::vector<double> itk::simple::LandmarkBasedTransformInitializerFilter::GetLandmarkWeight() conststd::vector<double> itk::simple::LandmarkBasedTransformInitializerFilter::GetMovingLandmarks() const Get the shrink factors.getName()
std::string itk::simple::LandmarkBasedTransformInitializerFilter::GetName() const override Name of this classImage itk::simple::LandmarkBasedTransformInitializerFilter::GetReferenceImage() constvoid
setBSplineNumberOfControlPoints
(long BSplineNumberOfControlPoints) Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetBSplineNumberOfControlPoints(unsigned int BSplineNumberOfControlPoints) Set/Get the number of control pointsvoid
setFixedLandmarks
(VectorDouble FixedLandmarks) Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetFixedLandmarks(const std::vector< double > &FixedLandmarks) Set the Fixed landmark point containersvoid
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 matrixvoid
setMovingLandmarks
(VectorDouble MovingLandmarks) Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetMovingLandmarks(const std::vector< double > &MovingLandmarks) Set the Moving landmark point containersvoid
setReferenceImage
(Image ReferenceImage) Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetReferenceImage(const Image &ReferenceImage) Set the reference image to define the parametric domain for the BSpline transformprotected static long
toString()
std::string itk::simple::LandmarkBasedTransformInitializerFilter::ToString() const override Print ourselves outMethods inherited from class org.itk.simple.ImageFilter
getCPtr, swigRelease
Methods inherited from class org.itk.simple.ProcessObject
abort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
-
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
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classImageFilter
-
delete
public void delete()itk::simple::LandmarkBasedTransformInitializerFilter::~LandmarkBasedTransformInitializerFilter() override Destructor- Overrides:
delete
in classImageFilter
-
setFixedLandmarks
Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetFixedLandmarks(const std::vector< double > &FixedLandmarks) Set the Fixed landmark point containers -
getFixedLandmarks
std::vector<double> itk::simple::LandmarkBasedTransformInitializerFilter::GetFixedLandmarks() const -
setMovingLandmarks
Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetMovingLandmarks(const std::vector< double > &MovingLandmarks) Set the Moving landmark point containers -
getMovingLandmarks
std::vector<double> itk::simple::LandmarkBasedTransformInitializerFilter::GetMovingLandmarks() const Get the shrink factors. -
setLandmarkWeight
Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetLandmarkWeight(const std::vector< double > &LandmarkWeight) Set the landmark weight point containers Weight includes diagonal elements of weight matrix -
getLandmarkWeight
std::vector<double> itk::simple::LandmarkBasedTransformInitializerFilter::GetLandmarkWeight() const -
setReferenceImage
Self& itk::simple::LandmarkBasedTransformInitializerFilter::SetReferenceImage(const Image &ReferenceImage) Set the reference image to define the parametric domain for the BSpline transform -
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
std::string itk::simple::LandmarkBasedTransformInitializerFilter::GetName() const override Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::LandmarkBasedTransformInitializerFilter::ToString() const override Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
Transform itk::simple::LandmarkBasedTransformInitializerFilter::Execute(const Transform &transform) Execute the filter on the input image
-