00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkThreadedImageAlgorithm_h
00028 #define __vtkThreadedImageAlgorithm_h
00029
00030 #include "vtkImageAlgorithm.h"
00031
00032 class vtkImageData;
00033 class vtkMultiThreader;
00034
00035 class VTK_FILTERING_EXPORT vtkThreadedImageAlgorithm : public vtkImageAlgorithm
00036 {
00037 public:
00038 vtkTypeMacro(vtkThreadedImageAlgorithm,vtkImageAlgorithm);
00039 void PrintSelf(ostream& os, vtkIndent indent);
00040
00042
00046 virtual void ThreadedRequestData(vtkInformation *request,
00047 vtkInformationVector **inputVector,
00048 vtkInformationVector *outputVector,
00049 vtkImageData ***inData,
00050 vtkImageData **outData,
00051 int extent[6], int threadId);
00053
00054
00055 virtual void ThreadedExecute(vtkImageData *inData,
00056 vtkImageData *outData,
00057 int extent[6], int threadId);
00058
00060
00061 vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00062 vtkGetMacro( NumberOfThreads, int );
00064
00066
00067 virtual int SplitExtent(int splitExt[6], int startExt[6],
00068 int num, int total);
00070
00071 protected:
00072 vtkThreadedImageAlgorithm();
00073 ~vtkThreadedImageAlgorithm();
00074
00075 vtkMultiThreader *Threader;
00076 int NumberOfThreads;
00077
00079
00081 virtual int RequestData(vtkInformation* request,
00082 vtkInformationVector** inputVector,
00083 vtkInformationVector* outputVector);
00085
00086 private:
00087 vtkThreadedImageAlgorithm(const vtkThreadedImageAlgorithm&);
00088 void operator=(const vtkThreadedImageAlgorithm&);
00089 };
00090
00091 #endif
00092
00093
00094
00095
00096
00097
00098