18#ifndef itkAdvancedMeanSquaresImageToImageMetric_h
19#define itkAdvancedMeanSquaresImageToImageMetric_h
51template <
class TFixedImage,
class TMovingImage>
71 using typename Superclass::CoordinateRepresentationType;
72 using typename Superclass::MovingImageType;
73 using typename Superclass::MovingImagePixelType;
74 using typename Superclass::MovingImageConstPointer;
75 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;
85 using typename Superclass::InterpolatorType;
86 using typename Superclass::InterpolatorPointer;
87 using typename Superclass::RealType;
88 using typename Superclass::GradientPixelType;
89 using typename Superclass::GradientImageType;
90 using typename Superclass::GradientImagePointer;
95 using typename Superclass::MeasureType;
96 using typename Superclass::DerivativeType;
98 using typename Superclass::ParametersType;
123 GetValue(
const TransformParametersType & parameters)
const override;
127 GetDerivative(
const TransformParametersType & parameters, DerivativeType & derivative)
const override;
133 DerivativeType & derivative)
const;
138 DerivativeType & derivative)
const override;
154 itkSetMacro(UseNormalization,
bool);
155 itkGetConstMacro(UseNormalization,
bool);
162 PrintSelf(std::ostream & os, Indent indent)
const override;
181 const RealType movingImageValue,
182 const DerivativeType & imageJacobian,
184 MeasureType & measure,
185 DerivativeType & deriv)
const;
204 double m_NormalizationFactor{ 1.0 };
205 bool m_UseNormalization{
false };
210#ifndef ITK_MANUAL_INSTANTIATION
211# include "itkAdvancedMeanSquaresImageToImageMetric.hxx"
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
typename TransformType::OutputPointType MovingImagePointType
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
typename MovingImageType::RegionType MovingImageRegionType
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
typename FixedImageType::PixelType FixedImagePixelType
typename DerivativeType::ValueType DerivativeValueType
typename FixedImageIndexType::IndexValueType FixedImageIndexValueType
typename MovingImageType::IndexType MovingImageIndexType
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
typename FixedImageType::IndexType FixedImageIndexType
SmartPointer< MovingImageMaskType > MovingImageMaskPointer
MultiThreaderBase::WorkUnitInfo ThreadInfoType
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
typename MovingImageLimiterType::OutputType MovingImageLimiterOutputType
typename TransformType::InputPointType FixedImagePointType
typename FixedImageLimiterType::OutputType FixedImageLimiterOutputType
SmartPointer< FixedImageMaskType > FixedImageMaskPointer
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
typename ImageSamplerType::Pointer ImageSamplerPointer
typename InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
typename AdvancedTransformType::NumberOfParametersType NumberOfParametersType
ImageMaskSpatialObject< Self::MovingImageDimension > MovingImageMaskType
Compute Mean square difference between two images, based on AdvancedImageToImageMetric....
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
void ThreadedGetValue(ThreadIdType threadID) const override
void AfterThreadedGetValue(MeasureType &value) const override
void GetDerivative(const TransformParametersType ¶meters, DerivativeType &derivative) const override
void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override
void ThreadedGetValueAndDerivative(ThreadIdType threadID) const override
~AdvancedMeanSquaresImageToImageMetric() override=default
virtual MeasureType GetValueSingleThreaded(const TransformParametersType ¶meters) const
AdvancedMeanSquaresImageToImageMetric()
void Initialize() override
void GetValueAndDerivative(const TransformParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const override
ITK_DISALLOW_COPY_AND_MOVE(AdvancedMeanSquaresImageToImageMetric)
void PrintSelf(std::ostream &os, Indent indent) const override
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
void UpdateValueAndDerivativeTerms(const RealType fixedImageValue, const RealType movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, MeasureType &measure, DerivativeType &deriv) const
void GetValueAndDerivativeSingleThreaded(const TransformParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const
SmartPointer< const Self > ConstPointer
MeasureType GetValue(const TransformParametersType ¶meters) const override
This class is a base class for any image sampler.
Base class for all ITK limiter function objects.