ITK  4.2.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< class TFixedImage, class TMovingImage, class 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;
113 
122 
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:
143  void PrintSelf(std::ostream & os, Indent indent) const;
144 
146  virtual void InitializeIteration();
147 
150  virtual void AllocateUpdateBuffer();
151 
153  typedef typename
154  Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType;
155 
157  typedef typename
158  FiniteDifferenceFunctionType::TimeStepType TimeStepType;
159 
161  virtual void ApplyUpdate(const TimeStepType& dt);
162 
164  typedef MultiplyImageFilter<
168 
169  typedef AddImageFilter<
172 
175 private:
176  FastSymmetricForcesDemonsRegistrationFilter(const Self &); //purposely not
177  // implemented
178  void operator=(const Self &); //purposely not
179 
180  // implemented
181 
184  DemonsRegistrationFunctionType * DownCastDifferenceFunctionType();
185 
186  const DemonsRegistrationFunctionType * DownCastDifferenceFunctionType() const;
187 
190 };
191 } // end namespace itk
192 
193 #ifndef ITK_MANUAL_INSTANTIATION
194 #include "itkFastSymmetricForcesDemonsRegistrationFilter.hxx"
195 #endif
196 
197 #endif
198