18#ifndef itkSumSquaredTissueVolumeDifferenceImageToImageMetric_h
19#define itkSumSquaredTissueVolumeDifferenceImageToImageMetric_h
60template <
typename TFixedImage,
typename 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::TransformJacobianType;
90 using typename Superclass::InterpolatorType;
91 using typename Superclass::InterpolatorPointer;
92 using typename Superclass::RealType;
93 using typename Superclass::GradientPixelType;
94 using typename Superclass::GradientImageType;
95 using typename Superclass::GradientImagePointer;
100 using typename Superclass::MeasureType;
101 using typename Superclass::DerivativeType;
103 using typename Superclass::ParametersType;
135 GetValue(
const ParametersType & parameters)
const override;
139 GetDerivative(
const ParametersType & parameters, DerivativeType & derivative)
const override;
145 DerivativeType & Derivative)
const override;
150 MeasureType & measure,
151 DerivativeType & derivative)
const;
154 itkSetMacro(AirValue, RealType);
155 itkGetConstMacro(AirValue, RealType);
158 itkSetMacro(TissueValue, RealType);
159 itkGetConstMacro(TissueValue, RealType);
166 PrintSelf(std::ostream & os, Indent indent)
const override;
187 DerivativeType & imageJacobian)
const override;
193 const RealType movingImageValue,
194 const DerivativeType & imageJacobian,
196 const RealType spatialJacobianDeterminant,
197 const DerivativeType & jacobianOfSpatialJacobianDeterminant,
198 MeasureType & measure,
199 DerivativeType & deriv)
const;
210 DerivativeType & jacobianOfSpatialJacobianDeterminant)
const;
239#ifndef ITK_MANUAL_INSTANTIATION
240# include "itkSumSquaredTissueVolumeDifferenceImageToImageMetric.hxx"
typename TransformType::OutputPointType MovingImagePointType
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
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
AdvancedTransform< ScalarType, FixedImageDimension, MovingImageDimension > AdvancedTransformType
typename FixedImageType::IndexType FixedImageIndexType
SmartPointer< MovingImageMaskType > MovingImageMaskPointer
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
AdvancedImageToImageMetric()
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
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
virtual MeasureType GetValueSingleThreaded(const ParametersType ¶meters) const
AdvancedImageToImageMetric< typename MetricBase< TElastix >::FixedImageType, typename MetricBase< TElastix >::MovingImageType > Superclass
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
void GetValueAndDerivative(const ParametersType ¶meters, MeasureType &Value, DerivativeType &Derivative) const override
void GetDerivative(const ParametersType ¶meters, DerivativeType &derivative) const override
typename TransformType::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
MeasureType GetValue(const ParametersType ¶meters) const override
void ThreadedGetValueAndDerivative(ThreadIdType threadId) const override
~SumSquaredTissueVolumeDifferenceImageToImageMetric() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
typename TransformType::SpatialHessianType SpatialHessianType
void GetValueAndDerivativeSingleThreaded(const ParametersType ¶meters, MeasureType &measure, DerivativeType &derivative) const
typename TransformType::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
SumSquaredTissueVolumeDifferenceImageToImageMetric Self
void AfterThreadedGetValueAndDerivative(MeasureType &measure, DerivativeType &derivative) const override
itkOverrideGetNameOfClassMacro(SumSquaredTissueVolumeDifferenceImageToImageMetric)
typename Superclass::AdvancedTransformType TransformType
SmartPointer< const Self > ConstPointer
SumSquaredTissueVolumeDifferenceImageToImageMetric()
typename TransformType::InternalMatrixType InternalMatrixType
SmartPointer< Self > Pointer