ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkDiffeomorphicDemonsRegistrationFilter.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 itkDiffeomorphicDemonsRegistrationFilter_h
19 #define itkDiffeomorphicDemonsRegistrationFilter_h
20 
23 
24 #include "itkMultiplyImageFilter.h"
26 
27 namespace itk
28 {
77 template< typename TFixedImage, typename TMovingImage, typename TDisplacementField >
79  public PDEDeformableRegistrationFilter< TFixedImage, TMovingImage,
80  TDisplacementField >
81 {
82 public:
88 
90  itkNewMacro(Self);
91 
94 
98 
102 
106 #ifdef ITKV3_COMPATIBILITY
107  typedef typename Superclass::DeformationFieldType DeformationFieldType;
108  typedef typename Superclass::DeformationFieldPointer DeformationFieldPointer;
109 #endif
110 
113 
115  typedef typename FiniteDifferenceFunctionType::TimeStepType TimeStepType;
116 
121 
122  itkStaticConstMacro(
123  ImageDimension, unsigned int, FixedImageType::ImageDimension);
124 
129  virtual double GetMetric() const;
130 
131  virtual const double & GetRMSChange() const ITK_OVERRIDE;
132 
133  virtual void SetUseGradientType(GradientType gtype);
134 
135  virtual GradientType GetUseGradientType() const;
136 
140  itkSetMacro(UseFirstOrderExp, bool);
141  itkGetConstMacro(UseFirstOrderExp, bool);
142  itkBooleanMacro(UseFirstOrderExp);
144 
149  virtual void SetIntensityDifferenceThreshold(double);
150 
151  virtual double GetIntensityDifferenceThreshold() const;
152 
155  virtual void SetMaximumUpdateStepLength(double);
156 
157  virtual double GetMaximumUpdateStepLength() const;
158 
159 protected:
161  ~DiffeomorphicDemonsRegistrationFilter() {}
162  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
163 
165  virtual void InitializeIteration() ITK_OVERRIDE;
166 
169  virtual void AllocateUpdateBuffer() ITK_OVERRIDE;
170 
172  virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE;
173 
174 private:
175  DiffeomorphicDemonsRegistrationFilter(const Self &); //purposely not
176  // implemented
177  void operator=(const Self &); //purposely not
178 
179  // implemented
180 
184 
185  const DemonsRegistrationFunctionType * DownCastDifferenceFunctionType() const;
186 
190  DisplacementFieldType > MultiplyByConstantType;
191 
193  DisplacementFieldType, DisplacementFieldType > FieldExponentiatorType;
194 
196  DisplacementFieldType,
197  DisplacementFieldType, DisplacementFieldType > VectorWarperType;
198 
200  DisplacementFieldType, double > FieldInterpolatorType;
201 
203  DisplacementFieldType,
204  DisplacementFieldType, DisplacementFieldType > AdderType;
205 
206  typedef typename MultiplyByConstantType::Pointer MultiplyByConstantPointer;
207  typedef typename FieldExponentiatorType::Pointer FieldExponentiatorPointer;
208  typedef typename VectorWarperType::Pointer VectorWarperPointer;
209  typedef typename FieldInterpolatorType::Pointer FieldInterpolatorPointer;
210  typedef typename FieldInterpolatorType::OutputType FieldInterpolatorOutputType;
211  typedef typename AdderType::Pointer AdderPointer;
212 
213  MultiplyByConstantPointer m_Multiplier;
214  FieldExponentiatorPointer m_Exponentiator;
215  VectorWarperPointer m_Warper;
216  AdderPointer m_Adder;
218 };
219 } // end namespace itk
220 
221 #ifndef ITK_MANUAL_INSTANTIATION
222 #include "itkDiffeomorphicDemonsRegistrationFilter.hxx"
223 #endif
224 
225 #endif
DemonsRegistrationFunctionType::GradientType GradientType
Pixel-wise addition of two images.
Light weight base class for most itk classes.
virtual GradientType GetUseGradientType() const
virtual const double & GetRMSChange() const override
DemonsRegistrationFunctionType * DownCastDifferenceFunctionType()
virtual void ApplyUpdate(const TimeStepType &dt) override
virtual void SetIntensityDifferenceThreshold(double)
virtual double GetMaximumUpdateStepLength() const
Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
virtual void AllocateUpdateBuffer() override
virtual void SetUseGradientType(GradientType gtype)
Warps an image using an input displacement field.
Computes a diffeomorphic displacement field as the Lie group exponential of a vector field...
Deformably register two images using a diffeomorphic demons algorithm.
Deformably register two images using a PDE algorithm.
PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void InitializeIteration() override
Pixel-wise multiplication of two images.
ESMDemonsRegistrationFunction< FixedImageType, MovingImageType, DisplacementFieldType > DemonsRegistrationFunctionType
virtual void SetMaximumUpdateStepLength(double)
Templated n-dimensional image class.
Definition: itkImage.h:75
Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
typedef(Concept::MultiplyOperator< PixelType, double >) OutputTimesDoubleCheck
Fast implementation of the symmetric demons registration force.
virtual double GetIntensityDifferenceThreshold() const