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: 2003/09/10 14:29:07 $ 00007 Version: $Revision: 1.22 $ 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 __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 ITK_EXPORT FiniteDifferenceImageFilter 00123 : public ImageToImageFilter<TInputImage, TOutputImage> 00124 { 00125 public: 00127 typedef FiniteDifferenceImageFilter Self; 00128 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass; 00129 typedef SmartPointer<Self> Pointer; 00130 typedef SmartPointer<const Self> ConstPointer; 00131 00133 itkTypeMacro(FiniteDifferenceImageFilter, ImageToImageFilter ); 00134 00136 typedef TInputImage InputImageType; 00137 typedef TOutputImage OutputImageType; 00138 00140 itkStaticConstMacro(ImageDimension, unsigned int, 00141 OutputImageType::ImageDimension); 00142 00144 typedef typename TOutputImage::PixelType PixelType; 00145 00149 typedef FiniteDifferenceFunction<TOutputImage> FiniteDifferenceFunctionType; 00150 typedef typename FiniteDifferenceFunctionType::TimeStepType TimeStepType; 00151 00153 itkGetConstMacro(ElapsedIterations, unsigned int); 00154 00158 itkGetConstReferenceObjectMacro(DifferenceFunction, 00159 FiniteDifferenceFunctionType ); 00160 00164 itkSetObjectMacro(DifferenceFunction, FiniteDifferenceFunctionType ); 00165 00166 protected: 00167 FiniteDifferenceImageFilter() : m_ElapsedIterations(0) {m_DifferenceFunction = 0;} 00168 ~FiniteDifferenceImageFilter() {} 00169 void PrintSelf(std::ostream& os, Indent indent) const; 00170 00172 virtual void AllocateUpdateBuffer() = 0; 00173 00177 virtual void ApplyUpdate(TimeStepType dt) = 0; 00178 00184 virtual TimeStepType CalculateChange() = 0; 00185 00189 virtual void CopyInputToOutput() = 0; 00190 00194 virtual void GenerateData(); 00195 00207 virtual void GenerateInputRequestedRegion(); 00208 00211 virtual bool Halt() = 0; 00217 virtual void Initialize() { }; 00218 00225 virtual void InitializeIteration() 00226 { m_DifferenceFunction->InitializeIteration(); } 00227 00241 virtual TimeStepType ResolveTimeStep(const TimeStepType* timeStepList, 00242 const bool* valid,int size); 00243 00245 itkSetMacro(ElapsedIterations, unsigned int); 00246 00249 virtual void PostProcessOutput() {} 00250 00251 private: 00252 FiniteDifferenceImageFilter(const Self&); //purposely not implemented 00253 void operator=(const Self&); //purposely not implemented 00254 00257 unsigned int m_ElapsedIterations; 00258 00260 typename FiniteDifferenceFunctionType::Pointer m_DifferenceFunction; 00261 }; 00262 00263 }// end namespace itk 00264 00265 #ifndef ITK_MANUAL_INSTANTIATION 00266 #include "itkFiniteDifferenceImageFilter.txx" 00267 #endif 00268 00269 #endif 00270

Generated at Sat Mar 31 02:18:32 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000