SimpleITK
|
CenteredTransformInitializerFilter is a helper class intended to initialize the center of rotation and the translation of Transforms having the center of rotation among their parameters. More...
#include <sitkCenteredTransformInitializerFilter.h>
CenteredTransformInitializerFilter is a helper class intended to initialize the center of rotation and the translation of Transforms having the center of rotation among their parameters.
This class is connected to the fixed image, moving image and transform involved in the registration. Two modes of operation are possible:
In the first mode, the geometrical center of the moving image is passed as initial center of rotation to the transform and the vector from the center of the fixed image to the center of the moving image is passed as the initial translation. This mode basically assumes that the anatomical objects to be registered are centered in their respective images. Hence the best initial guess for the registration is the one that superimposes those two centers.
In the second mode, the moments of gray level values are computed for both images. The center of mass of the moving image is then used as center of rotation. The vector between the two centers of mass is passes as the initial translation to the transform. This second approach assumes that the moments of the anatomical objects are similar for both images and hence the best initial guess for registration is to superimpose both mass centers. Note that this assumption will probably not hold in multi-modality registration.
Definition at line 67 of file sitkCenteredTransformInitializerFilter.h.
Public Types | |
enum | OperationModeType { GEOMETRY, MOMENTS } |
using | PixelIDTypeList = BasicPixelIDTypeList |
using | Self = CenteredTransformInitializerFilter |
Public Types inherited from itk::simple::ProcessObject | |
using | Self = ProcessObject |
Public Member Functions | |
CenteredTransformInitializerFilter () | |
Transform | Execute (const Image &fixedImage, const Image &movingImage, const Transform &transform) |
Self & | GeometryOn () |
std::string | GetName () const override |
OperationModeType | GetOperationMode () const |
Self & | MomentsOn () |
Self & | SetOperationMode (OperationModeType OperationMode) |
std::string | ToString () const override |
~CenteredTransformInitializerFilter () override | |
Public Member Functions inherited from itk::simple::ProcessObject | |
virtual void | Abort () |
virtual int | AddCommand (itk::simple::EventEnum event, const std::function< void()> &func) |
Directly add a callback to observe an event. More... | |
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 |
virtual void | SetNumberOfWorkUnits (unsigned int n) |
virtual unsigned int | GetNumberOfWorkUnits () const |
Private Types | |
typedef Transform(Self::* | MemberFunctionType) (const Image *fixedImage, const Image *movingImage, const itk::simple::Transform *transform) |
Private Member Functions | |
template<class TImageType > | |
Transform | ExecuteInternal (const Image *fixedImage, const Image *movingImage, const itk::simple::Transform *transform) |
Private Attributes | |
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > | m_MemberFactory |
OperationModeType | m_OperationMode |
Friends | |
struct | detail::MemberFunctionAddressor< MemberFunctionType > |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::simple::ProcessObject | |
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 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... | |
static bool | SetGlobalDefaultThreader (const std::string &threader) |
Set/Get the default threader used for process objects. More... | |
static std::string | GetGlobalDefaultThreader () |
Set/Get the default threader used for process objects. More... | |
static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
static unsigned int | GetGlobalDefaultNumberOfThreads () |
Set/Get the default threader used for process objects. More... | |
Protected Member Functions inherited from itk::simple::ProcessObject | |
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
virtual itk::ProcessObject * | GetActiveProcess () |
virtual void | OnActiveProcessDelete () |
virtual void | onCommandDelete (const itk::simple::Command *cmd) noexcept |
virtual void | PreUpdate (itk::ProcessObject *p) |
virtual void | RemoveITKObserver (EventCommand &e) |
Protected Member Functions inherited from itk::simple::NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
Static Protected Member Functions inherited from itk::simple::ProcessObject | |
template<class TImageType > | |
static TImageType::ConstPointer | CastImageToITK (const Image &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) |
template<unsigned int VImageDimension, unsigned int VLength, template< unsigned int > class TVector> | |
static Image | CastITKToImage (itk::Image< TVector< VLength >, VImageDimension > *img) |
template<class TImageType > | |
static Image | CastITKToImage (TImageType *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) |
|
private |
Setup for member function dispatching
Definition at line 142 of file sitkCenteredTransformInitializerFilter.h.
Define the pixels types supported by this filter
Definition at line 80 of file sitkCenteredTransformInitializerFilter.h.
Definition at line 70 of file sitkCenteredTransformInitializerFilter.h.
Enumerator | |
---|---|
GEOMETRY | |
MOMENTS |
Definition at line 82 of file sitkCenteredTransformInitializerFilter.h.
|
override |
Destructor
itk::simple::CenteredTransformInitializerFilter::CenteredTransformInitializerFilter | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
Transform itk::simple::CenteredTransformInitializerFilter::Execute | ( | const Image & | fixedImage, |
const Image & | movingImage, | ||
const Transform & | transform | ||
) |
Execute the filter on the input image
|
private |
|
inline |
Select between using the geometrical center of the images or using the center of mass given by the image intensities.
Definition at line 132 of file sitkCenteredTransformInitializerFilter.h.
|
inlineoverridevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 106 of file sitkCenteredTransformInitializerFilter.h.
|
inline |
Definition at line 100 of file sitkCenteredTransformInitializerFilter.h.
|
inline |
Select between using the geometrical center of the images or using the center of mass given by the image intensities.
Definition at line 123 of file sitkCenteredTransformInitializerFilter.h.
|
inline |
Definition at line 91 of file sitkCenteredTransformInitializerFilter.h.
|
overridevirtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 150 of file sitkCenteredTransformInitializerFilter.h.
|
private |
Definition at line 152 of file sitkCenteredTransformInitializerFilter.h.
|
private |
Definition at line 155 of file sitkCenteredTransformInitializerFilter.h.