SimpleITK
1.0.1
|
#include <sitkLandmarkBasedTransformInitializerFilter.h>
Public Types | |
typedef typelist::MakeTypeList< BasicPixelID< float > >::Type | PixelIDTypeList |
typedef LandmarkBasedTransformInitializerFilter | Self |
![]() | |
typedef ImageFilter | Self |
![]() | |
typedef ProcessObject | Self |
Public Member Functions | |
Transform | Execute (const Transform &transform) |
Transform | Execute (const Transform &transform, const std::vector< double > &fixedLandmarks, const std::vector< double > &movingLandmarks, const std::vector< double > &landmarkWeight, const Image &referenceImage, unsigned int numberOfControlPoints) |
unsigned int | GetBSplineNumberOfControlPoints () const |
std::vector< double > | GetFixedLandmarks () const |
std::vector< double > | GetLandmarkWeight () const |
std::vector< double > | GetMovingLandmarks () const |
std::string | GetName () const |
Image | GetReferenceImage () const |
LandmarkBasedTransformInitializerFilter () | |
Self & | SetBSplineNumberOfControlPoints (unsigned int BSplineNumberOfControlPoints) |
Self & | SetFixedLandmarks (const std::vector< double > &FixedLandmarks) |
Self & | SetLandmarkWeight (const std::vector< double > &LandmarkWeight) |
Self & | SetMovingLandmarks (const std::vector< double > &MovingLandmarks) |
Self & | SetReferenceImage (const Image &ReferenceImage) |
std::string | ToString () const |
~LandmarkBasedTransformInitializerFilter () | |
![]() | |
ImageFilter () | |
virtual | ~ImageFilter ()=0 |
![]() | |
virtual void | Abort () |
virtual int | AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd) |
Add a Command Object to observer the event. More... | |
virtual float | GetProgress () const |
An Active Measurement of the progress of execution. More... | |
virtual bool | HasCommand (itk::simple::EventEnum event) const |
Query of this object has any registered commands for event. More... | |
ProcessObject () | |
virtual void | RemoveAllCommands () |
Remove all registered commands. More... | |
virtual | ~ProcessObject () |
virtual void | DebugOn () |
virtual void | DebugOff () |
virtual bool | GetDebug () const |
virtual void | SetDebug (bool debugFlag) |
virtual void | SetNumberOfThreads (unsigned int n) |
virtual unsigned int | GetNumberOfThreads () const |
Private Types | |
typedef Transform(Self::* | MemberFunctionType) (const Transform *transform) |
Private Member Functions | |
template<class TImageType > | |
Transform | ExecuteInternal (const Transform *transform) |
Private Attributes | |
unsigned int | m_BSplineNumberOfControlPoints |
std::vector< double > | m_FixedLandmarks |
std::vector< double > | m_LandmarkWeight |
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > | m_MemberFactory |
std::vector< double > | m_MovingLandmarks |
Image | m_ReferenceImage |
Friends | |
struct | detail::MemberFunctionAddressor< MemberFunctionType > |
Additional Inherited Members | |
![]() | |
static bool | GetGlobalDefaultDebug () |
static void | GlobalDefaultDebugOff () |
static void | GlobalDefaultDebugOn () |
static void | SetGlobalDefaultDebug (bool debugFlag) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static void | SetGlobalWarningDisplay (bool flag) |
static bool | GetGlobalWarningDisplay () |
static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
static unsigned int | GetGlobalDefaultNumberOfThreads () |
static double | GetGlobalDefaultCoordinateTolerance () |
Access the global tolerance to determine congruent spaces. More... | |
static void | SetGlobalDefaultCoordinateTolerance (double) |
Access the global tolerance to determine congruent spaces. More... | |
static double | GetGlobalDefaultDirectionTolerance () |
Access the global tolerance to determine congruent spaces. More... | |
static void | SetGlobalDefaultDirectionTolerance (double) |
Access the global tolerance to determine congruent spaces. More... | |
![]() | |
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
virtual itk::ProcessObject * | GetActiveProcess () |
virtual void | OnActiveProcessDelete () |
virtual void | onCommandDelete (const itk::simple::Command *cmd) throw () |
virtual void | PreUpdate (itk::ProcessObject *p) |
virtual void | RemoveITKObserver (EventCommand &e) |
![]() | |
NonCopyable () | |
![]() | |
static void | FixNonZeroIndex (TImageType *img) |
![]() | |
template<class TImageType > | |
static TImageType::ConstPointer | CastImageToITK (const Image &img) |
template<class TImageType > | |
static Image | CastITKToImage (TImageType *img) |
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector> | |
static Image | CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img) |
static const itk::EventObject & | GetITKEventObject (EventEnum e) |
template<typename T > | |
static std::ostream & | ToStringHelper (std::ostream &os, const T &v) |
static std::ostream & | ToStringHelper (std::ostream &os, const char &v) |
static std::ostream & | ToStringHelper (std::ostream &os, const signed char &v) |
static std::ostream & | ToStringHelper (std::ostream &os, const unsigned char &v) |
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 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 http://midasjournal.com/browse/publication/825
Definition at line 60 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
private |
Setup for member function dispatching
Definition at line 143 of file sitkLandmarkBasedTransformInitializerFilter.h.
typedef typelist::MakeTypeList<BasicPixelID<float> >::Type itk::simple::LandmarkBasedTransformInitializerFilter::PixelIDTypeList |
Define the pixels types supported by this filter
Definition at line 72 of file sitkLandmarkBasedTransformInitializerFilter.h.
typedef LandmarkBasedTransformInitializerFilter itk::simple::LandmarkBasedTransformInitializerFilter::Self |
Definition at line 62 of file sitkLandmarkBasedTransformInitializerFilter.h.
itk::simple::LandmarkBasedTransformInitializerFilter::LandmarkBasedTransformInitializerFilter | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
itk::simple::LandmarkBasedTransformInitializerFilter::~LandmarkBasedTransformInitializerFilter | ( | ) |
Destructor
Transform itk::simple::LandmarkBasedTransformInitializerFilter::Execute | ( | const Transform & | transform | ) |
Execute the filter on the input image
Transform itk::simple::LandmarkBasedTransformInitializerFilter::Execute | ( | const Transform & | transform, |
const std::vector< double > & | fixedLandmarks, | ||
const std::vector< double > & | movingLandmarks, | ||
const std::vector< double > & | landmarkWeight, | ||
const Image & | referenceImage, | ||
unsigned int | numberOfControlPoints | ||
) |
Execute the filter on the input image with the given parameters
|
private |
|
inline |
Set/Get the number of control points
Definition at line 123 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inline |
Definition at line 84 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inline |
Definition at line 104 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inline |
Get the shrink factors.
Definition at line 94 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inlinevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 125 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inline |
Definition at line 113 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inline |
Set/Get the number of control points
Definition at line 118 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inline |
Set the Fixed landmark point containers
Definition at line 79 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inline |
Set the landmark weight point containers Weight includes diagonal elements of weight matrix
Definition at line 99 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inline |
Set the Moving landmark point containers
Definition at line 89 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
inline |
Set the reference image to define the parametric domain for the BSpline transform
Definition at line 109 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
virtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 148 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
private |
Definition at line 160 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
private |
Definition at line 154 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
private |
Definition at line 158 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
private |
Definition at line 150 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
private |
Definition at line 156 of file sitkLandmarkBasedTransformInitializerFilter.h.
|
private |
Definition at line 159 of file sitkLandmarkBasedTransformInitializerFilter.h.