18#ifndef itkSumSquaredTissueVolumeDifferenceImageToImageMetric_h
19#define itkSumSquaredTissueVolumeDifferenceImageToImageMetric_h
60template <
class TFixedImage,
class TMovingImage>
80 using typename Superclass::CoordinateRepresentationType;
81 using typename Superclass::MovingImageType;
82 using typename Superclass::MovingImagePixelType;
83 using typename Superclass::MovingImageConstPointer;
84 using typename Superclass::FixedImageType;
85 using typename Superclass::FixedImageConstPointer;
86 using typename Superclass::FixedImageRegionType;
87 using typename Superclass::InputPointType;
88 using typename Superclass::OutputPointType;
89 using typename Superclass::TransformParametersType;
90 using typename Superclass::TransformJacobianType;
91 using typename Superclass::InterpolatorType;
92 using typename Superclass::InterpolatorPointer;
93 using typename Superclass::RealType;
94 using typename Superclass::GradientPixelType;
95 using typename Superclass::GradientImageType;
96 using typename Superclass::GradientImagePointer;
97 using typename Superclass::GradientImageFilterType;
98 using typename Superclass::GradientImageFilterPointer;
99 using typename Superclass::FixedImageMaskType;
100 using typename Superclass::FixedImageMaskPointer;
101 using typename Superclass::MovingImageMaskType;
102 using typename Superclass::MovingImageMaskPointer;
103 using typename Superclass::MeasureType;
104 using typename Superclass::DerivativeType;
106 using typename Superclass::ParametersType;
138 GetValue(
const TransformParametersType & parameters)
const override;
142 GetDerivative(
const TransformParametersType & parameters, DerivativeType & derivative)
const override;
148 DerivativeType & Derivative)
const override;
153 MeasureType & measure,
154 DerivativeType & derivative)
const;
157 itkSetMacro(AirValue, RealType);
158 itkGetConstMacro(AirValue, RealType);
161 itkSetMacro(TissueValue, RealType);
162 itkGetConstMacro(TissueValue, RealType);
169 PrintSelf(std::ostream & os, Indent indent)
const override;
191 DerivativeType & imageJacobian)
const override;
197 const RealType movingImageValue,
198 const DerivativeType & imageJacobian,
200 const RealType spatialJacobianDeterminant,
201 const DerivativeType & jacobianOfSpatialJacobianDeterminant,
202 MeasureType & measure,
203 DerivativeType & deriv)
const;
213 const RealType spatialJacobianDeterminant,
225 DerivativeType & jacobianOfSpatialJacobianDeterminant)
const;
254#ifndef ITK_MANUAL_INSTANTIATION
255# include "itkSumSquaredTissueVolumeDifferenceImageToImageMetric.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 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
This class is a base class for any image sampler.
Base class for all ITK limiter function objects.
Compute sum of square tissue volume difference between two images.
MeasureType GetValue(const TransformParametersType ¶meters) const override
virtual MeasureType GetValueSingleThreaded(const TransformParametersType ¶meters) const
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
typename TransformType::SpatialJacobianType SpatialJacobianType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
void EvaluateJacobianOfSpatialJacobianDeterminantInnerProduct(const JacobianOfSpatialJacobianType &jacobianOfSpatialJacobian, const SpatialJacobianType &inverseSpatialJacobian, DerivativeType &jacobianOfSpatialJacobianDeterminant) const
ITK_DISALLOW_COPY_AND_MOVE(SumSquaredTissueVolumeDifferenceImageToImageMetric)
void UpdateValueAndDerivativeTerms(const RealType fixedImageValue, const RealType movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, const RealType spatialJacobianDeterminant, const DerivativeType &jacobianOfSpatialJacobianDeterminant, MeasureType &measure, DerivativeType &deriv) const
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
void AfterThreadedGetValue(MeasureType &value) const override
bool EvaluateInverseSpatialJacobian(const SpatialJacobianType &spatialJacobian, const RealType spatialJacobianDeterminant, SpatialJacobianType &inverseSpatialJacobian) const
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const override
typename TransformType::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
~SumSquaredTissueVolumeDifferenceImageToImageMetric() override=default
void ThreadedGetValue(ThreadIdType threadID) override
void PrintSelf(std::ostream &os, Indent indent) const override
void GetDerivative(const TransformParametersType ¶meters, DerivativeType &derivative) const override
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
typename TransformType::SpatialHessianType SpatialHessianType
void GetValueAndDerivativeSingleThreaded(const TransformParametersType ¶meters, MeasureType &measure, DerivativeType &derivative) const
typename TransformType::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
void GetValueAndDerivative(const TransformParametersType ¶meters, MeasureType &Value, DerivativeType &Derivative) const override
void AfterThreadedGetValueAndDerivative(MeasureType &measure, DerivativeType &derivative) const override
typename Superclass::AdvancedTransformType TransformType
SmartPointer< const Self > ConstPointer
SumSquaredTissueVolumeDifferenceImageToImageMetric()
typename TransformType::InternalMatrixType InternalMatrixType
void ThreadedGetValueAndDerivative(ThreadIdType threadId) override