Orfeo Toolbox  4.0
itkLevelSetMotionRegistrationFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkLevelSetMotionRegistrationFunction_h
19 #define __itkLevelSetMotionRegistrationFunction_h
20 
22 #include "itkPoint.h"
23 #include "itkCovariantVector.h"
26 
27 namespace itk
28 {
53 template< typename TFixedImage, typename TMovingImage, typename TDisplacementField >
55  public PDEDeformableRegistrationFunction< TFixedImage,
56  TMovingImage,
57  TDisplacementField >
58 {
59 public:
62  typedef PDEDeformableRegistrationFunction< TFixedImage,
63  TMovingImage, TDisplacementField
65 
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
96 
98  typedef typename Superclass::PixelType PixelType;
103 
105  typedef double CoordRepType;
111 
116 
122 
125  { m_MovingImageInterpolator = ptr; }
126 
129  { return m_MovingImageInterpolator; }
130 
133  virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const;
134 
137  virtual void * GetGlobalDataPointer() const
138  {
139  GlobalDataStruct *global = new GlobalDataStruct();
140 
141  global->m_SumOfSquaredDifference = 0.0;
142  global->m_NumberOfPixelsProcessed = 0L;
143  global->m_SumOfSquaredChange = 0;
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 
179  virtual double GetAlpha() const;
180 
185  virtual void SetIntensityDifferenceThreshold(double);
186 
187  virtual double GetIntensityDifferenceThreshold() const;
188 
191  virtual void SetGradientMagnitudeThreshold(double);
192 
193  virtual double GetGradientMagnitudeThreshold() const;
194 
197  virtual void SetGradientSmoothingStandardDeviations(double);
198 
199  virtual double GetGradientSmoothingStandardDeviations() const;
200 
204  void SetUseImageSpacing(bool);
205 
206  bool GetUseImageSpacing() const;
207 
208 protected:
211  void PrintSelf(std::ostream & os, Indent indent) const;
212 
216 
223  double m_MaxL1Norm;
224  };
225 
226 private:
227  LevelSetMotionRegistrationFunction(const Self &); //purposely not implemented
228  void operator=(const Self &); //purposely not implemented
229 
233 
236 
240 
243  double m_Alpha;
244 
247 
250 
253 
257  mutable double m_Metric;
258  mutable double m_SumOfSquaredDifference;
260  mutable double m_RMSChange;
261  mutable double m_SumOfSquaredChange;
262 
265 
267 };
268 } // end namespace itk
269 
270 #ifndef ITK_MANUAL_INSTANTIATION
272 #endif
273 
274 #endif

Generated at Sat Mar 8 2014 15:09:11 for Orfeo Toolbox with doxygen 1.8.3.1