23#include "itkSmoothingRecursiveGaussianImageFilter.h"
25#include "itkNearestNeighborInterpolateImageFunction.h"
26#include "itkExtractImageFilter.h"
32template <
class TFixedImage,
class TMovingImage>
44 using typename Superclass::FixedImageRegionType;
54 itkSetMacro(SampleLastDimensionRandomly,
bool);
55 itkSetMacro(NumSamplesLastDimension,
unsigned int);
56 itkSetMacro(NumAdditionalSamplesFixed,
unsigned int);
57 itkSetMacro(ReducedDimensionIndex,
unsigned int);
58 itkSetMacro(SubtractMean,
bool);
60 itkSetMacro(TransformIsStackTransform,
bool);
61 itkSetMacro(NumEigenValues,
unsigned int);
62 itkSetMacro(UseDerivativeOfMean,
bool);
63 itkSetMacro(DeNoise,
bool);
64 itkSetMacro(VarNoise,
double);
67 itkGetConstMacro(SampleLastDimensionRandomly,
bool);
68 itkGetConstMacro(NumSamplesLastDimension,
int);
71 using typename Superclass::CoordinateRepresentationType;
72 using typename Superclass::MovingImageType;
73 using typename Superclass::MovingImagePixelType;
74 using typename Superclass::MovingImageConstPointer;
75 using typename Superclass::FixedImageType;
76 using typename Superclass::FixedImageConstPointer;
77 using typename Superclass::TransformType;
78 using typename Superclass::TransformPointer;
79 using typename Superclass::InputPointType;
80 using typename Superclass::OutputPointType;
81 using typename Superclass::TransformParametersType;
82 using typename Superclass::TransformJacobianType;
83 using typename Superclass::InterpolatorType;
84 using typename Superclass::InterpolatorPointer;
85 using typename Superclass::RealType;
86 using typename Superclass::GradientPixelType;
87 using typename Superclass::GradientImageType;
88 using typename Superclass::GradientImagePointer;
89 using typename Superclass::GradientImageFilterType;
90 using typename Superclass::GradientImageFilterPointer;
91 using typename Superclass::FixedImageMaskType;
92 using typename Superclass::FixedImageMaskPointer;
93 using typename Superclass::MovingImageMaskType;
94 using typename Superclass::MovingImageMaskPointer;
95 using typename Superclass::MeasureType;
96 using typename Superclass::DerivativeType;
97 using typename Superclass::ParametersType;
118 GetValue(
const TransformParametersType & parameters)
const;
122 GetDerivative(
const TransformParametersType & parameters, DerivativeType & derivative)
const;
128 DerivativeType & Derivative)
const;
151 typename itk::ContinuousIndex<CoordinateRepresentationType, FixedImageDimension>;
165 DerivativeType & imageJacobian)
const;
181 SampleRandom(
const int n,
const int m, std::vector<int> & numbers)
const;
210#ifndef ITK_MANUAL_INSTANTIATION
211# include "itkPCAMetric.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
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.
unsigned int m_NumSamplesLastDimension
unsigned int m_NumEigenValues
vnl_vector< double > m_normdCdmu
ITK_DISALLOW_COPY_AND_MOVE(PCAMetric)
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
typename itk::ContinuousIndex< CoordinateRepresentationType, FixedImageDimension > FixedImageContinuousIndexType
void PrintSelf(std::ostream &os, Indent indent) const
vnl_vector< double > m_secondEigenVector
bool m_SampleLastDimensionRandomly
vnl_vector< double > m_firstEigenVector
FixedImageSizeType m_GridSize
vnl_vector< double > m_fourthEigenVector
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const
virtual MeasureType GetValue(const TransformParametersType ¶meters) const
bool m_TransformIsStackTransform
vnl_vector< double > m_fifthEigenVector
virtual void GetDerivative(const TransformParametersType ¶meters, DerivativeType &derivative) const
typename FixedImageRegionType::SizeType FixedImageSizeType
SmartPointer< const Self > ConstPointer
unsigned int m_NumAdditionalSamplesFixed
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
void SampleRandom(const int n, const int m, std::vector< int > &numbers) const
virtual void GetValueAndDerivative(const TransformParametersType ¶meters, MeasureType &Value, DerivativeType &Derivative) const
vnl_vector< double > m_sixthEigenVector
vnl_vector< double > m_eigenValues
virtual void Initialize()
vnl_vector< double > m_seventhEigenVector
vnl_vector< double > m_thirdEigenVector
unsigned int m_ReducedDimensionIndex
bool m_UseDerivativeOfMean