18#ifndef itkMultiMetricMultiResolutionImageRegistrationMethod_h
19#define itkMultiMetricMultiResolutionImageRegistrationMethod_h
27#define elxOverrideSimpleSetMacro(_name, _type) \
28 void Set##_name(_type _arg) override { this->Set##_name(_arg, 0); }
31#define itkSetNumberOfMacro(_name) \
32 virtual void SetNumberOf##_name##s(unsigned int _arg) \
34 if (this->m_##_name##s.size() != _arg) \
36 this->m_##_name##s.resize(_arg); \
42#define itkGetNumberOfMacro(_name) \
43 virtual unsigned int GetNumberOf##_name##s() const { return this->m_##_name##s.size(); }
76template <
typename TFixedImage,
typename TMovingImage>
153 return this->m_CombinationMetric.GetPointer();
174 return this->GetFixedImage(0);
192 return this->GetMovingImage(0);
208 return this->GetFixedImageRegion(0);
224 return this->GetInterpolator(0);
227 const InterpolatorType *
230 return this->GetInterpolator(0);
247 return this->GetFixedImagePyramid(0);
250 const FixedImagePyramidType *
253 return this->GetFixedImagePyramid(0);
270 return this->GetMovingImagePyramid(0);
273 const MovingImagePyramidType *
276 return this->GetMovingImagePyramid(0);
296 return this->m_LastTransformParameters;
304 PrintSelf(std::ostream & os, Indent indent)
const override;
348 std::vector<FixedImageConstPointer> m_FixedImages{};
349 std::vector<MovingImageConstPointer> m_MovingImages{};
350 std::vector<FixedImageRegionType> m_FixedImageRegions{};
351 std::vector<FixedImagePyramidPointer> m_FixedImagePyramids{};
352 std::vector<MovingImagePyramidPointer> m_MovingImagePyramids{};
353 std::vector<InterpolatorPointer> m_Interpolators{};
356 std::vector<FixedImageRegionPyramidType> m_FixedImageRegionPyramids{};
364#undef itkSetNumberOfMacro
365#undef itkGetNumberOfMacro
366#undef elxOverrideSimpleSetMacro
368#ifndef ITK_MANUAL_INSTANTIATION
369# include "itkMultiMetricMultiResolutionImageRegistrationMethod.hxx"
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
Combines multiple metrics.
SmartPointer< Self > Pointer
Base class for multi-resolution image registration methods.
virtual MovingImagePyramidType * GetMovingImagePyramid(unsigned int pos) const
itkGetNumberOfMacro(MovingImagePyramid)
elxOverrideSimpleSetMacro(MovingImage, const MovingImageType *)
const FixedImageType * GetFixedImage() const override
~MultiMetricMultiResolutionImageRegistrationMethod() override=default
virtual FixedImagePyramidType * GetFixedImagePyramid(unsigned int pos) const
TMovingImage MovingImageType
const MovingImagePyramidType * GetMovingImagePyramid() const override
virtual void StopMultiMetricRegistration()
virtual void SetFixedImageRegion(FixedImageRegionType _arg, unsigned int pos)
typename MetricType::InterpolatorType InterpolatorType
TFixedImage FixedImageType
virtual void SetMovingImagePyramid(MovingImagePyramidType *_arg, unsigned int pos)
typename OptimizerType::Pointer OptimizerPointer
void Initialize() override
ITK_DISALLOW_COPY_AND_MOVE(MultiMetricMultiResolutionImageRegistrationMethod)
itkSetNumberOfMacro(MovingImagePyramid)
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
itkGetNumberOfMacro(FixedImage)
const ParametersType & GetLastTransformParameters() const override
itkGetNumberOfMacro(FixedImagePyramid)
void SetMetric(MetricType *_arg) override
itkGetNumberOfMacro(MovingImage)
MovingImagePyramidType * GetMovingImagePyramid() override
itkSetNumberOfMacro(FixedImage)
MultiMetricMultiResolutionImageRegistrationMethod()
virtual void SetFixedImage(const FixedImageType *_arg, unsigned int pos)
virtual void SetFixedImagePyramid(FixedImagePyramidType *_arg, unsigned int pos)
virtual void CheckOnInitialize()
virtual void PrepareAllPyramids()
typename FixedImageType::RegionType FixedImageRegionType
itkSetNumberOfMacro(FixedImageRegion)
virtual void SetMovingImage(const MovingImageType *_arg, unsigned int pos)
SmartPointer< const Self > ConstPointer
itkGetNumberOfMacro(Interpolator)
FixedImagePyramidType * GetFixedImagePyramid() override
elxOverrideSimpleSetMacro(FixedImage, const FixedImageType *)
itkSetNumberOfMacro(Interpolator)
itkGetNumberOfMacro(FixedImageRegion)
typename CombinationMetricType::Pointer CombinationMetricPointer
elxOverrideSimpleSetMacro(Interpolator, InterpolatorType *)
InterpolatorType * GetInterpolator() override
virtual const FixedImageRegionType & GetFixedImageRegion(unsigned int pos) const
typename MetricType::TransformParametersType ParametersType
ModifiedTimeType GetMTime() const override
elxOverrideSimpleSetMacro(FixedImagePyramid, FixedImagePyramidType *)
virtual CombinationMetricType * GetCombinationMetric() const
virtual const FixedImageType * GetFixedImage(unsigned int pos) const
const FixedImagePyramidType * GetFixedImagePyramid() const override
const InterpolatorType * GetInterpolator() const override
itkSetNumberOfMacro(FixedImagePyramid)
void GenerateData() override
virtual void SetInterpolator(InterpolatorType *_arg, unsigned int pos)
virtual InterpolatorType * GetInterpolator(unsigned int pos) const
itkSetNumberOfMacro(MovingImage)
const MovingImageType * GetMovingImage() const override
const FixedImageRegionType & GetFixedImageRegion() const override
void PrintSelf(std::ostream &os, Indent indent) const override
virtual const MovingImageType * GetMovingImage(unsigned int pos) const
elxOverrideSimpleSetMacro(FixedImageRegion, const FixedImageRegionType)
std::vector< FixedImageRegionType > FixedImageRegionPyramidType
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType
elxOverrideSimpleSetMacro(MovingImagePyramid, MovingImagePyramidType *)
virtual void CheckPyramids()
Base class for multi-resolution image registration methods.
TMovingImage MovingImageType
typename DataObject::Pointer DataObjectPointer
typename MovingImageType::ConstPointer MovingImageConstPointer
typename MetricType::InterpolatorType InterpolatorType
typename TransformOutputType::ConstPointer TransformOutputConstPointer
TFixedImage FixedImageType
typename FixedImageType::ConstPointer FixedImageConstPointer
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
typename FixedImagePyramidType::Pointer FixedImagePyramidPointer
typename TransformType::Pointer TransformPointer
typename MetricType::Pointer MetricPointer
typename MovingImagePyramidType::Pointer MovingImagePyramidPointer
typename InterpolatorType::Pointer InterpolatorPointer
typename FixedImageType::RegionType FixedImageRegionType
typename MetricType::TransformParametersType ParametersType
DataObjectDecorator< TransformType > TransformOutputType
typename MetricType::AdvancedTransformType TransformType
typename TransformOutputType::Pointer TransformOutputPointer
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType