18#ifndef itkImageToImageMetricWithFeatures_h
19#define itkImageToImageMetricWithFeatures_h
22#include "itkInterpolateImageFunction.h"
37template <
class TFixedImage,
39 class TFixedFeatureImage = TFixedImage,
40 class TMovingFeatureImage = TMovingImage>
56 using typename Superclass::CoordinateRepresentationType;
57 using typename Superclass::MovingImageType;
58 using typename Superclass::MovingImagePixelType;
59 using typename Superclass::MovingImageConstPointer;
60 using typename Superclass::FixedImageType;
61 using typename Superclass::FixedImageConstPointer;
62 using typename Superclass::FixedImageRegionType;
63 using typename Superclass::TransformType;
64 using typename Superclass::TransformPointer;
65 using typename Superclass::InputPointType;
66 using typename Superclass::OutputPointType;
67 using typename Superclass::TransformParametersType;
68 using typename Superclass::TransformJacobianType;
69 using typename Superclass::InterpolatorType;
70 using typename Superclass::InterpolatorPointer;
71 using typename Superclass::RealType;
72 using typename Superclass::GradientPixelType;
73 using typename Superclass::GradientImageType;
74 using typename Superclass::GradientImagePointer;
79 using typename Superclass::MeasureType;
80 using typename Superclass::DerivativeType;
81 using typename Superclass::ParametersType;
88 using typename Superclass::InternalMaskPixelType;
89 using typename Superclass::InternalMovingImageMaskType;
90 using typename Superclass::MovingImageMaskInterpolatorType;
123 itkGetConstMacro(NumberOfFixedFeatureImages,
unsigned int);
132 this->SetFixedFeatureImage(0, im);
137 const FixedFeatureImageType *
143 return this->GetFixedFeatureImage(0);
154 this->SetFixedFeatureInterpolator(0, interpolator);
159 const FixedFeatureInterpolatorType *
165 return this->GetFixedFeatureInterpolator(0);
174 itkGetConstMacro(NumberOfMovingFeatureImages,
unsigned int);
183 this->SetMovingFeatureImage(0, im);
188 const MovingFeatureImageType *
194 return this->GetMovingFeatureImage(0);
205 this->SetMovingFeatureInterpolator(0, interpolator);
210 const MovingFeatureInterpolatorType *
216 return this->GetMovingFeatureInterpolator(0);
239 unsigned int m_NumberOfFixedFeatureImages{ 0 };
240 unsigned int m_NumberOfMovingFeatureImages{ 0 };
246 std::vector<bool> m_FeatureInterpolatorsIsBSpline{};
258#ifndef ITK_MANUAL_INSTANTIATION
259# include "itkImageToImageMetricWithFeatures.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 FixedImageType::PixelType FixedImagePixelType
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
SmartPointer< MovingImageMaskType > MovingImageMaskPointer
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
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
ImageMaskSpatialObject< Self::MovingImageDimension > MovingImageMaskType
This class is a base class for any image sampler.
Computes similarity between regions of two images.
void SetMovingFeatureImage(unsigned int i, MovingFeatureImageType *im)
typename FixedFeatureInterpolatorType::Pointer FixedFeatureInterpolatorPointer
typename FixedFeatureImageType::Pointer FixedFeatureImagePointer
const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator() const
const MovingFeatureImageType * GetMovingFeatureImage() const
std::vector< MovingFeatureImagePointer > MovingFeatureImageVectorType
const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator(unsigned int i) const
void SetNumberOfFixedFeatureImages(unsigned int arg)
void SetFixedFeatureImage(FixedFeatureImageType *im)
virtual ~ImageToImageMetricWithFeatures()
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator() const
void SetMovingFeatureInterpolator(unsigned int i, MovingFeatureInterpolatorType *interpolator)
virtual void CheckForBSplineFeatureInterpolators()
void SetMovingFeatureImage(MovingFeatureImageType *im)
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
const MovingFeatureImageType * GetMovingFeatureImage(unsigned int i) const
std::vector< MovingFeatureInterpolatorPointer > MovingFeatureInterpolatorVectorType
InterpolateImageFunction< FixedFeatureImageType, double > FixedFeatureInterpolatorType
const FixedFeatureImageType * GetFixedFeatureImage() const
void SetNumberOfMovingFeatureImages(unsigned int arg)
std::vector< BSplineInterpolatorPointer > BSplineFeatureInterpolatorVectorType
void SetMovingFeatureInterpolator(MovingFeatureInterpolatorType *interpolator)
void SetFixedFeatureInterpolator(unsigned int i, FixedFeatureInterpolatorType *interpolator)
ImageToImageMetricWithFeatures()=default
typename MovingFeatureInterpolatorType::Pointer MovingFeatureInterpolatorPointer
typename MovingFeatureImageType::Pointer MovingFeatureImagePointer
void SetFixedFeatureImage(unsigned int i, FixedFeatureImageType *im)
std::vector< FixedFeatureInterpolatorPointer > FixedFeatureInterpolatorVectorType
TMovingFeatureImage MovingFeatureImageType
void PrintSelf(std::ostream &os, Indent indent) const
const FixedFeatureImageType * GetFixedFeatureImage(unsigned int i) const
void SetFixedFeatureInterpolator(FixedFeatureInterpolatorType *interpolator)
SmartPointer< const Self > ConstPointer
TFixedFeatureImage FixedFeatureImageType
typename BSplineInterpolatorType::Pointer BSplineInterpolatorPointer
virtual void Initialize()
ITK_DISALLOW_COPY_AND_MOVE(ImageToImageMetricWithFeatures)
InterpolateImageFunction< MovingFeatureImageType, double > MovingFeatureInterpolatorType
std::vector< FixedFeatureImagePointer > FixedFeatureImageVectorType
const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator(unsigned int i) const
Base class for all ITK limiter function objects.