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

itkDenseFiniteDifferenceImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkDenseFiniteDifferenceImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:05 $ 00007 Version: $Revision: 1.15 $ 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 __itkDenseFiniteDifferenceImageFilter_h_ 00018 #define __itkDenseFiniteDifferenceImageFilter_h_ 00019 00020 #include "itkFiniteDifferenceImageFilter.h" 00021 #include "itkMultiThreader.h" 00022 00023 namespace itk { 00024 00065 template <class TInputImage, class TOutputImage> 00066 class ITK_EXPORT DenseFiniteDifferenceImageFilter 00067 : public FiniteDifferenceImageFilter<TInputImage, TOutputImage> 00068 { 00069 public: 00071 typedef DenseFiniteDifferenceImageFilter Self; 00072 typedef FiniteDifferenceImageFilter<TInputImage, TOutputImage> Superclass; 00073 typedef SmartPointer<Self> Pointer; 00074 typedef SmartPointer<const Self> ConstPointer; 00075 00077 itkTypeMacro(DenseFiniteDifferenceImageFilter, ImageToImageFilter ); 00078 00080 typedef typename Superclass::InputImageType InputImageType; 00081 typedef typename Superclass::OutputImageType OutputImageType; 00082 typedef typename Superclass::FiniteDifferenceFunctionType 00083 FiniteDifferenceFunctionType; 00084 00087 itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension); 00088 00091 typedef typename Superclass::PixelType PixelType; 00092 00094 typedef typename Superclass::TimeStepType TimeStepType; 00095 00097 typedef OutputImageType UpdateBufferType; 00098 00099 protected: 00100 DenseFiniteDifferenceImageFilter() 00101 { m_UpdateBuffer = UpdateBufferType::New(); } 00102 ~DenseFiniteDifferenceImageFilter() {} 00103 void PrintSelf(std::ostream& os, Indent indent) const; 00104 00108 virtual void CopyInputToOutput(); 00109 00110 private: 00111 DenseFiniteDifferenceImageFilter(const Self&); //purposely not implemented 00112 void operator=(const Self&); //purposely not implemented 00113 00116 struct DenseFDThreadStruct 00117 { 00118 DenseFiniteDifferenceImageFilter *Filter; 00119 TimeStepType TimeStep; 00120 TimeStepType *TimeStepList; 00121 bool *ValidTimeStepList; 00122 }; 00123 00125 typedef typename UpdateBufferType::RegionType ThreadRegionType; 00126 00129 virtual void AllocateUpdateBuffer(); 00130 00134 virtual void ApplyUpdate(TimeStepType dt); 00135 00138 static ITK_THREAD_RETURN_TYPE ApplyUpdateThreaderCallback( void *arg ); 00139 00143 virtual TimeStepType CalculateChange(); 00144 00147 static ITK_THREAD_RETURN_TYPE CalculateChangeThreaderCallback( void *arg ); 00148 00155 // virtual 00156 // int SplitUpdateContainer(int i, int num, ThreadRegionType& splitRegion); 00157 00162 virtual 00163 void ThreadedApplyUpdate(TimeStepType dt, 00164 const ThreadRegionType &regionToProcess, 00165 int threadId); 00166 // FOR ALL: iterator(output, splitRegion), iterator(update, splitRegion) 00167 00172 virtual 00173 TimeStepType ThreadedCalculateChange(const ThreadRegionType &regionToProcess, 00174 int threadId); 00175 // FOR ALL : iterator(input, splitRegion), iterator(update, splitRegion) 00176 00178 typename UpdateBufferType::Pointer m_UpdateBuffer; 00179 }; 00180 00181 00182 }// end namespace itk 00183 00184 #ifndef ITK_MANUAL_INSTANTIATION 00185 #include "itkDenseFiniteDifferenceImageFilter.txx" 00186 #endif 00187 00188 #endif

Generated at Sun Apr 1 02:26:59 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000