ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkSymmetricForcesDemonsRegistrationFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkSymmetricForcesDemonsRegistrationFilter_h
00019 #define __itkSymmetricForcesDemonsRegistrationFilter_h
00020 
00021 #include "itkPDEDeformableRegistrationFilter.h"
00022 #include "itkSymmetricForcesDemonsRegistrationFunction.h"
00023 
00024 namespace itk
00025 {
00069 template< class TFixedImage, class TMovingImage, class TDisplacementField >
00070 class ITK_EXPORT SymmetricForcesDemonsRegistrationFilter:
00071   public PDEDeformableRegistrationFilter< TFixedImage, TMovingImage,
00072                                           TDisplacementField >
00073 {
00074 public:
00076   typedef SymmetricForcesDemonsRegistrationFilter                                         Self;
00077   typedef PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField > Superclass;
00078   typedef SmartPointer< Self >                                                            Pointer;
00079   typedef SmartPointer< const Self >                                                      ConstPointer;
00080 
00082   itkNewMacro(Self);
00083 
00085   itkTypeMacro(SymmetricForcesDemonsRegistrationFilter,
00086                PDEDeformableRegistrationFilter);
00087 
00089   typedef typename Superclass::FixedImageType    FixedImageType;
00090   typedef typename Superclass::FixedImagePointer FixedImagePointer;
00091 
00093   typedef typename Superclass::MovingImageType    MovingImageType;
00094   typedef typename Superclass::MovingImagePointer MovingImagePointer;
00095 
00097   typedef typename Superclass::DisplacementFieldType
00098   DisplacementFieldType;
00099   typedef typename Superclass::DisplacementFieldPointer
00100   DisplacementFieldPointer;
00101 
00103   typedef typename Superclass::FiniteDifferenceFunctionType
00104   FiniteDifferenceFunctionType;
00105 
00107   typedef typename FiniteDifferenceFunctionType::TimeStepType TimeStepType;
00108 
00110   typedef SymmetricForcesDemonsRegistrationFunction< FixedImageType, MovingImageType,
00111                                                      DisplacementFieldType >  DemonsRegistrationFunctionType;
00112 
00117   virtual double GetMetric() const;
00118 
00119   virtual const double & GetRMSChange() const;
00120 
00125   virtual void SetIntensityDifferenceThreshold(double);
00126 
00127   virtual double GetIntensityDifferenceThreshold() const;
00128 
00129 protected:
00130   SymmetricForcesDemonsRegistrationFilter();
00131   ~SymmetricForcesDemonsRegistrationFilter() {}
00132   void PrintSelf(std::ostream & os, Indent indent) const;
00133 
00135   virtual void InitializeIteration();
00136 
00138   virtual void ApplyUpdate(const TimeStepType& dt);
00139 
00140 private:
00141   SymmetricForcesDemonsRegistrationFilter(const Self &); //purposely not
00142                                                          // implemented
00143   void operator=(const Self &);                          //purposely not
00144 
00145   // implemented
00146 };
00147 } // end namespace itk
00148 
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkSymmetricForcesDemonsRegistrationFilter.hxx"
00151 #endif
00152 
00153 #endif
00154