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 
15 
16 #ifndef __itkAdvancedMeanSquaresImageToImageMetric_h
17 #define __itkAdvancedMeanSquaresImageToImageMetric_h
18 
19 #include "itkSmoothingRecursiveGaussianImageFilter.h"
20 //#include "itkImageRandomCoordinateSampler.h"
21 #include "itkImageGridSampler.h"
22 #include "itkNearestNeighborInterpolateImageFunction.h"
24 
25 namespace itk
26 {
27 
53 template < class TFixedImage, class TMovingImage >
55  public AdvancedImageToImageMetric< TFixedImage, TMovingImage>
56 {
57 public:
58 
62  TFixedImage, TMovingImage > Superclass;
63  typedef SmartPointer<Self> Pointer;
64  typedef SmartPointer<const Self> ConstPointer;
65 
67  itkNewMacro( Self );
68 
71 
73  typedef typename
89  typedef typename Superclass::RealType RealType;
107  typedef typename
111  typedef typename
113  typedef typename
115  typedef typename
117 
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 
138  virtual void GetValueAndDerivative( const TransformParametersType & parameters,
139  MeasureType& Value, DerivativeType& Derivative ) const;
140 
142  virtual void GetSelfHessian( const TransformParametersType & parameters, HessianType & H ) const;
143 
145  itkSetMacro( SelfHessianSmoothingSigma, double );
146  itkGetConstMacro( SelfHessianSmoothingSigma, double );
147 
149  itkSetMacro( SelfHessianNoiseRange, double );
150  itkGetConstMacro( SelfHessianNoiseRange, double );
151 
153  itkSetMacro( NumberOfSamplesForSelfHessian, unsigned int );
154  itkGetConstMacro( NumberOfSamplesForSelfHessian, unsigned int );
155 
160  virtual void Initialize(void) throw ( ExceptionObject );
161 
169  itkSetMacro( UseNormalization, bool );
170  itkGetConstMacro( UseNormalization, bool );
171 
172 protected:
174  virtual ~AdvancedMeanSquaresImageToImageMetric() {};
175  void PrintSelf( std::ostream& os, Indent indent ) const;
176 
190 
192  typedef SmoothingRecursiveGaussianImageFilter<
198  //typedef ImageRandomCoordinateSampler<FixedImageType> SelfHessianSamplerType;
200 
202 
207  const TransformJacobianType & jacobian,
208  const MovingImageDerivativeType & movingImageDerivative,
209  DerivativeType & imageJacobian) const;
210 
214  const RealType fixedImageValue,
215  const RealType movingImageValue,
216  const DerivativeType & imageJacobian,
217  const NonZeroJacobianIndicesType & nzji,
218  MeasureType & measure,
219  DerivativeType & deriv ) const;
220 
224  const DerivativeType & imageJacobian,
225  const NonZeroJacobianIndicesType & nzji,
226  HessianType & H) const;
227 
228 private:
229  AdvancedMeanSquaresImageToImageMetric(const Self&); //purposely not implemented
230  void operator=(const Self&); //purposely not implemented
231 
236 
237 }; // end class AdvancedMeanSquaresImageToImageMetric
238 
239 } // end namespace itk
240 
241 #ifndef ITK_MANUAL_INSTANTIATION
242 #include "itkAdvancedMeanSquaresImageToImageMetric.hxx"
243 #endif
244 
245 #endif // end #ifndef __itkAdvancedMeanSquaresImageToImageMetric_h
246 


Generated on 21-03-2014 for elastix by doxygen 1.8.1.2 elastix logo