NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkJacobianGradientSimilarityMeasure.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkJacobianGradientSimilarityMeasure_h
16 #define itkJacobianGradientSimilarityMeasure_h
17 
18 #include "itkSimilarityMeasure.h"
19 
20 
21 namespace itk
22 {
34 template < typename TFixedImage, typename TMovingImage >
36  public SimilarityMeasure< TFixedImage, TMovingImage>
37 {
38 public:
39 
43  typedef SmartPointer<Self> Pointer;
44  typedef SmartPointer<const Self> ConstPointer;
45 
48 
50  typedef typename Superclass::MovingImageType MovingImageType;
51  typedef typename Superclass::FixedImageType FixedImageType;
52  typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
53  typedef typename Superclass::GradientImageType GradientImageType;
54  typedef typename Superclass::GradientPixelType GradientPixelType;
55  typedef typename Superclass::DerivativeType DerivativeType;
58  typedef typename Superclass::RealType RealType;
59  typedef typename Superclass::MeasureType MeasureType;
60  typedef typename Superclass::TransformParametersType TransformParametersType;
61  typedef typename Superclass::TransformJacobianType TransformJacobianType;
62 
64  void GetCostFunctionDerivative( const TransformParametersType & parameters, DerivativeType & derivative ) const;
65 
66 protected:
67 
70  void PrintSelf(std::ostream& os, Indent indent) const;
71 
75  virtual void ResetDerivativeComputations() {};
76 
80  virtual void ComputeDerivativeValue(
81  DerivativeType & derivative, // The array of derivatives, one per parameter
82  const GradientPixelType & gradientPixel, // The gradient at the moving image pixel
83  const TransformJacobianType & jacobianType, // The jacobian at that moving image pixel
84  unsigned int imageDimensions, // The number of dimensions (ie. 2D or 3D)
85  unsigned int parameterNumber, // Which parameter are we operating on?
86  RealType fixedValue, // The fixed image value
87  RealType movingValue) { } // The moving image value
88 
92  virtual void FinalizeDerivative(DerivativeType & derivative) {};
93 
94 private:
95 
96  JacobianGradientSimilarityMeasure(const Self&); // purposefully not implemented
97  void operator=(const Self&); // purposefully not implemented
98 
99 };
100 
101 } // end namespace itk
102 
103 #ifndef ITK_MANUAL_INSTANTIATION
104 #include "itkJacobianGradientSimilarityMeasure.txx"
105 #endif
106 
107 #endif
108 
109 
110 
SmartPointer< Self > Pointer
Definition: itkJacobianGradientSimilarityMeasure.h:43
Superclass::GradientImageType GradientImageType
Definition: itkJacobianGradientSimilarityMeasure.h:53
Abstract base class, implementing TemplateMethod [2] for similarity measures.
Definition: itkSimilarityMeasure.h:56
Superclass::FixedImageType FixedImageType
Definition: itkJacobianGradientSimilarityMeasure.h:51
Superclass::GradientPixelType GradientPixelType
Definition: itkJacobianGradientSimilarityMeasure.h:54
virtual ~JacobianGradientSimilarityMeasure()
Definition: itkJacobianGradientSimilarityMeasure.h:69
JacobianGradientSimilarityMeasure Self
Definition: itkJacobianGradientSimilarityMeasure.h:41
Definition: niftkITKAffineResampleImage.cxx:74
itk::Point< double, 2 > InputPointType
Definition: EulerAffine2DJacobianTest.cxx:34
Superclass::OutputPointType OutputPointType
Definition: itkJacobianGradientSimilarityMeasure.h:57
Superclass::MeasureType MeasureType
Definition: itkJacobianGradientSimilarityMeasure.h:59
Superclass::InputPointType InputPointType
Definition: itkJacobianGradientSimilarityMeasure.h:56
virtual void FinalizeDerivative(DerivativeType &derivative)
Definition: itkJacobianGradientSimilarityMeasure.h:92
Superclass::MovingImageType MovingImageType
Definition: itkJacobianGradientSimilarityMeasure.h:47
virtual void ResetDerivativeComputations()
Definition: itkJacobianGradientSimilarityMeasure.h:75
SmartPointer< const Self > ConstPointer
Definition: itkJacobianGradientSimilarityMeasure.h:44
Superclass::DerivativeType DerivativeType
Definition: itkJacobianGradientSimilarityMeasure.h:55
Superclass::TransformParametersType TransformParametersType
Definition: itkJacobianGradientSimilarityMeasure.h:60
Superclass::TransformJacobianType TransformJacobianType
Definition: itkJacobianGradientSimilarityMeasure.h:61
virtual void ComputeDerivativeValue(DerivativeType &derivative, const GradientPixelType &gradientPixel, const TransformJacobianType &jacobianType, unsigned int imageDimensions, unsigned int parameterNumber, RealType fixedValue, RealType movingValue)
Definition: itkJacobianGradientSimilarityMeasure.h:80
Superclass::FixedImageConstPointer FixedImageConstPointer
Definition: itkJacobianGradientSimilarityMeasure.h:52
SimilarityMeasure< TFixedImage, TMovingImage > Superclass
Definition: itkJacobianGradientSimilarityMeasure.h:42
itk::Point< double, 2 > OutputPointType
Definition: EulerAffine2DJacobianTest.cxx:35
AbstractBase class, just to implement a gradient method based on Jacobian.
Definition: itkJacobianGradientSimilarityMeasure.h:35
Superclass::RealType RealType
Definition: itkJacobianGradientSimilarityMeasure.h:58