go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elastix::RegistrationBase< TElastix > Class Template Reference

#include <elxRegistrationBase.h>

Detailed Description

template<class TElastix>
class elastix::RegistrationBase< TElastix >

This class is the elastix base class for all Registration schemes.

This class contains all the common functionality for Registrations.

Parameters

ErodeMask: a flag to determine if the masks should be eroded from one resolution level to another. Choose from {"true", "false"}
example: (ErodeMask "false")
The default is "true". The parameter may be specified for each resolution differently, but that's not obliged. The actual amount of erosion depends on the image pyramid.
Erosion of the mask prevents the border / edge of the mask taken into account. This can be useful for example for ultrasound images, where you don't want to take into account values outside the US-beam, but where you also don't want to match the edge / border of this beam. For example for MRI's of the head, the borders of the head may be wanted to match, and there erosion should be avoided.

ErodeFixedMask: a flag to determine if the fixed mask(s) should be eroded from one resolution level to another. Choose from {"true", "false"}
example: (ErodeFixedMask "true" "false") This setting overrules ErodeMask.

ErodeMovingMask: a flag to determine if the moving mask(s) should be eroded from one resolution level to another. Choose from {"true", "false"}
example: (ErodeMovingMask "true" "false") This setting overrules ErodeMask.

ErodeFixedMask<i>: a flag to determine if the i-th fixed mask should be eroded from one resolution level to another. Choose from {"true", "false"}
example: (ErodeFixedMask2 "true" "false") This setting overrules ErodeMask and ErodeFixedMask.

ErodeMovingMask<i>: a flag to determine if the i-th moving mask should be eroded from one resolution level to another. Choose from {"true", "false"}
example: (ErodeMovingMask2 "true" "false") This setting overrules ErodeMask and ErodeMovingMask.

Definition at line 75 of file elxRegistrationBase.h.

Inheritance diagram for elastix::RegistrationBase< TElastix >:

Public Types

using ElastixType
 
using FixedImageType = typename ElastixType::FixedImageType
 
using ITKBaseType = itk::MultiResolutionImageRegistrationMethod2<FixedImageType, MovingImageType>
 
using MovingImageType = typename ElastixType::MovingImageType
 
using RegistrationType
 
using Self = RegistrationBase
 
using Superclass = BaseComponentSE<TElastix>
 
using UseMaskErosionArrayType = std::vector<bool>
 
- Public Types inherited from elastix::BaseComponentSE< TElastix >
using ElastixType = TElastix
 
using RegistrationType = typename ElastixType::RegistrationBaseType
 
using Self = BaseComponentSE
 
using Superclass = BaseComponent
 

Public Member Functions

ITKBaseTypeGetAsITKBaseType ()
 
const ITKBaseTypeGetAsITKBaseType () const
 
virtual const char * GetClassName () const
 
 ITK_DISALLOW_COPY_AND_MOVE (RegistrationBase)
 
 itkStaticConstMacro (FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
 
 itkStaticConstMacro (MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
 
virtual bool ReadMaskParameters (UseMaskErosionArrayType &useMaskErosionArray, const unsigned int nrOfMasks, const std::string &whichMask, const unsigned int level) const
 
- Public Member Functions inherited from elastix::BaseComponentSE< TElastix >
void AddTargetCellToIterationInfo (const char *const name)
 
const ConfigurationGetConfiguration () const
 
ElastixTypeGetElastix () const
 
auto & GetIterationInfoAt (const char *const name)
 
RegistrationTypeGetRegistration () const
 
 ITK_DISALLOW_COPY_AND_MOVE (BaseComponentSE)
 
void RemoveTargetCellFromIterationInfo (const char *const name)
 
void SetConfiguration (const Configuration *_arg)
 
void SetElastix (ElastixType *_arg)
 
- Public Member Functions inherited from elastix::BaseComponent
virtual void AfterEachIteration ()
 
virtual void AfterEachIterationBase ()
 
virtual void AfterEachResolution ()
 
virtual void AfterEachResolutionBase ()
 
virtual void AfterRegistration ()
 
virtual void AfterRegistrationBase ()
 
virtual int BeforeAll ()
 
virtual int BeforeAllBase ()
 
virtual void BeforeEachResolution ()
 
virtual void BeforeEachResolutionBase ()
 
virtual void BeforeRegistration ()
 
virtual void BeforeRegistrationBase ()
 
virtual const char * elxGetClassName () const
 
const char * GetComponentLabel () const
 
 ITK_DISALLOW_COPY_AND_MOVE (BaseComponent)
 
 itkTypeMacroNoParent (BaseComponent)
 
void SetComponentLabel (const char *label, unsigned int idx)
 

Protected Types

using FixedImagePyramidType = typename ITKBaseType::FixedImagePyramidType
 
using FixedMaskErodeFilterPointer = typename FixedMaskErodeFilterType::Pointer
 
using FixedMaskErodeFilterType = itk::ErodeMaskImageFilter<FixedMaskImageType>
 
using FixedMaskImagePointer = typename FixedMaskImageType::Pointer
 
using FixedMaskImageType = typename ElastixType::FixedMaskType
 
using FixedMaskSpatialObjectPointer = typename FixedMaskSpatialObjectType::Pointer
 
using FixedMaskSpatialObjectType = itk::ImageMaskSpatialObject<Self::FixedImageDimension>
 
using MaskPixelType = typename ElastixType::MaskPixelType
 
using MovingImagePyramidType = typename ITKBaseType::MovingImagePyramidType
 
using MovingMaskErodeFilterPointer = typename MovingMaskErodeFilterType::Pointer
 
using MovingMaskErodeFilterType = itk::ErodeMaskImageFilter<MovingMaskImageType>
 
using MovingMaskImagePointer = typename MovingMaskImageType::Pointer
 
using MovingMaskImageType = typename ElastixType::MovingMaskType
 
using MovingMaskSpatialObjectPointer = typename MovingMaskSpatialObjectType::Pointer
 
using MovingMaskSpatialObjectType = itk::ImageMaskSpatialObject<Self::MovingImageDimension>
 

Protected Member Functions

FixedMaskSpatialObjectPointer GenerateFixedMaskSpatialObject (const FixedMaskImageType *maskImage, bool useMaskErosion, const FixedImagePyramidType *pyramid, unsigned int level) const
 
MovingMaskSpatialObjectPointer GenerateMovingMaskSpatialObject (const MovingMaskImageType *maskImage, bool useMaskErosion, const MovingImagePyramidType *pyramid, unsigned int level) const
 
 RegistrationBase ()=default
 
 ~RegistrationBase () override=default
 
- Protected Member Functions inherited from elastix::BaseComponentSE< TElastix >
 BaseComponentSE ()=default
 
 ~BaseComponentSE () override=default
 
- Protected Member Functions inherited from elastix::BaseComponent
 BaseComponent ()=default
 
virtual ~BaseComponent ()=default
 

Private Member Functions

 elxDeclarePureVirtualGetSelfMacro (ITKBaseType)
 

Additional Inherited Members

- Static Public Member Functions inherited from elastix::BaseComponent
template<typename TBaseComponent >
static auto AsITKBaseType (TBaseComponent *const baseComponent) -> decltype(baseComponent->GetAsITKBaseType())
 
static void InitializeElastixExecutable ()
 
static bool IsElastixLibrary ()
 
- Protected Attributes inherited from elastix::BaseComponentSE< TElastix >
Configuration::ConstPointer m_Configuration {}
 
itk::WeakPointer< TElastix > m_Elastix {}
 
RegistrationTypem_Registration {}
 

Member Typedef Documentation

◆ ElastixType

template<class TElastix >
using elastix::BaseComponentSE< TElastix >::ElastixType

Elastix typedef.

Definition at line 57 of file elxBaseComponentSE.h.

◆ FixedImagePyramidType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::FixedImagePyramidType = typename ITKBaseType::FixedImagePyramidType
protected

Definition at line 165 of file elxRegistrationBase.h.

◆ FixedImageType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::FixedImageType = typename ElastixType::FixedImageType

Other typedef's.

Definition at line 92 of file elxRegistrationBase.h.

◆ FixedMaskErodeFilterPointer

template<class TElastix >
using elastix::RegistrationBase< TElastix >::FixedMaskErodeFilterPointer = typename FixedMaskErodeFilterType::Pointer
protected

Definition at line 170 of file elxRegistrationBase.h.

◆ FixedMaskErodeFilterType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::FixedMaskErodeFilterType = itk::ErodeMaskImageFilter<FixedMaskImageType>
protected

Some typedef's used for eroding the masks

Definition at line 169 of file elxRegistrationBase.h.

◆ FixedMaskImagePointer

template<class TElastix >
using elastix::RegistrationBase< TElastix >::FixedMaskImagePointer = typename FixedMaskImageType::Pointer
protected

Definition at line 158 of file elxRegistrationBase.h.

◆ FixedMaskImageType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::FixedMaskImageType = typename ElastixType::FixedMaskType
protected

Definition at line 156 of file elxRegistrationBase.h.

◆ FixedMaskSpatialObjectPointer

template<class TElastix >
using elastix::RegistrationBase< TElastix >::FixedMaskSpatialObjectPointer = typename FixedMaskSpatialObjectType::Pointer
protected

Definition at line 162 of file elxRegistrationBase.h.

◆ FixedMaskSpatialObjectType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::FixedMaskSpatialObjectType = itk::ImageMaskSpatialObject<Self::FixedImageDimension>
protected

Definition at line 160 of file elxRegistrationBase.h.

◆ ITKBaseType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::ITKBaseType = itk::MultiResolutionImageRegistrationMethod2<FixedImageType, MovingImageType>

Typedef for ITKBaseType.

Definition at line 101 of file elxRegistrationBase.h.

◆ MaskPixelType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::MaskPixelType = typename ElastixType::MaskPixelType
protected

Typedef's for mask support.

Definition at line 155 of file elxRegistrationBase.h.

◆ MovingImagePyramidType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::MovingImagePyramidType = typename ITKBaseType::MovingImagePyramidType
protected

Definition at line 166 of file elxRegistrationBase.h.

◆ MovingImageType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::MovingImageType = typename ElastixType::MovingImageType

Definition at line 93 of file elxRegistrationBase.h.

◆ MovingMaskErodeFilterPointer

template<class TElastix >
using elastix::RegistrationBase< TElastix >::MovingMaskErodeFilterPointer = typename MovingMaskErodeFilterType::Pointer
protected

Definition at line 172 of file elxRegistrationBase.h.

◆ MovingMaskErodeFilterType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::MovingMaskErodeFilterType = itk::ErodeMaskImageFilter<MovingMaskImageType>
protected

Definition at line 171 of file elxRegistrationBase.h.

◆ MovingMaskImagePointer

template<class TElastix >
using elastix::RegistrationBase< TElastix >::MovingMaskImagePointer = typename MovingMaskImageType::Pointer
protected

Definition at line 159 of file elxRegistrationBase.h.

◆ MovingMaskImageType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::MovingMaskImageType = typename ElastixType::MovingMaskType
protected

Definition at line 157 of file elxRegistrationBase.h.

◆ MovingMaskSpatialObjectPointer

template<class TElastix >
using elastix::RegistrationBase< TElastix >::MovingMaskSpatialObjectPointer = typename MovingMaskSpatialObjectType::Pointer
protected

Definition at line 163 of file elxRegistrationBase.h.

◆ MovingMaskSpatialObjectType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::MovingMaskSpatialObjectType = itk::ImageMaskSpatialObject<Self::MovingImageDimension>
protected

Definition at line 161 of file elxRegistrationBase.h.

◆ RegistrationType

template<class TElastix >
using elastix::BaseComponentSE< TElastix >::RegistrationType

RegistrationType; NB: this is the elx::RegistrationBase not an itk::Object or something like that.

Definition at line 62 of file elxBaseComponentSE.h.

◆ Self

template<class TElastix >
using elastix::RegistrationBase< TElastix >::Self = RegistrationBase

Standard ITK stuff.

Definition at line 81 of file elxRegistrationBase.h.

◆ Superclass

template<class TElastix >
using elastix::RegistrationBase< TElastix >::Superclass = BaseComponentSE<TElastix>

Definition at line 82 of file elxRegistrationBase.h.

◆ UseMaskErosionArrayType

template<class TElastix >
using elastix::RegistrationBase< TElastix >::UseMaskErosionArrayType = std::vector<bool>

Typedef for mask erosion options

Definition at line 104 of file elxRegistrationBase.h.

Constructor & Destructor Documentation

◆ RegistrationBase()

template<class TElastix >
elastix::RegistrationBase< TElastix >::RegistrationBase ( )
protecteddefault

The constructor.

◆ ~RegistrationBase()

template<class TElastix >
elastix::RegistrationBase< TElastix >::~RegistrationBase ( )
overrideprotecteddefault

The destructor.

Member Function Documentation

◆ elxDeclarePureVirtualGetSelfMacro()

template<class TElastix >
elastix::RegistrationBase< TElastix >::elxDeclarePureVirtualGetSelfMacro ( ITKBaseType )
private

◆ GenerateFixedMaskSpatialObject()

template<class TElastix >
FixedMaskSpatialObjectPointer elastix::RegistrationBase< TElastix >::GenerateFixedMaskSpatialObject ( const FixedMaskImageType * maskImage,
bool useMaskErosion,
const FixedImagePyramidType * pyramid,
unsigned int level ) const
protected

Generate a spatial object from a mask image, possibly after eroding the image Input:

  • the mask as an image, consisting of 1's and 0's;
  • a boolean that determines whether mask erosion is needed
  • the image pyramid, which is needed to determines the amount of erosion (can be set to 0 if useMaskErosion == false
  • the resolution level Output:
  • the mask as a spatial object, which can be set in a metric for example

This function is used by the registration components

◆ GenerateMovingMaskSpatialObject()

template<class TElastix >
MovingMaskSpatialObjectPointer elastix::RegistrationBase< TElastix >::GenerateMovingMaskSpatialObject ( const MovingMaskImageType * maskImage,
bool useMaskErosion,
const MovingImagePyramidType * pyramid,
unsigned int level ) const
protected

Generate a spatial object from a mask image, possibly after eroding the image Input:

  • the mask as an image, consisting of 1's and 0's;
  • a boolean that determines whether mask erosion is needed
  • the image pyramid, which is needed to determines the amount of erosion (can be set to 0 if useMaskErosion == false
  • the resolution level Output:
  • the mask as a spatial object, which can be set in a metric for example

This function is used by the registration components

◆ GetAsITKBaseType() [1/2]

template<class TElastix >
ITKBaseType * elastix::RegistrationBase< TElastix >::GetAsITKBaseType ( )
inline

Retrieves this object as ITKBaseType.

Definition at line 108 of file elxRegistrationBase.h.

◆ GetAsITKBaseType() [2/2]

template<class TElastix >
const ITKBaseType * elastix::RegistrationBase< TElastix >::GetAsITKBaseType ( ) const
inline

Retrieves this object as ITKBaseType, to use in const functions.

Definition at line 116 of file elxRegistrationBase.h.

◆ GetClassName()

template<class TElastix >
virtual const char * elastix::RegistrationBase< TElastix >::GetClassName ( ) const
virtual

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<class TElastix >
elastix::RegistrationBase< TElastix >::ITK_DISALLOW_COPY_AND_MOVE ( RegistrationBase< TElastix > )

◆ itkStaticConstMacro() [1/2]

template<class TElastix >
elastix::RegistrationBase< TElastix >::itkStaticConstMacro ( FixedImageDimension ,
unsigned int ,
FixedImageType::ImageDimension  )

Get the dimension of the fixed image.

◆ itkStaticConstMacro() [2/2]

template<class TElastix >
elastix::RegistrationBase< TElastix >::itkStaticConstMacro ( MovingImageDimension ,
unsigned int ,
MovingImageType::ImageDimension  )

Get the dimension of the moving image.

◆ ReadMaskParameters()

template<class TElastix >
virtual bool elastix::RegistrationBase< TElastix >::ReadMaskParameters ( UseMaskErosionArrayType & useMaskErosionArray,
const unsigned int nrOfMasks,
const std::string & whichMask,
const unsigned int level ) const
virtual

Function to read the mask parameters from the configuration object.

Todo
: move to RegistrationBase Input:
  • an array that will contain a bool for each mask, saying if it needs erosion or not
  • the number of masks
  • whichMask: "Fixed" or "Moving"
  • the current resolution level Output:
  • The function returns a bool that says if any mask needs erosion. If the number of masks is zero, this bool will be false.
  • The useMaskErosionArray, which indicates for each mask whether it should be eroded. If the number of masks is zero, this array will be empty.

The function first checks Erode<Fixed,Moving>Mask<i>, with i the mask number, then Erode<Fixed,Moving>Mask, and finally ErodeMask. So, if you do not specify Erode<Fixed,Moving>Mask<i>, Erode<Fixed,Moving>Mask is tried, and then ErodeMask. If you specify ErodeMask, that option will be used for all masks, fixed and moving! All options can be specified for each resolution specifically, or at once for all resolutions.



Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo