ITK  4.13.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 
75 
79 
83 
87  typedef typename FixedImageType::SpacingType SpacingType;
88 
93 
95  typedef typename Superclass::PixelType PixelType;
99 
104 
106  virtual void InitializeIteration() ITK_OVERRIDE;
107 
110  virtual PixelType ComputeUpdate(
111  const NeighborhoodType &neighborhood,
112  void *globalData,
113  const FloatOffsetType &offset = FloatOffsetType( 0.0 ) ) ITK_OVERRIDE;
114 
118 
122 
127 
132  virtual void SetIntensityDifferenceThreshold( const double threshold )
133  { m_IntensityDifferenceThreshold = threshold; }
134 
139  virtual double GetIntensityDifferenceThreshold() const
141 
145  virtual typename Superclass::TimeStepType ComputeGlobalTimeStep(void * itkNotUsed(GlobalData)) const ITK_OVERRIDE
146  { return this->GetTimeStep() * m_Normalizer; }
147 
148 protected:
151 
152  typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
153 
155  void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
156 
162  };
163 
164 private:
165  VariationalRegistrationSSDFunction(const Self&); //purposely not implemented
166  void operator=(const Self&); //purposely not implemented
167 
170 
173 
176 
179 
181  double m_Normalizer;
182 
185 };
186 
187 } // end namespace itk
188 
189 #ifndef ITK_MANUAL_INSTANTIATION
190 #include "itkVariationalRegistrationSSDFunction.hxx"
191 #endif
192 
193 #endif
DisplacementFieldType::ConstPointer DisplacementFieldTypePointer
virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
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
virtual const TimeStepType GetTimeStep(void) const
Image< MaskImagePixelType, ImageDimension > MaskImageType
void PrintSelf(std::ostream &os, Indent indent) const override
This class computes SSD forces in the variational registration framework.
VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void InitializeIteration() override
CentralDifferenceImageFunction< FixedImageType > GradientCalculatorType
virtual Superclass::TimeStepType ComputeGlobalTimeStep(void *) const override
virtual void SetIntensityDifferenceThreshold(const double threshold)