ITK  4.8.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 
94 
98 
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() {}
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 
166  itk::Image<TimeStepType, ImageDimension>,
167  DisplacementFieldType > MultiplyByConstantType;
168 
170  DisplacementFieldType,
171  DisplacementFieldType, DisplacementFieldType > AdderType;
172 
173  typedef typename MultiplyByConstantType::Pointer MultiplyByConstantPointer;
174  typedef typename AdderType::Pointer AdderPointer;
175 
176 private:
177  FastSymmetricForcesDemonsRegistrationFilter(const Self &); //purposely not
178  // implemented
179  void operator=(const Self &); //purposely not
180 
181  // implemented
182 
186 
187  const DemonsRegistrationFunctionType * DownCastDifferenceFunctionType() const;
188 
189  MultiplyByConstantPointer m_Multiplier;
190  AdderPointer m_Adder;
191 };
192 } // end namespace itk
193 
194 #ifndef ITK_MANUAL_INSTANTIATION
195 #include "itkFastSymmetricForcesDemonsRegistrationFilter.hxx"
196 #endif
197 
198 #endif
Pixel-wise addition of two images.
Light weight base class for most itk classes.
virtual void SetUseGradientType(GradientType gtype)
virtual void ApplyUpdate(const TimeStepType &dt) override
Deformably register two images using a symmetric forces demons algorithm.
virtual const double & GetRMSChange() const override
virtual GradientType GetUseGradientType() const
Deformably register two images using a PDE algorithm.
DemonsRegistrationFunctionType * DownCastDifferenceFunctionType()
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Pixel-wise multiplication of two images.
void PrintSelf(std::ostream &os, Indent indent) const override
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
PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField > Superclass