ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkSymmetricForcesDemonsRegistrationFunction.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 itkSymmetricForcesDemonsRegistrationFunction_h
19 #define itkSymmetricForcesDemonsRegistrationFunction_h
20 
22 #include "itkPoint.h"
25 
26 namespace itk
27 {
60 template< typename TFixedImage, typename TMovingImage, typename TDisplacementField >
62  public PDEDeformableRegistrationFunction< TFixedImage,
63  TMovingImage, TDisplacementField >
64 {
65 public:
66 
69  typedef PDEDeformableRegistrationFunction< TFixedImage,
70  TMovingImage, TDisplacementField >
74 
76  itkNewMacro(Self);
77 
81 
85 
89  typedef typename FixedImageType::IndexType IndexType;
90  typedef typename FixedImageType::SizeType SizeType;
91  typedef typename FixedImageType::SpacingType SpacingType;
92 
97 
99  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
100 
107 
109  typedef double CoordRepType;
114 
117 
121 
124  { m_MovingImageInterpolator = ptr; }
125 
128  { return m_MovingImageInterpolator; }
129 
131  virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE
132  { return m_TimeStep; }
133 
136  virtual void * GetGlobalDataPointer() const ITK_OVERRIDE
137  {
138  GlobalDataStruct *global = new GlobalDataStruct();
139 
140  global->m_SumOfSquaredDifference = 0.0;
141  global->m_NumberOfPixelsProcessed = 0L;
142  global->m_SumOfSquaredChange = 0;
143  return global;
144  }
145 
147  virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE;
148 
150  virtual void InitializeIteration() ITK_OVERRIDE;
151 
154  virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood,
155  void *globalData,
156  const FloatOffsetType & offset = FloatOffsetType(0.0) ) ITK_OVERRIDE;
157 
161  virtual double GetMetric() const
162  { return m_Metric; }
163 
165  virtual const double & GetRMSChange() const
166  { return m_RMSChange; }
167 
172  virtual void SetIntensityDifferenceThreshold(double);
173 
174  virtual double GetIntensityDifferenceThreshold() const;
175 
176 protected:
179  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
180 
183 
190  };
191 
192 private:
193  SymmetricForcesDemonsRegistrationFunction(const Self &) ITK_DELETE_FUNCTION;
194  void operator=(const Self &) ITK_DELETE_FUNCTION;
195 
199  double m_Normalizer;
200 
203 
206 
209 
212 
215 
219  mutable double m_Metric;
220  mutable double m_SumOfSquaredDifference;
222  mutable double m_RMSChange;
223  mutable double m_SumOfSquaredChange;
224 
227 };
228 } // end namespace itk
229 
230 #ifndef ITK_MANUAL_INSTANTIATION
231 #include "itkSymmetricForcesDemonsRegistrationFunction.hxx"
232 #endif
233 
234 #endif
Critical section locking class that can be allocated on the stack.
Light weight base class for most itk classes.
CovariantVector< double, itkGetStaticConstMacro(ImageDimension) > CovariantVectorType
ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
Calculate the derivative by central differencing.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
unsigned long SizeValueType
Definition: itkIntTypes.h:143
void PrintSelf(std::ostream &os, Indent indent) const override
InterpolateImageFunction< MovingImageType, CoordRepType > InterpolatorType
CentralDifferenceImageFunction< FixedImageType > GradientCalculatorType
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
LinearInterpolateImageFunction< MovingImageType, CoordRepType > DefaultInterpolatorType
virtual double GetIntensityDifferenceThreshold() const
Linearly interpolate an image at specified positions.
PDEDeformableRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > Superclass
Base class for all image interpolaters.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType
virtual void ReleaseGlobalDataPointer(void *GlobalData) const override
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52
A templated class holding a n-Dimensional covariant vector.