VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/ExecutionModel/vtkThreadedImageAlgorithm.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkThreadedImageAlgorithm.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00027 #ifndef vtkThreadedImageAlgorithm_h
00028 #define vtkThreadedImageAlgorithm_h
00029 
00030 #include "vtkCommonExecutionModelModule.h" // For export macro
00031 #include "vtkImageAlgorithm.h"
00032 
00033 class vtkImageData;
00034 class vtkMultiThreader;
00035 
00036 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkThreadedImageAlgorithm : public vtkImageAlgorithm
00037 {
00038 public:
00039   vtkTypeMacro(vtkThreadedImageAlgorithm,vtkImageAlgorithm);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00043 
00047   virtual void ThreadedRequestData(vtkInformation *request,
00048                                    vtkInformationVector **inputVector,
00049                                    vtkInformationVector *outputVector,
00050                                    vtkImageData ***inData,
00051                                    vtkImageData **outData,
00052                                    int extent[6], int threadId);
00054 
00055   // also support the old signature
00056   virtual void ThreadedExecute(vtkImageData *inData,
00057                                vtkImageData *outData,
00058                                int extent[6], int threadId);
00059 
00061 
00062   vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00063   vtkGetMacro( NumberOfThreads, int );
00065 
00067 
00068   virtual int SplitExtent(int splitExt[6], int startExt[6],
00069                           int num, int total);
00071 
00072 protected:
00073   vtkThreadedImageAlgorithm();
00074   ~vtkThreadedImageAlgorithm();
00075 
00076   vtkMultiThreader *Threader;
00077   int NumberOfThreads;
00078 
00080 
00082   virtual int RequestData(vtkInformation* request,
00083                           vtkInformationVector** inputVector,
00084                           vtkInformationVector* outputVector);
00086 
00087 private:
00088   vtkThreadedImageAlgorithm(const vtkThreadedImageAlgorithm&);  // Not implemented.
00089   void operator=(const vtkThreadedImageAlgorithm&);  // Not implemented.
00090 };
00091 
00092 #endif
00093 
00094 
00095 
00096 
00097 
00098 
00099