18#ifndef itkAdvancedNormalizedCorrelationImageToImageMetric_h
19#define itkAdvancedNormalizedCorrelationImageToImageMetric_h
90template <
typename TFixedImage,
typename 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::TransformJacobianType;
123 using typename Superclass::InterpolatorType;
124 using typename Superclass::InterpolatorPointer;
125 using typename Superclass::RealType;
126 using typename Superclass::GradientPixelType;
127 using typename Superclass::GradientImageType;
128 using typename Superclass::GradientImagePointer;
133 using typename Superclass::MeasureType;
134 using typename Superclass::DerivativeType;
136 using typename Superclass::ParametersType;
158 GetValue(
const ParametersType & parameters)
const override;
162 GetDerivative(
const ParametersType & parameters, DerivativeType & derivative)
const override;
168 DerivativeType & derivative)
const;
173 DerivativeType & derivative)
const override;
199 const RealType movingImageValue,
200 const DerivativeType & imageJacobian,
202 DerivativeType & derivativeF,
203 DerivativeType & derivativeM,
204 DerivativeType & differential)
const;
222 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
255 CorrelationGetValueAndDerivativePerThreadStruct,
256 PaddedCorrelationGetValueAndDerivativePerThreadStruct);
258 PaddedCorrelationGetValueAndDerivativePerThreadStruct,
259 AlignedCorrelationGetValueAndDerivativePerThreadStruct);
260 mutable std::vector<AlignedCorrelationGetValueAndDerivativePerThreadStruct>
266#ifndef ITK_MANUAL_INSTANTIATION
267# include "itkAdvancedNormalizedCorrelationImageToImageMetric.hxx"
typename TransformType::OutputPointType MovingImagePointType
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename MovingImageType::RegionType MovingImageRegionType
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
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
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
AdvancedImageToImageMetric()
ImageSamplerBase< FixedImageType > ImageSamplerType
MultiThreaderBase::WorkUnitInfo ThreadInfoType
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
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
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)
void GetValueAndDerivativeSingleThreaded(const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const
void GetValueAndDerivative(const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const override
SmartPointer< Self > Pointer
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, CorrelationGetValueAndDerivativePerThreadStruct, PaddedCorrelationGetValueAndDerivativePerThreadStruct)
void ThreadedGetValueAndDerivative(ThreadIdType threadID) const override
MeasureType GetValue(const ParametersType ¶meters) const override
AdvancedNormalizedCorrelationImageToImageMetric Self
void InitializeThreadingParameters() const override
ITK_DISALLOW_COPY_AND_MOVE(AdvancedNormalizedCorrelationImageToImageMetric)
typename NumericTraits< MeasureType >::AccumulateType AccumulateType
void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override
itkOverrideGetNameOfClassMacro(AdvancedNormalizedCorrelationImageToImageMetric)
void GetDerivative(const ParametersType ¶meters, DerivativeType &derivative) const override
AdvancedImageToImageMetric< typename MetricBase< TElastix >::FixedImageType, typename MetricBase< TElastix >::MovingImageType > Superclass
std::vector< AlignedCorrelationGetValueAndDerivativePerThreadStruct > m_CorrelationGetValueAndDerivativePerThreadVariables
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