Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkFastSymmetricForcesDemonsRegistrationFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkFastSymmetricForcesDemonsRegistrationFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-12-06 13:28:10 $
00007   Version:   $Revision: 1.3 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __itkFastSymmetricForcesDemonsRegistrationFilter_h
00019 #define __itkFastSymmetricForcesDemonsRegistrationFilter_h
00020 
00021 #include "itkPDEDeformableRegistrationFilter.h"
00022 #include "itkESMDemonsRegistrationFunction.h"
00023 
00024 #include "itkMultiplyByConstantImageFilter.h"
00025 #include "itkExponentialDeformationFieldImageFilter.h"
00026 #include "itkWarpVectorImageFilter.h"
00027 #include "itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h"
00028 #include "itkAddImageFilter.h"
00029 
00030 namespace itk {
00031 
00074 template<class TFixedImage, class TMovingImage, class TDeformationField>
00075 class ITK_EXPORT FastSymmetricForcesDemonsRegistrationFilter : 
00076     public PDEDeformableRegistrationFilter< TFixedImage, TMovingImage,
00077                                             TDeformationField>
00078 {
00079 public:
00081   typedef FastSymmetricForcesDemonsRegistrationFilter     Self;
00082   typedef PDEDeformableRegistrationFilter<
00083     TFixedImage, TMovingImage,TDeformationField>          Superclass;
00084   typedef SmartPointer<Self>                              Pointer;
00085   typedef SmartPointer<const Self>                        ConstPointer;
00086 
00088   itkNewMacro(Self);
00089 
00091   itkTypeMacro( FastSymmetricForcesDemonsRegistrationFilter, 
00092                 PDEDeformableRegistrationFilter );
00093 
00095   typedef typename Superclass::FixedImageType             FixedImageType;
00096   typedef typename Superclass::FixedImagePointer          FixedImagePointer;
00097 
00099   typedef typename Superclass::MovingImageType            MovingImageType;
00100   typedef typename Superclass::MovingImagePointer         MovingImagePointer;
00101 
00103   typedef typename Superclass::DeformationFieldType       DeformationFieldType;
00104   typedef typename Superclass::DeformationFieldPointer    DeformationFieldPointer;
00105 
00110   virtual double GetMetric() const;
00111   virtual const double &GetRMSChange() const;
00113 
00119   typedef ESMDemonsRegistrationFunction<
00120     FixedImageType, 
00121     MovingImageType, DeformationFieldType>                DemonsRegistrationFunctionType;
00122 
00123   typedef typename DemonsRegistrationFunctionType::GradientType GradientType;
00124   virtual void SetUseGradientType( GradientType gtype );
00125   virtual GradientType GetUseGradientType() const;
00126 
00131   virtual void SetIntensityDifferenceThreshold(double);
00132   virtual double GetIntensityDifferenceThreshold() const;
00134 
00135   virtual void SetMaximumUpdateStepLength(double);
00136   virtual double GetMaximumUpdateStepLength() const;
00137 
00138 protected:
00139   FastSymmetricForcesDemonsRegistrationFilter();
00140   ~FastSymmetricForcesDemonsRegistrationFilter() {}
00141   void PrintSelf(std::ostream& os, Indent indent) const;
00142 
00144   virtual void InitializeIteration();
00145 
00148   virtual void AllocateUpdateBuffer();
00149 
00151   typedef typename 
00152     Superclass::FiniteDifferenceFunctionType              FiniteDifferenceFunctionType;
00153 
00155   typedef typename 
00156     FiniteDifferenceFunctionType::TimeStepType            TimeStepType;
00157 
00159   virtual void ApplyUpdate(TimeStepType dt);
00160 
00162   typedef MultiplyByConstantImageFilter<
00163     DeformationFieldType, 
00164     TimeStepType, DeformationFieldType >                  MultiplyByConstantType;
00165 
00166   typedef AddImageFilter<
00167      DeformationFieldType, 
00168      DeformationFieldType, DeformationFieldType>          AdderType;
00169 
00170 
00171   typedef typename MultiplyByConstantType::Pointer        MultiplyByConstantPointer;
00172   typedef typename AdderType::Pointer                     AdderPointer;
00173 
00174 
00175 private:
00176   FastSymmetricForcesDemonsRegistrationFilter(const Self&); //purposely not implemented
00177   void operator=(const Self&); //purposely not implemented
00178 
00181   DemonsRegistrationFunctionType *  DownCastDifferenceFunctionType();
00182   const DemonsRegistrationFunctionType *  DownCastDifferenceFunctionType() const;
00184 
00185   MultiplyByConstantPointer         m_Multiplier;
00186   AdderPointer                      m_Adder;
00187 };
00188 
00189 
00190 } // end namespace itk
00191 
00192 #ifndef ITK_MANUAL_INSTANTIATION
00193 #include "itkFastSymmetricForcesDemonsRegistrationFilter.txx"
00194 #endif
00195 
00196 #endif
00197 

Generated at Mon Jul 12 2010 18:18:03 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000