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;
130 using typename Superclass::GradientImageFilterType;
131 using typename Superclass::GradientImageFilterPointer;
132 using typename Superclass::FixedImageMaskType;
133 using typename Superclass::FixedImageMaskPointer;
134 using typename Superclass::MovingImageMaskType;
135 using typename Superclass::MovingImageMaskPointer;
136 using typename Superclass::MeasureType;
137 using typename Superclass::DerivativeType;
139 using typename Superclass::ParametersType;
162 GetValue(
const TransformParametersType & parameters)
const override;
166 GetDerivative(
const TransformParametersType & parameters, DerivativeType & derivative)
const override;
172 DerivativeType & derivative)
const;
177 DerivativeType & derivative)
const override;
184 itkSetMacro(SubtractMean,
bool);
185 itkGetConstReferenceMacro(SubtractMean,
bool);
186 itkBooleanMacro(SubtractMean);
193 PrintSelf(std::ostream & os, Indent indent)
const override;
214 const RealType & movingImageValue,
215 const DerivativeType & imageJacobian,
217 DerivativeType & derivativeF,
218 DerivativeType & derivativeM,
219 DerivativeType & differential)
const;
237 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
273 PaddedCorrelationGetValueAndDerivativePerThreadStruct);
275 PaddedCorrelationGetValueAndDerivativePerThreadStruct,
276 AlignedCorrelationGetValueAndDerivativePerThreadStruct);
277 mutable std::vector<AlignedCorrelationGetValueAndDerivativePerThreadStruct>
283#ifndef ITK_MANUAL_INSTANTIATION
284# 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
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
typename FixedImageIndexType::IndexValueType FixedImageIndexValueType
typename MovingImageType::IndexType MovingImageIndexType
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
typename ThreaderType::WorkUnitInfo ThreadInfoType
itk::PlatformMultiThreader ThreaderType
typename FixedImageType::IndexType FixedImageIndexType
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
typename MovingImageLimiterType::OutputType MovingImageLimiterOutputType
typename TransformType::InputPointType FixedImagePointType
typename FixedImageLimiterType::OutputType FixedImageLimiterOutputType
typename ImageSamplerType::Pointer ImageSamplerPointer
typename InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
typename AdvancedTransformType::NumberOfParametersType NumberOfParametersType
Computes normalized correlation between two images, based on AdvancedImageToImageMetric....
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 ThreadedGetValueAndDerivative(ThreadIdType threadID) override
void GetDerivative(const TransformParametersType ¶meters, DerivativeType &derivative) const override
void UpdateDerivativeTerms(const RealType &fixedImageValue, const RealType &movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, DerivativeType &derivativeF, DerivativeType &derivativeM, DerivativeType &differential) const
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, CorrelationGetValueAndDerivativePerThreadStruct, PaddedCorrelationGetValueAndDerivativePerThreadStruct)
void GetValueAndDerivativeSingleThreaded(const TransformParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const
void GetValueAndDerivative(const TransformParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const override
void PrintSelf(std::ostream &os, Indent indent) 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