go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedMeanSquaresImageToImageMetric.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 __itkAdvancedMeanSquaresImageToImageMetric_h
19#define __itkAdvancedMeanSquaresImageToImageMetric_h
20
22
23#include "itkSmoothingRecursiveGaussianImageFilter.h" // needed for SelfHessian
24#include "itkImageGridSampler.h" // needed for SelfHessian
25#include "itkNearestNeighborInterpolateImageFunction.h" // needed for SelfHessian
26
27namespace itk
28{
29
55template< class TFixedImage, class TMovingImage >
57 public AdvancedImageToImageMetric< TFixedImage, TMovingImage >
58{
59public:
60
64 TFixedImage, TMovingImage > Superclass;
66 typedef SmartPointer< const Self > ConstPointer;
67
69 itkNewMacro( Self );
70
73
75 typedef typename
111 typedef typename
115 typedef typename
117 typedef typename
119 typedef typename
125
128
130 itkStaticConstMacro( FixedImageDimension, unsigned int,
131 FixedImageType::ImageDimension );
132
134 itkStaticConstMacro( MovingImageDimension, unsigned int,
135 MovingImageType::ImageDimension );
136
138 virtual MeasureType GetValueSingleThreaded( const TransformParametersType & parameters ) const;
139
140 MeasureType GetValue( const TransformParametersType & parameters ) const override;
141
143 void GetDerivative( const TransformParametersType & parameters,
144 DerivativeType & derivative ) const override;
145
148 MeasureType & value, DerivativeType & derivative ) const;
149
151 MeasureType & value, DerivativeType & derivative ) const override;
152
154 void GetSelfHessian( const TransformParametersType & parameters, HessianType & H ) const override;
155
157 itkSetMacro( SelfHessianSmoothingSigma, double );
158 itkGetConstMacro( SelfHessianSmoothingSigma, double );
159
161 itkSetMacro( SelfHessianNoiseRange, double );
162 itkGetConstMacro( SelfHessianNoiseRange, double );
163
165 itkSetMacro( NumberOfSamplesForSelfHessian, unsigned int );
166 itkGetConstMacro( NumberOfSamplesForSelfHessian, unsigned int );
167
172 void Initialize( void ) override;
173
181 itkSetMacro( UseNormalization, bool );
182 itkGetConstMacro( UseNormalization, bool );
183
189 itkSetMacro( UseOpenMP, bool );
190
191protected:
192
195
196 void PrintSelf( std::ostream & os, Indent indent ) const override;
197
211
213 typedef SmoothingRecursiveGaussianImageFilter<
215 typedef BSplineInterpolateImageFunction<
217 typedef NearestNeighborInterpolateImageFunction<
220
222
226 const RealType fixedImageValue,
227 const RealType movingImageValue,
228 const DerivativeType & imageJacobian,
229 const NonZeroJacobianIndicesType & nzji,
230 MeasureType & measure,
231 DerivativeType & deriv ) const;
232
236 const DerivativeType & imageJacobian,
237 const NonZeroJacobianIndicesType & nzji,
238 HessianType & H ) const;
239
241 inline void ThreadedGetValue( ThreadIdType threadID ) override;
242
244 inline void AfterThreadedGetValue( MeasureType & value ) const override;
245
247 inline void ThreadedGetValueAndDerivative( ThreadIdType threadID ) override;
248
251 MeasureType & value, DerivativeType & derivative ) const override;
252
253private:
254
255 AdvancedMeanSquaresImageToImageMetric( const Self & ); // purposely not implemented
256 void operator=( const Self & ); // purposely not implemented
257
262
263};
264
265} // end namespace itk
266
267#ifndef ITK_MANUAL_INSTANTIATION
268#include "itkAdvancedMeanSquaresImageToImageMetric.hxx"
269#endif
270
271#endif // end #ifndef __itkAdvancedMeanSquaresImageToImageMetric_h
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
Superclass::FixedImageConstPointer FixedImageConstPointer
Superclass::TransformParametersType TransformParametersType
Superclass::MovingImageConstPointer MovingImageConstPointer
Superclass::FixedImageMaskPointer FixedImageMaskPointer
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Superclass::GradientImageFilterType GradientImageFilterType
ImageMaskSpatialObject< itkGetStaticConstMacro(MovingImageDimension) > MovingImageMaskSpatialObject2Type
Superclass::TransformJacobianType TransformJacobianType
FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
Superclass::GradientImagePointer GradientImagePointer
Superclass::TransformPointer TransformPointer
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
ImageSamplerBase< FixedImageType > ImageSamplerType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
Superclass::InterpolatorPointer InterpolatorPointer
Superclass::MovingImageMaskPointer MovingImageMaskPointer
TransformType::InputPointType FixedImagePointType
Superclass::MovingImageMaskType MovingImageMaskType
Superclass::GradientPixelType GradientPixelType
MovingImageType::IndexType MovingImageIndexType
MovingImageType::RegionType MovingImageRegionType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
FixedImageIndexType::IndexValueType FixedImageIndexValueType
Superclass::MovingImagePixelType MovingImagePixelType
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
ImageMaskSpatialObject< itkGetStaticConstMacro(FixedImageDimension) > FixedImageMaskSpatialObject2Type
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
Superclass::FixedImageMaskType FixedImageMaskType
Superclass::GradientImageType GradientImageType
Superclass::InterpolatorType InterpolatorType
TransformType::OutputPointType MovingImagePointType
vnl_sparse_matrix< HessianValueType > HessianType
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::FixedImageRegionType FixedImageRegionType
AdvancedTransformType::NumberOfParametersType NumberOfParametersType
Compute Mean square difference between two images, based on AdvancedImageToImageMetric....
void ThreadedGetValueAndDerivative(ThreadIdType threadID) override
Superclass::MovingImageDerivativeScalesType MovingImageDerivativeScalesType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Superclass::FixedImageMaskSpatialObject2Type FixedImageMaskSpatialObject2Type
Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
void AfterThreadedGetValue(MeasureType &value) const override
Superclass::MovingImageLimiterOutputType MovingImageLimiterOutputType
void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const override
void UpdateSelfHessianTerms(const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, HessianType &H) const
SmoothingRecursiveGaussianImageFilter< FixedImageType, FixedImageType > SmootherType
NearestNeighborInterpolateImageFunction< FixedImageType, CoordinateRepresentationType > DummyFixedImageInterpolatorType
void ThreadedGetValue(ThreadIdType threadID) override
void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
Superclass::GradientImageFilterPointer GradientImageFilterPointer
virtual MeasureType GetValueSingleThreaded(const TransformParametersType &parameters) const
void GetSelfHessian(const TransformParametersType &parameters, HessianType &H) const override
BSplineInterpolateImageFunction< FixedImageType, CoordinateRepresentationType > FixedImageInterpolatorType
AdvancedImageToImageMetric< TFixedImage, TMovingImage > Superclass
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
Superclass::CentralDifferenceGradientFilterType CentralDifferenceGradientFilterType
void PrintSelf(std::ostream &os, Indent indent) const override
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
Superclass::FixedImageLimiterOutputType FixedImageLimiterOutputType
void UpdateValueAndDerivativeTerms(const RealType fixedImageValue, const RealType movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, MeasureType &measure, DerivativeType &deriv) const
void GetValueAndDerivativeSingleThreaded(const TransformParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
Superclass::MovingImageMaskSpatialObject2Type MovingImageMaskSpatialObject2Type
MeasureType GetValue(const TransformParametersType &parameters) const override
Samples image voxels on a regular grid.


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo