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;
101 using typename Superclass::MeasureType;
102 using typename Superclass::DerivativeType;
104 using typename Superclass::ParametersType;
136 GetValue(
const TransformParametersType & parameters)
const override;
140 GetDerivative(
const TransformParametersType & parameters, DerivativeType & derivative)
const override;
146 DerivativeType & Derivative)
const override;
151 MeasureType & measure,
152 DerivativeType & derivative)
const;
155 itkSetMacro(AirValue, RealType);
156 itkGetConstMacro(AirValue, RealType);
159 itkSetMacro(TissueValue, RealType);
160 itkGetConstMacro(TissueValue, RealType);
167 PrintSelf(std::ostream & os, Indent indent)
const override;
188 DerivativeType & imageJacobian)
const override;
194 const RealType movingImageValue,
195 const DerivativeType & imageJacobian,
197 const RealType spatialJacobianDeterminant,
198 const DerivativeType & jacobianOfSpatialJacobianDeterminant,
199 MeasureType & measure,
200 DerivativeType & deriv)
const;
211 DerivativeType & jacobianOfSpatialJacobianDeterminant)
const;
231 RealType m_AirValue{ -1000.0 };
234 RealType m_TissueValue{ 55.0 };
240#ifndef ITK_MANUAL_INSTANTIATION
241# 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
typename FixedImageIndexType::IndexValueType FixedImageIndexValueType
typename MovingImageType::IndexType MovingImageIndexType
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
typename FixedImageType::IndexType FixedImageIndexType
SmartPointer< MovingImageMaskType > MovingImageMaskPointer
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
ImageSamplerBase< FixedImageType > ImageSamplerType
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
typename MovingImageLimiterType::OutputType MovingImageLimiterOutputType
typename TransformType::InputPointType FixedImagePointType
typename FixedImageLimiterType::OutputType FixedImageLimiterOutputType
SmartPointer< FixedImageMaskType > FixedImageMaskPointer
typename ImageSamplerType::Pointer ImageSamplerPointer
typename InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
ImageMaskSpatialObject< Self::MovingImageDimension > MovingImageMaskType
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
void ThreadedGetValue(ThreadIdType threadID) const override
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const override
typename TransformType::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
void ThreadedGetValueAndDerivative(ThreadIdType threadId) const override
~SumSquaredTissueVolumeDifferenceImageToImageMetric() override=default
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