ITK  4.2.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< class TFixedImage, class TMovingImage, class TDisplacementField >
79  public PDEDeformableRegistrationFilter< TFixedImage, TMovingImage,
80  TDisplacementField >
81 {
82 public:
88 
90  itkNewMacro(Self);
91 
94 
96  typedef typename Superclass::FixedImageType FixedImageType;
97  typedef typename Superclass::FixedImagePointer FixedImagePointer;
98 
100  typedef typename Superclass::MovingImageType MovingImageType;
101  typedef typename Superclass::MovingImagePointer MovingImagePointer;
102 
104  typedef typename Superclass::DisplacementFieldType DisplacementFieldType;
105  typedef typename Superclass::DisplacementFieldPointer DisplacementFieldPointer;
106 #ifdef ITKV3_COMPATIBILITY
107  typedef typename Superclass::DeformationFieldType DeformationFieldType;
108  typedef typename Superclass::DeformationFieldPointer DeformationFieldPointer;
109 #endif
110 
112  typedef typename Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType;
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;
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:
162  void PrintSelf(std::ostream & os, Indent indent) const;
163 
165  virtual void InitializeIteration();
166 
169  virtual void AllocateUpdateBuffer();
170 
172  virtual void ApplyUpdate(const TimeStepType& dt);
173 
174 private:
175  DiffeomorphicDemonsRegistrationFilter(const Self &); //purposely not
176  // implemented
177  void operator=(const Self &); //purposely not
178 
179  // implemented
180 
183  DemonsRegistrationFunctionType * DownCastDifferenceFunctionType();
184 
185  const DemonsRegistrationFunctionType * DownCastDifferenceFunctionType() const;
186 
188  typedef MultiplyImageFilter< DisplacementFieldType,
191 
194 
195  typedef WarpVectorImageFilter<
198 
201 
202  typedef AddImageFilter<
205 
212 
218 };
219 } // end namespace itk
220 
221 #ifndef ITK_MANUAL_INSTANTIATION
222 #include "itkDiffeomorphicDemonsRegistrationFilter.hxx"
223 #endif
224 
225 #endif
226