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  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 #ifndef __itkAdvancedMeanSquaresImageToImageMetric_h
15 #define __itkAdvancedMeanSquaresImageToImageMetric_h
16 
18 
19 #include "itkSmoothingRecursiveGaussianImageFilter.h" // needed for SelfHessian
20 #include "itkImageGridSampler.h" // needed for SelfHessian
21 #include "itkNearestNeighborInterpolateImageFunction.h" // needed for SelfHessian
22 
23 namespace itk
24 {
25 
51 template< class TFixedImage, class TMovingImage >
53  public AdvancedImageToImageMetric< TFixedImage, TMovingImage >
54 {
55 public:
56 
60  TFixedImage, TMovingImage > Superclass;
61  typedef SmartPointer< Self > Pointer;
62  typedef SmartPointer< const Self > ConstPointer;
63 
65  itkNewMacro( Self );
66 
69 
71  typedef typename
88  typedef typename Superclass::RealType RealType;
107  typedef typename
111  typedef typename
113  typedef typename
115  typedef typename
121 
123  itkStaticConstMacro( FixedImageDimension, unsigned int,
124  FixedImageType::ImageDimension );
125 
127  itkStaticConstMacro( MovingImageDimension, unsigned int,
128  MovingImageType::ImageDimension );
129 
131  virtual MeasureType GetValue( const TransformParametersType & parameters ) const;
132 
134  virtual void GetDerivative( const TransformParametersType & parameters,
135  DerivativeType & derivative ) const;
136 
139  MeasureType & value, DerivativeType & derivative ) const;
140 
141  virtual void GetValueAndDerivative( const TransformParametersType & parameters,
142  MeasureType & value, DerivativeType & derivative ) const;
143 
145  virtual void GetSelfHessian( const TransformParametersType & parameters, HessianType & H ) const;
146 
148  itkSetMacro( SelfHessianSmoothingSigma, double );
149  itkGetConstMacro( SelfHessianSmoothingSigma, double );
150 
152  itkSetMacro( SelfHessianNoiseRange, double );
153  itkGetConstMacro( SelfHessianNoiseRange, double );
154 
156  itkSetMacro( NumberOfSamplesForSelfHessian, unsigned int );
157  itkGetConstMacro( NumberOfSamplesForSelfHessian, unsigned int );
158 
163  virtual void Initialize( void ) throw ( ExceptionObject );
164 
172  itkSetMacro( UseNormalization, bool );
173  itkGetConstMacro( UseNormalization, bool );
174 
180  itkSetMacro( UseOpenMP, bool );
181 
182 protected:
183 
185  virtual ~AdvancedMeanSquaresImageToImageMetric(){}
186 
187  void PrintSelf( std::ostream & os, Indent indent ) const;
188 
202 
204  typedef SmoothingRecursiveGaussianImageFilter<
206  typedef BSplineInterpolateImageFunction<
208  typedef NearestNeighborInterpolateImageFunction<
211 
213 
217  const RealType fixedImageValue,
218  const RealType movingImageValue,
219  const DerivativeType & imageJacobian,
220  const NonZeroJacobianIndicesType & nzji,
221  MeasureType & measure,
222  DerivativeType & deriv ) const;
223 
227  const DerivativeType & imageJacobian,
228  const NonZeroJacobianIndicesType & nzji,
229  HessianType & H ) const;
230 
232  inline void ThreadedGetValueAndDerivative( ThreadIdType threadID );
233 
236  MeasureType & value, DerivativeType & derivative ) const;
237 
238 private:
239 
240  AdvancedMeanSquaresImageToImageMetric( const Self & ); // purposely not implemented
241  void operator=( const Self & ); // purposely not implemented
242 
247 
248 };
249 
250 } // end namespace itk
251 
252 #ifndef ITK_MANUAL_INSTANTIATION
253 #include "itkAdvancedMeanSquaresImageToImageMetric.hxx"
254 #endif
255 
256 #endif // end #ifndef __itkAdvancedMeanSquaresImageToImageMetric_h
Compute Mean square difference between two images, based on AdvancedImageToImageMetric...
AdvancedTransformType::NumberOfParametersType NumberOfParametersType
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
void UpdateValueAndDerivativeTerms(const RealType fixedImageValue, const RealType movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, MeasureType &measure, DerivativeType &deriv) const
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Superclass::TransformParametersType TransformParametersType
Superclass::MovingImageType MovingImageType
void UpdateSelfHessianTerms(const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, HessianType &H) const
Superclass::FixedImageMaskPointer FixedImageMaskPointer
Superclass::FixedImageLimiterOutputType FixedImageLimiterOutputType
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics...
Superclass::GradientPixelType GradientPixelType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
void PrintSelf(std::ostream &os, Indent indent) const
void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const
Superclass::FixedImageRegionType FixedImageRegionType
AdvancedImageToImageMetric< TFixedImage, TMovingImage > Superclass
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
MovingImageType::IndexType MovingImageIndexType
Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
TransformType::InputPointType FixedImagePointType
Superclass::GradientImageFilterPointer GradientImageFilterPointer
FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
ImageSamplerBase< FixedImageType > ImageSamplerType
virtual MeasureType GetValue(const TransformParametersType &parameters) const
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Superclass::MovingImageLimiterOutputType MovingImageLimiterOutputType
Superclass::InterpolatorPointer InterpolatorPointer
BSplineInterpolateImageFunction< FixedImageType, CoordinateRepresentationType > FixedImageInterpolatorType
FixedImageIndexType::IndexValueType FixedImageIndexValueType
TransformType::OutputPointType MovingImagePointType
Superclass::MovingImageMaskType MovingImageMaskType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
Superclass::GradientImageType GradientImageType
Superclass::TransformPointer TransformPointer
Superclass::CoordinateRepresentationType CoordinateRepresentationType
virtual void GetSelfHessian(const TransformParametersType &parameters, HessianType &H) const
Superclass::GradientImageFilterType GradientImageFilterType
MovingImageType::RegionType MovingImageRegionType
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
Superclass::InterpolatorType InterpolatorType
Superclass::TransformJacobianType TransformJacobianType
Superclass::CentralDifferenceGradientFilterType CentralDifferenceGradientFilterType
void GetValueAndDerivativeSingleThreaded(const TransformParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
NearestNeighborInterpolateImageFunction< FixedImageType, CoordinateRepresentationType > DummyFixedImageInterpolatorType
Superclass::MovingImagePixelType MovingImagePixelType
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
virtual void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
Superclass::MovingImageDerivativeScalesType MovingImageDerivativeScalesType
Superclass::MovingImageMaskPointer MovingImageMaskPointer
SmoothingRecursiveGaussianImageFilter< FixedImageType, FixedImageType > SmootherType
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
ThreaderType::ThreadInfoStruct ThreadInfoType
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
Superclass::FixedImageMaskType FixedImageMaskType
void ThreadedGetValueAndDerivative(ThreadIdType threadID)
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
Samples image voxels on a regular grid.
Superclass::FixedImageConstPointer FixedImageConstPointer
Superclass::MovingImageConstPointer MovingImageConstPointer
virtual void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const
Superclass::GradientImageFilterPointer GradientImageFilterPointer
vnl_sparse_matrix< HessianValueType > HessianType
Superclass::GradientImagePointer GradientImagePointer


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo