go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkSumOfPairwiseCorrelationCoefficientsMetric.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkSumOfPairwiseCorrelationCoefficientsMetric_h
19#define itkSumOfPairwiseCorrelationCoefficientsMetric_h
20
22
23#include "itkSmoothingRecursiveGaussianImageFilter.h"
25#include "itkNearestNeighborInterpolateImageFunction.h"
26#include "itkExtractImageFilter.h"
27
28namespace itk
29{
30template <class TFixedImage, class TMovingImage>
32 : public AdvancedImageToImageMetric<TFixedImage, TMovingImage>
33{
34public:
36
40 using Pointer = SmartPointer<Self>;
41 using ConstPointer = SmartPointer<const Self>;
42
43 using typename Superclass::FixedImageRegionType;
44 using FixedImageSizeType = typename FixedImageRegionType::SizeType;
45
47 itkNewMacro(Self);
48
51
53 itkSetMacro(NumAdditionalSamplesFixed, unsigned int);
54 itkSetMacro(ReducedDimensionIndex, unsigned int);
55 itkSetMacro(SubtractMean, bool);
56 itkSetMacro(GridSize, FixedImageSizeType);
57 itkSetMacro(TransformIsStackTransform, bool);
58
60 using typename Superclass::CoordinateRepresentationType;
61 using typename Superclass::MovingImageType;
62 using typename Superclass::MovingImagePixelType;
63 using typename Superclass::MovingImageConstPointer;
64 using typename Superclass::FixedImageType;
65 using typename Superclass::FixedImageConstPointer;
66 using typename Superclass::TransformType;
67 using typename Superclass::TransformPointer;
68 using typename Superclass::InputPointType;
69 using typename Superclass::OutputPointType;
70 using typename Superclass::TransformParametersType;
71 using typename Superclass::TransformJacobianType;
72 using typename Superclass::InterpolatorType;
73 using typename Superclass::InterpolatorPointer;
74 using typename Superclass::RealType;
75 using typename Superclass::GradientPixelType;
76 using typename Superclass::GradientImageType;
77 using typename Superclass::GradientImagePointer;
78 using typename Superclass::GradientImageFilterType;
79 using typename Superclass::GradientImageFilterPointer;
80 using typename Superclass::FixedImageMaskType;
81 using typename Superclass::FixedImageMaskPointer;
82 using typename Superclass::MovingImageMaskType;
83 using typename Superclass::MovingImageMaskPointer;
84 using typename Superclass::MeasureType;
85 using typename Superclass::DerivativeType;
86 using typename Superclass::ParametersType;
89 using typename Superclass::ImageSamplerType;
98
100 itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
101
103 itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension);
104
106 MeasureType
107 GetValue(const TransformParametersType & parameters) const override;
108
110 void
111 GetDerivative(const TransformParametersType & parameters, DerivativeType & derivative) const override;
112
114 void
115 GetValueAndDerivative(const TransformParametersType & parameters,
116 MeasureType & Value,
117 DerivativeType & Derivative) const override;
118
123 void
124 Initialize() override;
125
126protected:
129 void
130 PrintSelf(std::ostream & os, Indent indent) const override;
131
135 using typename Superclass::FixedImageIndexType;
138 using typename Superclass::FixedImagePointType;
140 typename itk::ContinuousIndex<CoordinateRepresentationType, FixedImageDimension>;
147
151 void
152 EvaluateTransformJacobianInnerProduct(const TransformJacobianType & jacobian,
153 const MovingImageDerivativeType & movingImageDerivative,
154 DerivativeType & imageJacobian) const override;
155
156private:
158 void
159 SampleRandom(const int n, const int m, std::vector<int> & numbers) const;
160
164
166 bool m_SubtractMean{ true };
167
170
172 bool m_TransformIsStackTransform{ true };
173};
174
175} // end namespace itk
176
177#ifndef ITK_MANUAL_INSTANTIATION
178# include "itkSumOfPairwiseCorrelationCoefficientsMetric.hxx"
179#endif
180
181#endif // end #ifndef itkSumOfPairwiseCorrelationCoefficientsMetric_h
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.
typename itk::ContinuousIndex< CoordinateRepresentationType, FixedImageDimension > FixedImageContinuousIndexType
ITK_DISALLOW_COPY_AND_MOVE(SumOfPairwiseCorrelationCoefficientsMetric)
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const override
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const override
MeasureType GetValue(const TransformParametersType &parameters) const override
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const override
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
~SumOfPairwiseCorrelationCoefficientsMetric() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
void SampleRandom(const int n, const int m, std::vector< int > &numbers) const


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo