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 
Compute Mean square difference between two images, based on AdvancedImageToImageMetric...
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
void UpdateValueAndDerivativeTerms(const RealType fixedImageValue, const RealType movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, MeasureType &measure, DerivativeType &deriv) const
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...
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
Superclass::GradientPixelType GradientPixelType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
void PrintSelf(std::ostream &os, Indent indent) 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
ImageSamplerBase< FixedImageType > ImageSamplerType
virtual MeasureType GetValue(const TransformParametersType &parameters) const
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Superclass::MovingImageLimiterOutputType MovingImageLimiterOutputType
Superclass::InterpolatorPointer InterpolatorPointer
vnl_sparse_matrix< HessianValueType > HessianType
virtual void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const
FixedArray< double, itkGetStaticConstMacro(MovingImageDimension) > MovingImageDerivativeScalesType
FixedImageIndexType::IndexValueType FixedImageIndexValueType
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const
TransformType::OutputPointType MovingImagePointType
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::MovingImageMaskType MovingImageMaskType
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
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
NearestNeighborInterpolateImageFunction< FixedImageType, CoordinateRepresentationType > DummyFixedImageInterpolatorType
Superclass::MovingImagePixelType MovingImagePixelType
Superclass::MovingImageDerivativeScalesType MovingImageDerivativeScalesType
Superclass::MovingImageMaskPointer MovingImageMaskPointer
SmoothingRecursiveGaussianImageFilter< FixedImageType, FixedImageType > SmootherType
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
BSplineInterpolateImageFunction< FixedImageType, CoordinateRepresentationType > FixedImageInterpolatorType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
Superclass::FixedImageMaskType FixedImageMaskType
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
Superclass::GradientImagePointer GradientImagePointer


Generated on 06-12-2013 for elastix by doxygen 1.8.5 elastix logo