Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkThreadedImageAlgorithm.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkThreadedImageAlgorithm.h,v $
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 "vtkImageAlgorithm.h"
00031 
00032 class vtkImageData;
00033 class vtkMultiThreader;
00034 
00035 class VTK_FILTERING_EXPORT vtkThreadedImageAlgorithm : public vtkImageAlgorithm
00036 {
00037 public:
00038   vtkTypeRevisionMacro(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   // also support the old signature
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&);  // Not implemented.
00088   void operator=(const vtkThreadedImageAlgorithm&);  // Not implemented.
00089 };
00090 
00091 #endif
00092 
00093 
00094 
00095 
00096 
00097 
00098 

Generated on Mon Jan 21 23:07:21 2008 for VTK by  doxygen 1.4.3-20050530