ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkVariationalRegistrationSSDFunction.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 __itkVariationalRegistrationSSDFunction_h
19 #define __itkVariationalRegistrationSSDFunction_h
20 
22 
24 
25 namespace itk {
26 
51 template< class TFixedImage, class TMovingImage, class TDisplacementField >
53  public VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
54 {
55 public:
62 
64  itkNewMacro(Self);
65 
68 
70  itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
71 
73  typedef typename Superclass::MovingImageType MovingImageType;
74  typedef typename Superclass::MovingImagePointer MovingImagePointer;
75 
77  typedef typename Superclass::FixedImageType FixedImageType;
78  typedef typename Superclass::FixedImagePointer FixedImagePointer;
79 
81  typedef typename Superclass::MaskImageType MaskImageType;
82  typedef typename Superclass::MaskImagePointer MaskImagePointer;
83 
85  typedef typename FixedImageType::IndexType IndexType;
86  typedef typename FixedImageType::SizeType SizeType;
87  typedef typename FixedImageType::SpacingType SpacingType;
88 
90  typedef typename Superclass::DisplacementFieldType DisplacementFieldType;
91  typedef typename Superclass::DisplacementFieldTypePointer
93 
95  typedef typename Superclass::PixelType PixelType;
99 
104 
106  virtual void InitializeIteration();
107 
110  virtual PixelType ComputeUpdate(
111  const NeighborhoodType &neighborhood,
112  void *globalData,
113  const FloatOffsetType &offset = FloatOffsetType( 0.0 ) );
114 
117  { m_GradientType = GRADIENT_TYPE_FIXED; }
118 
121  { m_GradientType = GRADIENT_TYPE_WARPED; }
122 
126  { m_GradientType = GRADIENT_TYPE_SYMMETRIC; }
127 
132  virtual void SetIntensityDifferenceThreshold( const double threshold )
133  { m_IntensityDifferenceThreshold = threshold; }
134 
139  virtual double GetIntensityDifferenceThreshold() const
140  { return m_IntensityDifferenceThreshold; }
141 
145  virtual typename Superclass::TimeStepType ComputeGlobalTimeStep(void * gd ) const;
146 
147 protected:
150 
151  typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
152 
154  void PrintSelf(std::ostream& os, Indent indent) const;
155 
158  GRADIENT_TYPE_WARPED = 0,
159  GRADIENT_TYPE_FIXED = 1,
160  GRADIENT_TYPE_SYMMETRIC = 2
161  };
162 
163 private:
164  VariationalRegistrationSSDFunction(const Self&); //purposely not implemented
165  void operator=(const Self&); //purposely not implemented
166 
169 
172 
175 
178 
180  double m_Normalizer;
181 
184 };
185 
186 } // end namespace itk
187 
188 #ifndef ITK_MANUAL_INSTANTIATION
189 #include "itkVariationalRegistrationSSDFunction.hxx"
190 #endif
191 
192 #endif
Base class for force calculation in the variational registration framework.
Light weight base class for most itk classes.
Superclass::DisplacementFieldTypePointer DisplacementFieldTypePointer
ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
Calculate the derivative by central differencing.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
This class computes SSD forces in the variational registration framework.
VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
CentralDifferenceImageFunction< FixedImageType > GradientCalculatorType
virtual void SetIntensityDifferenceThreshold(const double threshold)