ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkVariationalRegistrationDemonsFunction.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 itkVariationalRegistrationDemonsFunction_h
19 #define itkVariationalRegistrationDemonsFunction_h
20 
23 
24 namespace itk {
25 
54 template< typename TFixedImage, typename TMovingImage, typename TDisplacementField >
56  public VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_ASSIGN(VariationalRegistrationDemonsFunction);
60 
64  TFixedImage,
65  TMovingImage,
66  TDisplacementField >;
69 
71  itkNewMacro(Self);
72 
75 
77  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
78 
82 
86 
90 
94  using SpacingType = typename FixedImageType::SpacingType;
95 
100 
105 
109 
111  void InitializeIteration() override;
112 
116  const NeighborhoodType &neighborhood,
117  void *globalData,
118  const FloatOffsetType &offset = FloatOffsetType( 0.0 ) ) override;
119 
123 
127 
132 
137  virtual void SetIntensityDifferenceThreshold( const double threshold )
138  { m_IntensityDifferenceThreshold = threshold; }
139 
144  virtual double GetIntensityDifferenceThreshold() const
146 
147 protected:
150 
152 
154  void PrintSelf(std::ostream& os, Indent indent) const override;
155 
161  };
162 
163 private:
166 
169 
172 
175 
178 
180  double m_Normalizer;
181 
184 };
185 
186 } // end namespace itk
187 
188 #ifndef ITK_MANUAL_INSTANTIATION
189 #include "itkVariationalRegistrationDemonsFunction.hxx"
190 #endif
191 
192 #endif
Base class for force calculation in the variational registration framework.
Light weight base class for most itk classes.
typename MaskImageType::ConstPointer MaskImagePointer
typename Superclass::DisplacementFieldType DisplacementFieldType
typename DisplacementFieldType::ConstPointer DisplacementFieldTypePointer
typename GradientCalculatorType::Pointer GradientCalculatorPointer
Calculate the derivative by central differencing.
Image< MaskImagePixelType, ImageDimension > MaskImageType
PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
Superclass::DisplacementFieldTypePointer DisplacementFieldTypePointer
typename FixedImageType::ConstPointer FixedImagePointer
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename MovingImageType::ConstPointer MovingImagePointer
ConstNeighborhoodIterator< TDisplacementField, DefaultBoundaryConditionType > NeighborhoodType
This class computes different Demon forces in the variational registration framework.