SimpleITK  
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
itk::simple::CenteredTransformInitializerFilter Class Reference

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>

+ Inheritance diagram for itk::simple::CenteredTransformInitializerFilter:
+ Collaboration diagram for itk::simple::CenteredTransformInitializerFilter:

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)
 
SelfGeometryOn ()
 
std::string GetName () const override
 
OperationModeType GetOperationMode () const
 
SelfMomentsOn ()
 
SelfSetOperationMode (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::ProcessObjectGetActiveProcess ()
 
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
 
NonCopyableoperator= (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::EventObjectGetITKEventObject (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)
 

Detailed Description

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.

See also
itk::CenteredTransformInitializer

Definition at line 64 of file sitkCenteredTransformInitializerFilter.h.

Member Typedef Documentation

◆ MemberFunctionType

typedef Transform(Self::* itk::simple::CenteredTransformInitializerFilter::MemberFunctionType) (const Image *fixedImage, const Image *movingImage, const itk::simple::Transform *transform)
private

Setup for member function dispatching

Definition at line 108 of file sitkCenteredTransformInitializerFilter.h.

◆ PixelIDTypeList

Define the pixels types supported by this filter

Definition at line 76 of file sitkCenteredTransformInitializerFilter.h.

◆ Self

Definition at line 66 of file sitkCenteredTransformInitializerFilter.h.

Member Enumeration Documentation

◆ OperationModeType

Enumerator
GEOMETRY 
MOMENTS 

Definition at line 78 of file sitkCenteredTransformInitializerFilter.h.

Constructor & Destructor Documentation

◆ ~CenteredTransformInitializerFilter()

itk::simple::CenteredTransformInitializerFilter::~CenteredTransformInitializerFilter ( )
override

Destructor

◆ CenteredTransformInitializerFilter()

itk::simple::CenteredTransformInitializerFilter::CenteredTransformInitializerFilter ( )

Default Constructor that takes no arguments and initializes default parameters

Member Function Documentation

◆ Execute()

Transform itk::simple::CenteredTransformInitializerFilter::Execute ( const Image fixedImage,
const Image movingImage,
const Transform transform 
)

Execute the filter on the input image

◆ ExecuteInternal()

template<class TImageType >
Transform itk::simple::CenteredTransformInitializerFilter::ExecuteInternal ( const Image fixedImage,
const Image movingImage,
const itk::simple::Transform transform 
)
private

◆ GeometryOn()

Self& itk::simple::CenteredTransformInitializerFilter::GeometryOn ( )
inline

Select between using the geometrical center of the images or using the center of mass given by the image intensities.

Definition at line 101 of file sitkCenteredTransformInitializerFilter.h.

◆ GetName()

std::string itk::simple::CenteredTransformInitializerFilter::GetName ( ) const
inlineoverridevirtual

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 88 of file sitkCenteredTransformInitializerFilter.h.

◆ GetOperationMode()

OperationModeType itk::simple::CenteredTransformInitializerFilter::GetOperationMode ( ) const
inline

Definition at line 86 of file sitkCenteredTransformInitializerFilter.h.

◆ MomentsOn()

Self& itk::simple::CenteredTransformInitializerFilter::MomentsOn ( )
inline

Select between using the geometrical center of the images or using the center of mass given by the image intensities.

Definition at line 98 of file sitkCenteredTransformInitializerFilter.h.

◆ SetOperationMode()

Self& itk::simple::CenteredTransformInitializerFilter::SetOperationMode ( OperationModeType  OperationMode)
inline

Definition at line 82 of file sitkCenteredTransformInitializerFilter.h.

◆ ToString()

std::string itk::simple::CenteredTransformInitializerFilter::ToString ( ) const
overridevirtual

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

◆ detail::MemberFunctionAddressor< MemberFunctionType >

Definition at line 112 of file sitkCenteredTransformInitializerFilter.h.

Member Data Documentation

◆ m_MemberFactory

std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::CenteredTransformInitializerFilter::m_MemberFactory
private

Definition at line 114 of file sitkCenteredTransformInitializerFilter.h.

◆ m_OperationMode

OperationModeType itk::simple::CenteredTransformInitializerFilter::m_OperationMode
private

Definition at line 117 of file sitkCenteredTransformInitializerFilter.h.


The documentation for this class was generated from the following file: