VTK
vtkThreadedImageAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkThreadedImageAlgorithm.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
27 #ifndef vtkThreadedImageAlgorithm_h
28 #define vtkThreadedImageAlgorithm_h
29 
30 #include "vtkCommonExecutionModelModule.h" // For export macro
31 #include "vtkImageAlgorithm.h"
32 
33 class vtkImageData;
34 class vtkMultiThreader;
35 
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
43 
47  virtual void ThreadedRequestData(vtkInformation *request,
48  vtkInformationVector **inputVector,
49  vtkInformationVector *outputVector,
50  vtkImageData ***inData,
51  vtkImageData **outData,
52  int extent[6], int threadId);
54 
55  // also support the old signature
56  virtual void ThreadedExecute(vtkImageData *inData,
57  vtkImageData *outData,
58  int extent[6], int threadId);
59 
61 
62  vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
63  vtkGetMacro( NumberOfThreads, int );
65 
67 
68  virtual int SplitExtent(int splitExt[6], int startExt[6],
69  int num, int total);
71 
72 protected:
75 
78 
80 
82  virtual int RequestData(vtkInformation* request,
83  vtkInformationVector** inputVector,
84  vtkInformationVector* outputVector);
86 
87 private:
88  vtkThreadedImageAlgorithm(const vtkThreadedImageAlgorithm&); // Not implemented.
89  void operator=(const vtkThreadedImageAlgorithm&); // Not implemented.
90 };
91 
92 #endif
93 
94 
95 
96 
97 
98 
99 
#define VTKCOMMONEXECUTIONMODEL_EXPORT
Store vtkAlgorithm input/output information.
A class for performing multithreaded execution.
#define VTK_MAX_THREADS
Definition: vtkConfigure.h:41
Generic filter that has one input..
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)