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

itkFiniteDifferenceImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkFiniteDifferenceImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:12 $
00007   Version:   $Revision: 1.16 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkFiniteDifferenceImageFilter_h_
00018 #define __itkFiniteDifferenceImageFilter_h_
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkFiniteDifferenceFunction.h"
00022 
00023 namespace itk {
00024 
00121 template <class TInputImage, class TOutputImage>
00122 class FiniteDifferenceImageFilter  
00123   : public ImageToImageFilter<TInputImage, TOutputImage>
00124 {
00125 public:
00127   typedef FiniteDifferenceImageFilter Self;
00128   typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00129   
00131   itkTypeMacro(FiniteDifferenceImageFilter, ImageToImageFilter );
00132   
00134   typedef TInputImage  InputImageType;
00135   typedef TOutputImage OutputImageType;
00136   
00138   itkStaticConstMacro(ImageDimension, unsigned int,
00139                       OutputImageType::ImageDimension);
00140 
00142   typedef typename TOutputImage::PixelType PixelType;
00143 
00147   typedef FiniteDifferenceFunction<TOutputImage> FiniteDifferenceFunctionType;
00148   typedef typename FiniteDifferenceFunctionType::TimeStepType TimeStepType;
00149     
00151   itkGetConstMacro(ElapsedIterations, unsigned int);
00152 
00156   itkGetConstReferenceObjectMacro(DifferenceFunction,
00157                                   FiniteDifferenceFunctionType );
00158 
00162   itkSetObjectMacro(DifferenceFunction, FiniteDifferenceFunctionType );
00163 
00164 protected:
00165   FiniteDifferenceImageFilter() : m_ElapsedIterations(0) {}
00166   ~FiniteDifferenceImageFilter() {}
00167   void PrintSelf(std::ostream& os, Indent indent) const;
00168 
00170   virtual void AllocateUpdateBuffer() = 0;
00171 
00175   virtual void ApplyUpdate(TimeStepType dt) = 0;
00176   
00182   virtual TimeStepType CalculateChange() = 0;
00183 
00187   virtual void CopyInputToOutput();
00188   
00192   virtual void GenerateData();
00193 
00205   virtual void GenerateInputRequestedRegion();
00206   
00209   virtual bool Halt() = 0;
00215   virtual void Initialize() { };
00216 
00223   virtual void InitializeIteration()
00224     { m_DifferenceFunction->InitializeIteration(); }
00225   
00239   virtual TimeStepType ResolveTimeStep(const TimeStepType* list, const bool* valid,
00240                                     int size);
00241 
00243   itkSetMacro(ElapsedIterations, unsigned int);
00244 
00247   virtual void PostProcessOutput() {}
00248   
00249 private:
00250   FiniteDifferenceImageFilter(const Self&); //purposely not implemented
00251   void operator=(const Self&); //purposely not implemented
00252 
00255   unsigned int m_ElapsedIterations;
00256 
00258   typename FiniteDifferenceFunctionType::Pointer m_DifferenceFunction;
00259 };
00260   
00261 }// end namespace itk
00262 
00263 #ifndef ITK_MANUAL_INSTANTIATION
00264 #include "itkFiniteDifferenceImageFilter.txx"
00265 #endif
00266 
00267 #endif
00268 

Generated at Wed Mar 12 01:12:57 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000