ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkFastSymmetricForcesDemonsRegistrationFilter.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 itkFastSymmetricForcesDemonsRegistrationFilter_h
19 #define itkFastSymmetricForcesDemonsRegistrationFilter_h
20 
23 
24 #include "itkMultiplyImageFilter.h"
26 
27 namespace itk
28 {
72 template< typename TFixedImage, typename TMovingImage, typename TDisplacementField >
74  public PDEDeformableRegistrationFilter< TFixedImage, TMovingImage,
75  TDisplacementField >
76 {
77 public:
83 
85  itkNewMacro(Self);
86 
90 
92  typedef typename Superclass::FixedImageType FixedImageType;
93  typedef typename Superclass::FixedImagePointer FixedImagePointer;
94 
96  typedef typename Superclass::MovingImageType MovingImageType;
97  typedef typename Superclass::MovingImagePointer MovingImagePointer;
98 
100  typedef typename Superclass::DisplacementFieldType DisplacementFieldType;
101  typedef typename Superclass::DisplacementFieldPointer DisplacementFieldPointer;
102 
103  itkStaticConstMacro(
104  ImageDimension, unsigned int, FixedImageType::ImageDimension);
105 
110  virtual double GetMetric() const;
111 
112  virtual const double & GetRMSChange() const ITK_OVERRIDE;
113 
122 
123  typedef typename DemonsRegistrationFunctionType::GradientType GradientType;
124  virtual void SetUseGradientType(GradientType gtype);
125 
126  virtual GradientType GetUseGradientType() const;
127 
132  virtual void SetIntensityDifferenceThreshold(double);
133 
134  virtual double GetIntensityDifferenceThreshold() const;
135 
136  virtual void SetMaximumUpdateStepLength(double);
137 
138  virtual double GetMaximumUpdateStepLength() const;
139 
140 protected:
142  ~FastSymmetricForcesDemonsRegistrationFilter() ITK_OVERRIDE {}
143  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
144 
146  virtual void InitializeIteration() ITK_OVERRIDE;
147 
150  virtual void AllocateUpdateBuffer() ITK_OVERRIDE;
151 
153  typedef typename
155 
157  typedef typename
158  FiniteDifferenceFunctionType::TimeStepType TimeStepType;
159 
161  virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE;
162 
164  typedef MultiplyImageFilter<
166  itk::Image<TimeStepType, ImageDimension>,
167  DisplacementFieldType > MultiplyByConstantType;
168 
169  typedef AddImageFilter<
170  DisplacementFieldType,
171  DisplacementFieldType, DisplacementFieldType > AdderType;
172 
173  typedef typename MultiplyByConstantType::Pointer MultiplyByConstantPointer;
174  typedef typename AdderType::Pointer AdderPointer;
175 
176 private:
177  ITK_DISALLOW_COPY_AND_ASSIGN(FastSymmetricForcesDemonsRegistrationFilter);
178 
181  DemonsRegistrationFunctionType * DownCastDifferenceFunctionType();
182 
183  const DemonsRegistrationFunctionType * DownCastDifferenceFunctionType() const;
184 
185  MultiplyByConstantPointer m_Multiplier;
186  AdderPointer m_Adder;
187 };
188 } // end namespace itk
189 
190 #ifndef ITK_MANUAL_INSTANTIATION
191 #include "itkFastSymmetricForcesDemonsRegistrationFilter.hxx"
192 #endif
193 
194 #endif
Pixel-wise addition of two images.
Light weight base class for most itk classes.
Deformably register two images using a symmetric forces demons algorithm.
Deformably register two images using a PDE algorithm.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Pixel-wise multiplication of two images.
Templated n-dimensional image class.
Definition: itkImage.h:75
Fast implementation of the symmetric demons registration force.
PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField > Superclass