18#ifndef itkAdvancedNormalizedCorrelationImageToImageMetric_h
19#define itkAdvancedNormalizedCorrelationImageToImageMetric_h
90template <
class TFixedImage,
class TMovingImage>
110 using typename Superclass::CoordinateRepresentationType;
111 using typename Superclass::MovingImageType;
112 using typename Superclass::MovingImagePixelType;
113 using typename Superclass::MovingImageConstPointer;
114 using typename Superclass::FixedImageType;
115 using typename Superclass::FixedImageConstPointer;
116 using typename Superclass::FixedImageRegionType;
117 using typename Superclass::TransformType;
118 using typename Superclass::TransformPointer;
119 using typename Superclass::InputPointType;
120 using typename Superclass::OutputPointType;
121 using typename Superclass::TransformParametersType;
122 using typename Superclass::TransformJacobianType;
124 using typename Superclass::InterpolatorType;
125 using typename Superclass::InterpolatorPointer;
126 using typename Superclass::RealType;
127 using typename Superclass::GradientPixelType;
128 using typename Superclass::GradientImageType;
129 using typename Superclass::GradientImagePointer;
134 using typename Superclass::MeasureType;
135 using typename Superclass::DerivativeType;
137 using typename Superclass::ParametersType;
159 GetValue(
const TransformParametersType & parameters)
const override;
163 GetDerivative(
const TransformParametersType & parameters, DerivativeType & derivative)
const override;
169 DerivativeType & derivative)
const;
174 DerivativeType & derivative)
const override;
180 using Superclass::PrintSelf;
200 const RealType movingImageValue,
201 const DerivativeType & imageJacobian,
203 DerivativeType & derivativeF,
204 DerivativeType & derivativeM,
205 DerivativeType & differential)
const;
223 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
257 PaddedCorrelationGetValueAndDerivativePerThreadStruct);
259 PaddedCorrelationGetValueAndDerivativePerThreadStruct,
260 AlignedCorrelationGetValueAndDerivativePerThreadStruct);
261 mutable std::vector<AlignedCorrelationGetValueAndDerivativePerThreadStruct>
267#ifndef ITK_MANUAL_INSTANTIATION
268# include "itkAdvancedNormalizedCorrelationImageToImageMetric.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
Computes normalized correlation between two images, based on AdvancedImageToImageMetric....
void UpdateDerivativeTerms(const RealType fixedImageValue, const RealType movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, DerivativeType &derivativeF, DerivativeType &derivativeM, DerivativeType &differential) const
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION AccumulateDerivativesThreaderCallback(void *arg)
~AdvancedNormalizedCorrelationImageToImageMetric() override=default
SmartPointer< const Self > ConstPointer
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
AdvancedNormalizedCorrelationImageToImageMetric()
itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedCorrelationGetValueAndDerivativePerThreadStruct, AlignedCorrelationGetValueAndDerivativePerThreadStruct)
typename DerivativeType::ValueType DerivativeValueType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
MeasureType GetValue(const TransformParametersType ¶meters) const override
void GetDerivative(const TransformParametersType ¶meters, DerivativeType &derivative) const override
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, CorrelationGetValueAndDerivativePerThreadStruct, PaddedCorrelationGetValueAndDerivativePerThreadStruct)
void ThreadedGetValueAndDerivative(ThreadIdType threadID) const override
void GetValueAndDerivativeSingleThreaded(const TransformParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const
void GetValueAndDerivative(const TransformParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const override
void InitializeThreadingParameters() const override
ITK_DISALLOW_COPY_AND_MOVE(AdvancedNormalizedCorrelationImageToImageMetric)
typename NumericTraits< MeasureType >::AccumulateType AccumulateType
void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override
std::vector< AlignedCorrelationGetValueAndDerivativePerThreadStruct > m_CorrelationGetValueAndDerivativePerThreadVariables
This class is a base class for any image sampler.
Base class for all ITK limiter function objects.
DerivativeType st_DerivativeM
SizeValueType st_NumberOfPixelsCounted
DerivativeType st_DerivativeF
DerivativeType st_Differential
AdvancedNormalizedCorrelationImageToImageMetric * st_Metric
DerivativeValueType * st_DerivativePointer
RealType st_InvertedDenominator
AccumulateType st_sfm_smm