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

itkPDEDeformableRegistrationFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPDEDeformableRegistrationFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005-03-12 01:46:56 $
00007   Version:   $Revision: 1.17 $
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 #ifndef _itkPDEDeformableRegistrationFunction_h_
00018 #define _itkPDEDeformableRegistrationFunction_h_
00019 
00020 #include "itkFiniteDifferenceFunction.h"
00021 
00022 namespace itk {
00023 
00038 template<class TFixedImage, class TMovingImage, class TDeformationField>
00039 class ITK_EXPORT PDEDeformableRegistrationFunction : 
00040   public FiniteDifferenceFunction<TDeformationField>
00041 {
00042 public:
00044   typedef PDEDeformableRegistrationFunction    Self;
00045   typedef FiniteDifferenceFunction<TDeformationField>    Superclass;
00046   typedef SmartPointer<Self> Pointer;
00047   typedef SmartPointer<const Self> ConstPointer;
00048 
00050   itkTypeMacro( PDEDeformableRegistrationFunction, 
00051     FiniteDifferenceFunction );
00052 
00054   typedef TMovingImage   MovingImageType;
00055   typedef typename MovingImageType::ConstPointer  MovingImagePointer;
00056 
00058   typedef TFixedImage    FixedImageType;
00059   typedef typename FixedImageType::ConstPointer  FixedImagePointer;
00060 
00062   typedef TDeformationField    DeformationFieldType;
00063   typedef typename DeformationFieldType::Pointer   
00064     DeformationFieldTypePointer;
00065 
00067   void SetMovingImage( const MovingImageType * ptr )
00068     { m_MovingImage = ptr; }
00069 
00071   const MovingImageType * GetMovingImage(void) const
00072     { return m_MovingImage; }
00073 
00075   void SetFixedImage( const FixedImageType * ptr )
00076     { m_FixedImage = ptr; }
00077 
00079   const FixedImageType * GetFixedImage(void) const
00080     { return m_FixedImage; }
00081 
00083   void SetDeformationField(  DeformationFieldTypePointer ptr )
00084     { m_DeformationField = ptr; }
00085 
00087   DeformationFieldTypePointer GetDeformationField(void)
00088     { return m_DeformationField; }
00089 
00090 
00091   void SetEnergy( double e) { m_Energy=e;}
00092   double GetEnergy( ) const { return m_Energy;}
00093   void SetGradientStep( double e) { m_GradientStep = e;}
00094   double GetGradientStep( ) const { return m_GradientStep ;}
00095   void SetNormalizeGradient( bool e) { m_NormalizeGradient=e;}
00096   bool GetNormalizeGradient( ) const { return m_NormalizeGradient;}
00097 
00098 protected:
00099   PDEDeformableRegistrationFunction()
00100     {
00101       m_MovingImage = NULL;
00102       m_FixedImage = NULL;
00103       m_DeformationField = NULL;
00104       m_Energy = 0.0;
00105       m_NormalizeGradient = true;
00106       m_GradientStep = 1.0;
00107     }
00108 
00109   ~PDEDeformableRegistrationFunction() {}
00110 
00111   void PrintSelf(std::ostream& os, Indent indent) const
00112   {
00113     Superclass::PrintSelf(os, indent);
00114     os << indent << "MovingImage: ";
00115     os << m_MovingImage.GetPointer() << std::endl;
00116     os << indent << "FixedImage: ";
00117     os << m_FixedImage.GetPointer() << std::endl;
00118 
00119   };
00120 
00122   MovingImagePointer                m_MovingImage;
00123 
00125   FixedImagePointer                   m_FixedImage;
00126 
00128   DeformationFieldTypePointer                   m_DeformationField;
00129 
00130   mutable double                  m_Energy;
00131   bool                            m_NormalizeGradient;
00132   mutable double                          m_GradientStep;
00133 private:
00134   PDEDeformableRegistrationFunction(const Self&); //purposely not implemented
00135   void operator=(const Self&); //purposely not implemented
00136   
00137 };
00138 
00139 
00140 } // end namespace itk
00141 
00142 
00143 #endif
00144 

Generated at Mon Apr 14 13:57:22 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000