go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Loading...
Searching...
No Matches
itkVarianceOverLastDimensionImageMetric.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
19#ifndef itkVarianceOverLastDimensionImageMetric_h
20#define itkVarianceOverLastDimensionImageMetric_h
21
22#include "itkSmoothingRecursiveGaussianImageFilter.h"
24#include "itkNearestNeighborInterpolateImageFunction.h"
26
27namespace itk
28{
29
50
51template <typename TFixedImage, typename TMovingImage>
52class ITK_TEMPLATE_EXPORT VarianceOverLastDimensionImageMetric
53 : public AdvancedImageToImageMetric<TFixedImage, TMovingImage>
54{
55public:
57
61 using Pointer = SmartPointer<Self>;
62 using ConstPointer = SmartPointer<const Self>;
63
64 using typename Superclass::FixedImageRegionType;
65 using FixedImageSizeType = typename FixedImageRegionType::SizeType;
66
68 itkNewMacro(Self);
69
72
74 itkSetMacro(SampleLastDimensionRandomly, bool);
75 itkSetMacro(NumSamplesLastDimension, unsigned int);
76 itkSetMacro(NumAdditionalSamplesFixed, unsigned int);
77 itkSetMacro(ReducedDimensionIndex, unsigned int);
78 itkSetMacro(UseZeroAverageDisplacementConstraint, bool);
79 itkSetMacro(GridSize, FixedImageSizeType);
80 itkSetMacro(TransformIsStackTransform, bool);
81
83 itkGetConstMacro(SampleLastDimensionRandomly, bool);
84 itkGetConstMacro(NumSamplesLastDimension, int);
85
87 using typename Superclass::CoordinateRepresentationType;
88 using typename Superclass::MovingImageType;
89 using typename Superclass::MovingImagePixelType;
90 using typename Superclass::MovingImageConstPointer;
91 using typename Superclass::FixedImageType;
92 using typename Superclass::FixedImageConstPointer;
93 using typename Superclass::TransformType;
94 using typename Superclass::TransformPointer;
95 using typename Superclass::InputPointType;
96 using typename Superclass::OutputPointType;
97 using typename Superclass::TransformJacobianType;
98 using typename Superclass::InterpolatorType;
99 using typename Superclass::InterpolatorPointer;
100 using typename Superclass::RealType;
101 using typename Superclass::GradientPixelType;
102 using typename Superclass::GradientImageType;
103 using typename Superclass::GradientImagePointer;
104 using typename Superclass::FixedImageMaskType;
106 using typename Superclass::MovingImageMaskType;
108 using typename Superclass::MeasureType;
109 using typename Superclass::DerivativeType;
110 using typename Superclass::DerivativeValueType;
111 using typename Superclass::ParametersType;
112 using typename Superclass::FixedImagePixelType;
114 using typename Superclass::ImageSamplerType;
115 using typename Superclass::ImageSamplerPointer;
123
125 itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
126
128 itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension);
129
131 MeasureType
132 GetValue(const ParametersType & parameters) const override;
133
135 void
136 GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const override;
137
139 void
140 GetValueAndDerivative(const ParametersType & parameters,
141 MeasureType & Value,
142 DerivativeType & Derivative) const override;
143
147 void
148 Initialize() override;
149
150protected:
153 void
154 PrintSelf(std::ostream & os, Indent indent) const override;
155
157
159 using typename Superclass::FixedImageIndexType;
162 using typename Superclass::FixedImagePointType;
164 typename itk::ContinuousIndex<CoordinateRepresentationType, FixedImageDimension>;
170
174 void
175 EvaluateTransformJacobianInnerProduct(const TransformJacobianType & jacobian,
176 const MovingImageDerivativeType & movingImageDerivative,
177 DerivativeType & imageJacobian) const override;
178
179private:
181 void
182 SampleRandom(const int n, const int m, std::vector<int> & numbers) const;
183
186 unsigned int m_NumSamplesLastDimension{ 10 };
189
192
195
198
201};
202
203} // end namespace itk
204
205#ifndef ITK_MANUAL_INSTANTIATION
206# include "itkVarianceOverLastDimensionImageMetric.hxx"
207#endif
208
209#endif // end #ifndef itkVarianceOverLastDimensionImageMetric_h
typename TransformType::OutputPointType MovingImagePointType
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
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
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
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
typename ImageSamplerType::Pointer ImageSamplerPointer
typename InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
ImageMaskSpatialObject< Self::MovingImageDimension > MovingImageMaskType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
~VarianceOverLastDimensionImageMetric() override=default
MeasureType GetValue(const ParametersType &parameters) const override
void SampleRandom(const int n, const int m, std::vector< int > &numbers) const
void PrintSelf(std::ostream &os, Indent indent) const override
itkOverrideGetNameOfClassMacro(VarianceOverLastDimensionImageMetric)
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const override
AdvancedImageToImageMetric< typename MetricBase< TElastix >::FixedImageType, typename MetricBase< TElastix >::MovingImageType > Superclass
void GetDerivative(const ParametersType &parameters, DerivativeType &derivative) const override
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
ITK_DISALLOW_COPY_AND_MOVE(VarianceOverLastDimensionImageMetric)
void GetValueAndDerivative(const ParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const override


Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo