template<class TElastix>
class elastix::MultiMetricMultiResolutionRegistration< TElastix >
A registration framework based on the itk::MultiMetricMultiResolutionImageRegistrationMethod .
This MultiMetricMultiResolutionRegistration gives a framework for registration with a multi-resolution approach, using multiple metrics. The metrics can use the same pair of images/image pyramids/interpolators /masks, but also different pairs of fixed/moving images etc. If the metrics use the same moving image and the same moving image pyramid, they can use the same interpolator. If multiple moving images are used, enter multiple interpolators, possibly of the same type: Like this for example:
(Interpolator "BSplineInterpolator" "BSplineInterpolator")
For each metric a different instance of an image sampler can be used:
(ImageSampler "Random" "Random")
or:
(ImageSampler "Random" "Full")
Note, that the number of metrics should always be larger than or equal to the number of fixed/moving images, interpolators, image pyramids etc. Also, when all metrics need an image sampler, for each fixed image pyramid, an image sampler must be provided. In some cases, one sampler can be used for all metrics. This is the case when multiple metrics are desired, but
1 fixed image is used, and
1 fixed image pyramid is used. This will save a bit of memory and computation time. In general however, it is better to use the same number of samplers as metrics.
The parameters used in this class are:
Parameters: Registration: Select this registration framework as follows:
(Registration "MultiMetricMultiResolutionRegistration")
NumberOfResolutions: the number of resolutions used.
example: (NumberOfResolutions 4)
The default is 3.
Metric<i>Weight: The weight for the i-th metric, in each resolution.
example: (Metric0Weight 0.5 0.5 0.8)
example: (Metric1Weight 0.5 0.5 0.2)
The default is 1 / numberOfMetrics.
Metric<i>RelativeWeight: The relative weight for the i-th metric, in each resolution.
This is an alternative to the default Metric<i>Weight and can be selected with the parameter UseRelativeWeights. The weight is computed in each iteration based on the magnitude of the metric derivative (gradient) related to that of the first metric . It is done such that the fraction is identical to , so
example: (Metric0RelativeWeight 0.5 0.5 0.8)
example: (Metric1RelativeWeight 0.5 0.5 0.2)
The default is 1 / numberOfMetrics.
Parameters: UseRelativeWeights: Whether relative weights are used or simple static, fixed weights.
example: (UseRelativeWeights "false" "true")
The default is "false", which means using Metric<i>Weight.
Metric<i>Use: Whether the i-th metric is only computed or also used, in each resolution.
example: (Metric0Use "false" "true")
example: (Metric1Use "true" "false")
The default is "true".
Definition at line 95 of file elxMultiMetricMultiResolutionRegistration.h .
using CombinationMetricPointer = typename CombinationMetricType::Pointer
using CombinationMetricType = CombinationImageToImageMetric < FixedImageType , MovingImageType >
using ConstPointer = itk::SmartPointer< const Self >
using ITKBaseType = typename Superclass2::ITKBaseType
using OptimizerPointer = typename OptimizerType::Pointer
using Pointer = itk::SmartPointer< Self >
using RegistrationType = typename Superclass2::RegistrationType
using Self = MultiMetricMultiResolutionRegistration
using Superclass1 = itk::MultiMetricMultiResolutionImageRegistrationMethod < typename RegistrationBase < TElastix >::FixedImageType , typename RegistrationBase < TElastix >::MovingImageType >
using Superclass2 = RegistrationBase < TElastix >
using UseMaskErosionArrayType = std::vector< bool >
using CombinationMetricPointer = typename CombinationMetricType::Pointer
using CombinationMetricType = CombinationImageToImageMetric < FixedImageType , MovingImageType >
using ConstPointer = SmartPointer< const Self >
using DataObjectPointer = typename DataObject::Pointer
using FixedImageConstPointer = typename FixedImageType::ConstPointer
using FixedImagePyramidPointer = typename FixedImagePyramidType::Pointer
using FixedImagePyramidType = MultiResolutionPyramidImageFilter< FixedImageType , FixedImageType >
using FixedImageRegionType = typename FixedImageType::RegionType
using FixedImageType = RegistrationBase< TElastix >::FixedImageType
using InterpolatorPointer = typename InterpolatorType::Pointer
using InterpolatorType = typename MetricType::InterpolatorType
using MetricPointer = typename MetricType::Pointer
using MetricType = AdvancedImageToImageMetric < FixedImageType , MovingImageType >
using MovingImageConstPointer = typename MovingImageType::ConstPointer
using MovingImagePyramidPointer = typename MovingImagePyramidType::Pointer
using MovingImagePyramidType = MultiResolutionPyramidImageFilter< MovingImageType , MovingImageType >
using MovingImageType = RegistrationBase< TElastix >::MovingImageType
using OptimizerPointer = typename OptimizerType::Pointer
using OptimizerType = SingleValuedNonLinearOptimizer
using ParametersType = typename MetricType::TransformParametersType
using Pointer = SmartPointer< Self >
using Self = MultiMetricMultiResolutionImageRegistrationMethod
using Superclass = MultiResolutionImageRegistrationMethod2 < RegistrationBase< TElastix >::FixedImageType, RegistrationBase< TElastix >::MovingImageType >
using TransformOutputConstPointer = typename TransformOutputType::ConstPointer
using TransformOutputPointer = typename TransformOutputType::Pointer
using TransformOutputType = DataObjectDecorator< TransformType >
using TransformPointer = typename TransformType::Pointer
using TransformType = typename MetricType::AdvancedTransformType
using ConstPointer = SmartPointer< const Self >
using DataObjectPointer = typename DataObject::Pointer
using FixedImageConstPointer = typename FixedImageType::ConstPointer
using FixedImagePyramidPointer = typename FixedImagePyramidType::Pointer
using FixedImagePyramidType = MultiResolutionPyramidImageFilter< FixedImageType , FixedImageType >
using FixedImageRegionPyramidType = std::vector< FixedImageRegionType >
using FixedImageRegionType = typename FixedImageType::RegionType
using FixedImageType = TFixedImage
using InterpolatorPointer = typename InterpolatorType::Pointer
using InterpolatorType = typename MetricType::InterpolatorType
using MetricPointer = typename MetricType::Pointer
using MetricType = AdvancedImageToImageMetric < FixedImageType , MovingImageType >
using MovingImageConstPointer = typename MovingImageType::ConstPointer
using MovingImagePyramidPointer = typename MovingImagePyramidType::Pointer
using MovingImagePyramidType = MultiResolutionPyramidImageFilter< MovingImageType , MovingImageType >
using MovingImageType = TMovingImage
using OptimizerType = SingleValuedNonLinearOptimizer
using ParametersType = typename MetricType::TransformParametersType
using Pointer = SmartPointer< Self >
using Self = MultiResolutionImageRegistrationMethod2
using Superclass = ProcessObject
using TransformOutputConstPointer = typename TransformOutputType::ConstPointer
using TransformOutputPointer = typename TransformOutputType::Pointer
using TransformOutputType = DataObjectDecorator< TransformType >
using TransformPointer = typename TransformType::Pointer
using TransformType = typename MetricType::AdvancedTransformType
using ElastixType = TElastix
using FixedImageType = typename ElastixType::FixedImageType
using ITKBaseType = itk::MultiResolutionImageRegistrationMethod2 < FixedImageType , MovingImageType >
using MovingImageType = typename ElastixType::MovingImageType
using RegistrationType = typename ElastixType::RegistrationBaseType
using Self = RegistrationBase
using Superclass = BaseComponentSE < TElastix >
using UseMaskErosionArrayType = std::vector< bool >
using ConfigurationPointer = Configuration::Pointer
using ElastixType = TElastix
using RegistrationType = typename ElastixType::RegistrationBaseType
using Self = BaseComponentSE
using Superclass = BaseComponent
void AfterEachIteration () override
void BeforeEachResolution () override
void BeforeRegistration () override
elxClassNameMacro ("MultiMetricMultiResolutionRegistration")
virtual const char * GetClassName () const
ITK_DISALLOW_COPY_AND_MOVE (MultiMetricMultiResolutionRegistration )
itkStaticConstMacro (FixedImageDimension, unsigned int , Superclass2::FixedImageDimension)
itkStaticConstMacro (MovingImageDimension, unsigned int , Superclass2::MovingImageDimension)
elxOverrideSimpleSetMacro (FixedImage, const FixedImageType *)
elxOverrideSimpleSetMacro (FixedImagePyramid, FixedImagePyramidType *)
elxOverrideSimpleSetMacro (FixedImageRegion, const FixedImageRegionType )
elxOverrideSimpleSetMacro (Interpolator, InterpolatorType *)
elxOverrideSimpleSetMacro (MovingImage, const MovingImageType *)
elxOverrideSimpleSetMacro (MovingImagePyramid, MovingImagePyramidType *)
virtual const char * GetClassName () const
virtual CombinationMetricType * GetCombinationMetric () const
const FixedImageType * GetFixedImage () const override
virtual const FixedImageType * GetFixedImage (unsigned int pos) const
FixedImagePyramidType * GetFixedImagePyramid () override
virtual FixedImagePyramidType * GetFixedImagePyramid (unsigned int pos) const
const FixedImageRegionType & GetFixedImageRegion () const override
virtual const FixedImageRegionType & GetFixedImageRegion (unsigned int pos) const
InterpolatorType * GetInterpolator () override
virtual InterpolatorType * GetInterpolator (unsigned int pos) const
const ParametersType & GetLastTransformParameters () const override
const MovingImageType * GetMovingImage () const override
virtual const MovingImageType * GetMovingImage (unsigned int pos) const
MovingImagePyramidType * GetMovingImagePyramid () override
virtual MovingImagePyramidType * GetMovingImagePyramid (unsigned int pos) const
ModifiedTimeType GetMTime () const override
ITK_DISALLOW_COPY_AND_MOVE (MultiMetricMultiResolutionImageRegistrationMethod )
itkGetNumberOfMacro (FixedImage)
itkGetNumberOfMacro (FixedImagePyramid)
itkGetNumberOfMacro (FixedImageRegion)
itkGetNumberOfMacro (Interpolator)
itkGetNumberOfMacro (MovingImage)
itkGetNumberOfMacro (MovingImagePyramid)
itkSetNumberOfMacro (FixedImage)
itkSetNumberOfMacro (FixedImagePyramid)
itkSetNumberOfMacro (FixedImageRegion)
itkSetNumberOfMacro (Interpolator)
itkSetNumberOfMacro (MovingImage)
itkSetNumberOfMacro (MovingImagePyramid)
virtual void SetFixedImage (const FixedImageType *_arg, unsigned int pos)
virtual void SetFixedImagePyramid (FixedImagePyramidType *_arg, unsigned int pos)
virtual void SetFixedImageRegion (FixedImageRegionType _arg, unsigned int pos)
virtual void SetInterpolator (InterpolatorType *_arg, unsigned int pos)
void SetMetric (MetricType *_arg) override
virtual void SetMovingImage (const MovingImageType *_arg, unsigned int pos)
virtual void SetMovingImagePyramid (MovingImagePyramidType *_arg, unsigned int pos)
virtual void StopMultiMetricRegistration ()
virtual const char * GetClassName () const
virtual unsigned long GetCurrentLevel () const
virtual const FixedImageType * GetFixedImage ()
virtual const FixedImageRegionType & GetFixedImageRegion ()
virtual const ParametersType & GetInitialTransformParameters ()
virtual const ParametersType & GetInitialTransformParametersOfNextLevel ()
virtual const ParametersType & GetLastTransformParameters ()
virtual const MovingImageType * GetMovingImage ()
ModifiedTimeType GetMTime () const override
virtual unsigned long GetNumberOfLevels () const
const TransformOutputType * GetOutput () const
ITK_DISALLOW_COPY_AND_MOVE (MultiResolutionImageRegistrationMethod2 )
itkGetModifiableObjectMacro (FixedImagePyramid, FixedImagePyramidType )
itkGetModifiableObjectMacro (Interpolator, InterpolatorType )
itkGetModifiableObjectMacro (Metric, MetricType )
itkGetModifiableObjectMacro (MovingImagePyramid, MovingImagePyramidType )
itkGetModifiableObjectMacro (Optimizer, OptimizerType )
itkGetModifiableObjectMacro (Transform, TransformType )
virtual DataObjectPointer MakeOutput (unsigned int idx)
virtual void SetFixedImage (const FixedImageType *_arg)
virtual void SetFixedImagePyramid (FixedImagePyramidType *_arg)
virtual void SetFixedImageRegion (FixedImageRegionType _arg)
virtual void SetInitialTransformParameters (ParametersType _arg)
virtual void SetInitialTransformParametersOfNextLevel (ParametersType _arg)
virtual void SetInterpolator (InterpolatorType *_arg)
virtual void SetMetric (MetricType *_arg)
virtual void SetMovingImage (const MovingImageType *_arg)
virtual void SetMovingImagePyramid (MovingImagePyramidType *_arg)
virtual void SetNumberOfLevels (unsigned long _arg)
virtual void SetOptimizer (OptimizerType *_arg)
virtual void SetTransform (TransformType *_arg)
virtual void StartRegistration ()
virtual void StopRegistration ()
ITKBaseType * GetAsITKBaseType ()
const ITKBaseType * GetAsITKBaseType () 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
void AddTargetCellToIterationInfo (const char *const name)
Configuration * GetConfiguration () const
ElastixType * GetElastix () const
xl::xoutbase & GetIterationInfoAt (const char *const name)
RegistrationType * GetRegistration () const
ITK_DISALLOW_COPY_AND_MOVE (BaseComponentSE )
int RemoveTargetCellFromIterationInfo (const char *const name)
void SetConfiguration (Configuration *_arg)
void SetElastix (ElastixType *_arg)
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)