Orfeo Toolbox  3.16
itkLevelSetMotionRegistrationFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkLevelSetMotionRegistrationFunction.h,v $
5  Language: C++
6  Date: $Date: 2009-10-20 20:39:08 $
7  Version: $Revision: 1.5 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkLevelSetMotionRegistrationFunction_h
18 #define __itkLevelSetMotionRegistrationFunction_h
19 
21 #include "itkPoint.h"
22 #include "itkVector.h"
23 #include "itkCovariantVector.h"
27 
28 namespace itk {
29 
53 template<class TFixedImage, class TMovingImage, class TDeformationField>
55  public PDEDeformableRegistrationFunction< TFixedImage,
56  TMovingImage,
57 TDeformationField>
58 {
59 public:
62  typedef PDEDeformableRegistrationFunction< TFixedImage,
63  TMovingImage, TDeformationField
64  >
68 
70  itkNewMacro(Self);
71 
75 
79  typedef typename MovingImageType::SpacingType MovingSpacingType;
80 
84  typedef typename FixedImageType::IndexType IndexType;
85  typedef typename FixedImageType::SizeType SizeType;
86  typedef typename FixedImageType::SpacingType SpacingType;
87 
92 
94  itkStaticConstMacro(ImageDimension, unsigned
95 int,Superclass::ImageDimension);
96 
98  typedef typename Superclass::PixelType PixelType;
103 
105  typedef double CoordRepType;
112 
117 
123 
125  void SetMovingImageInterpolator( InterpolatorType * ptr )
126  { m_MovingImageInterpolator = ptr; }
127 
129  InterpolatorType * GetMovingImageInterpolator(void)
130  { return m_MovingImageInterpolator; }
131 
134  virtual TimeStepType ComputeGlobalTimeStep(void * GlobalData) const;
135 
138  virtual void *GetGlobalDataPointer() const
139  {
140  GlobalDataStruct *global = new GlobalDataStruct();
141  global->m_SumOfSquaredDifference = 0.0;
142  global->m_NumberOfPixelsProcessed = 0L;
143  global->m_SumOfSquaredChange = 0;
144  global->m_MaxL1Norm = NumericTraits<double>::NonpositiveMin();
145  return global;
146  }
147 
149  virtual void ReleaseGlobalDataPointer( void *GlobalData ) const;
150 
152  virtual void InitializeIteration();
153 
156  virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
157  void *globalData,
158  const FloatOffsetType &offset =
159 FloatOffsetType(0.0));
160 
164  virtual double GetMetric() const
165  { return m_Metric; }
166 
168  virtual double GetRMSChange() const
169  { return m_RMSChange; }
170 
177  virtual void SetAlpha(double);
178  virtual double GetAlpha() const;
179 
184  virtual void SetIntensityDifferenceThreshold(double);
185  virtual double GetIntensityDifferenceThreshold() const;
186 
189  virtual void SetGradientMagnitudeThreshold(double);
190  virtual double GetGradientMagnitudeThreshold() const;
191 
194  virtual void SetGradientSmoothingStandardDeviations(double);
195  virtual double GetGradientSmoothingStandardDeviations() const;
196 
200  void SetUseImageSpacing( bool);
201  bool GetUseImageSpacing() const;
202 
203 
204 protected:
207  void PrintSelf(std::ostream& os, Indent indent) const;
208 
212 
216  {
220  double m_MaxL1Norm;
221  };
222 
223 private:
224  LevelSetMotionRegistrationFunction(const Self&); //purposely not implemented
225  void operator=(const Self&); //purposely not implemented
226 
230 
233 
237 
240  double m_Alpha;
241 
244 
247 
250 
254  mutable double m_Metric;
255  mutable double m_SumOfSquaredDifference;
256  mutable unsigned long m_NumberOfPixelsProcessed;
257  mutable double m_RMSChange;
258  mutable double m_SumOfSquaredChange;
259 
262 
264 };
265 
266 
267 } // end namespace itk
268 
269 #ifndef ITK_MANUAL_INSTANTIATION
271 #endif
272 
273 #endif

Generated at Sat Feb 2 2013 23:51:03 for Orfeo Toolbox with doxygen 1.8.1.1