ITK  5.0.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< typename TFixedImage, typename TMovingImage, typename TDisplacementField >
53  public VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_ASSIGN(VariationalRegistrationSSDFunction);
57 
63 
65  itkNewMacro(Self);
66 
69 
71  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
72 
76 
80 
84 
88  using SpacingType = typename FixedImageType::SpacingType;
89 
94 
96  using PixelType = typename Superclass::PixelType;
100 
104 
106  void InitializeIteration() override;
107 
111  const NeighborhoodType &neighborhood,
112  void *globalData,
113  const FloatOffsetType &offset = FloatOffsetType( 0.0 ) ) override;
114 
118 
122 
127 
132  virtual void SetIntensityDifferenceThreshold( const double threshold )
133  { m_IntensityDifferenceThreshold = threshold; }
134 
139  virtual double GetIntensityDifferenceThreshold() const
141 
145  typename Superclass::TimeStepType ComputeGlobalTimeStep(void * itkNotUsed(GlobalData)) const override
146  { return this->GetTimeStep() * m_Normalizer; }
147 
148 protected:
151 
152  using GlobalDataStruct = typename Superclass::GlobalDataStruct;
153 
155  void PrintSelf(std::ostream& os, Indent indent) const override;
156 
162  };
163 
164 private:
167 
170 
173 
176 
178  double m_Normalizer;
179 
182 };
183 
184 } // end namespace itk
185 
186 #ifndef ITK_MANUAL_INSTANTIATION
187 #include "itkVariationalRegistrationSSDFunction.hxx"
188 #endif
189 
190 #endif
Base class for force calculation in the variational registration framework.
Light weight base class for most itk classes.
typename Superclass::NeighborhoodType NeighborhoodType
typename MaskImageType::ConstPointer MaskImagePointer
typename DisplacementFieldType::ConstPointer DisplacementFieldTypePointer
Superclass::DisplacementFieldTypePointer DisplacementFieldTypePointer
Calculate the derivative by central differencing.
Image< MaskImagePixelType, ImageDimension > MaskImageType
typename ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
virtual const TimeStepType GetTimeStep(void) const
typename GradientCalculatorType::Pointer GradientCalculatorPointer
PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
void PrintSelf(std::ostream &os, Indent indent) const override
This class computes SSD forces in the variational registration framework.
typename FixedImageType::ConstPointer FixedImagePointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename MovingImageType::ConstPointer MovingImagePointer
Superclass::TimeStepType ComputeGlobalTimeStep(void *) const override
ConstNeighborhoodIterator< TDisplacementField, DefaultBoundaryConditionType > NeighborhoodType
Templated n-dimensional image class.
Definition: itkImage.h:75
virtual void SetIntensityDifferenceThreshold(const double threshold)