18#ifndef itkMultiInputImageToImageMetricBase_h
19#define itkMultiInputImageToImageMetricBase_h
25#define itkSetNumberOfMacro(name) \
26 virtual void SetNumberOf##name##s(const unsigned int _arg) \
28 if (this->m_NumberOf##name##s != _arg) \
30 this->m_##name##Vector.resize(_arg); \
31 this->m_NumberOf##name##s = _arg; \
48template <
class TFixedImage,
class TMovingImage>
69 using typename Superclass::CoordinateRepresentationType;
70 using typename Superclass::MovingImageType;
71 using typename Superclass::MovingImagePixelType;
73 using typename Superclass::MovingImageConstPointer;
74 using typename Superclass::FixedImageType;
76 using typename Superclass::FixedImageConstPointer;
77 using typename Superclass::FixedImageRegionType;
78 using typename Superclass::TransformType;
79 using typename Superclass::TransformPointer;
80 using typename Superclass::InputPointType;
81 using typename Superclass::OutputPointType;
82 using typename Superclass::TransformParametersType;
83 using typename Superclass::TransformJacobianType;
84 using typename Superclass::InterpolatorType;
85 using typename Superclass::InterpolatorPointer;
86 using typename Superclass::RealType;
87 using typename Superclass::GradientPixelType;
88 using typename Superclass::GradientImageType;
89 using typename Superclass::GradientImagePointer;
96 using typename Superclass::MeasureType;
97 using typename Superclass::DerivativeType;
98 using typename Superclass::ParametersType;
122 this->SetFixedImage(_arg, 0);
127 virtual const FixedImageType *
131 const FixedImageType *
132 GetFixedImage()
const override
134 return this->GetFixedImage(0);
142 itkGetConstMacro(NumberOfFixedImages,
unsigned int);
154 this->SetFixedImageMask(_arg, 0);
159 virtual const FixedImageMaskType *
166 return this->GetFixedImageMask(0);
174 itkGetConstMacro(NumberOfFixedImageMasks,
unsigned int);
186 this->SetFixedImageRegion(_arg, 0);
191 virtual const FixedImageRegionType &
195 const FixedImageRegionType &
198 return this->GetFixedImageRegion(0);
206 itkGetConstMacro(NumberOfFixedImageRegions,
unsigned int);
218 this->SetMovingImage(_arg, 0);
223 virtual const MovingImageType *
227 const MovingImageType *
230 return this->GetMovingImage(0);
238 itkGetConstMacro(NumberOfMovingImages,
unsigned int);
250 this->SetMovingImageMask(_arg, 0);
255 virtual const MovingImageMaskType *
262 return this->GetMovingImageMask(0);
270 itkGetConstMacro(NumberOfMovingImageMasks,
unsigned int);
284 return this->SetInterpolator(_arg, 0);
289 virtual InterpolatorType *
296 return this->GetInterpolator(0);
300 const InterpolatorType *
303 return this->GetInterpolator(0);
311 itkGetConstMacro(NumberOfInterpolators,
unsigned int);
314 itkGetConstMacro(InterpolatorsAreBSpline,
bool);
328 return this->SetFixedImageInterpolator(_arg, 0);
333 virtual FixedImageInterpolatorType *
340 return this->GetFixedImageInterpolator(0);
348 itkGetConstMacro(NumberOfFixedImageInterpolators,
unsigned int);
389 RealType & movingImageValue,
405 bool m_InterpolatorsAreBSpline{
false };
410 using Superclass::SetFixedImageMask;
411 using Superclass::SetMovingImageMask;
421 FixedImageRegionType m_DummyFixedImageRegion{};
423 unsigned int m_NumberOfFixedImages{ 0 };
424 unsigned int m_NumberOfFixedImageMasks{ 0 };
425 unsigned int m_NumberOfFixedImageRegions{ 0 };
426 unsigned int m_NumberOfMovingImages{ 0 };
427 unsigned int m_NumberOfMovingImageMasks{ 0 };
428 unsigned int m_NumberOfInterpolators{ 0 };
429 unsigned int m_NumberOfFixedImageInterpolators{ 0 };
434#undef itkSetNumberOfMacro
436#ifndef ITK_MANUAL_INSTANTIATION
437# include "itkMultiInputImageToImageMetricBase.hxx"
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
typename TransformType::OutputPointType MovingImagePointType
typename MovingImageType::IndexType MovingImageIndexType
typename MovingImageType::Pointer MovingImagePointer
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
typename FixedImageType::Pointer FixedImagePointer
SmartPointer< MovingImageMaskType > MovingImageMaskPointer
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
SmartPointer< FixedImageMaskType > FixedImageMaskPointer
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
SmartPointer< const FixedImageMaskType > FixedImageMaskConstPointer
typename InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
SmartPointer< const MovingImageMaskType > MovingImageMaskConstPointer
ImageMaskSpatialObject< Self::MovingImageDimension > MovingImageMaskType