VTK
vtkStreamingDemandDrivenPipeline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkStreamingDemandDrivenPipeline.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 =========================================================================*/
31 #ifndef vtkStreamingDemandDrivenPipeline_h
32 #define vtkStreamingDemandDrivenPipeline_h
33 
34 #include "vtkCommonExecutionModelModule.h" // For export macro
36 
37 #define VTK_UPDATE_EXTENT_COMBINE 1
38 #define VTK_UPDATE_EXTENT_REPLACE 2
39 
49 
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
60  virtual int ProcessRequest(vtkInformation* request,
61  vtkInformationVector** inInfo,
62  vtkInformationVector* outInfo);
64 
66 
67  virtual int Update();
68  virtual int Update(int port);
69  virtual int UpdateWholeExtent();
71 
74  int PropagateUpdateExtent(int outputPort);
75 
76 
78 
80  int PropagateTime(int outputPort);
81  int UpdateTimeDependentInformation(int outputPort);
83 
85 
88  static int SetWholeExtent(vtkInformation *, int extent[6]);
89  static void GetWholeExtent(vtkInformation *, int extent[6]);
90  static int* GetWholeExtent(vtkInformation *);
92 
94 
98  int SetUpdateExtentToWholeExtent(int port);
99  static int SetUpdateExtentToWholeExtent(vtkInformation *);
101 
103 
104  int SetUpdateExtent(int port, int extent[6]);
105  int SetUpdateExtent(int port, int x0, int x1, int y0, int y1, int z0, int z1);
106  static int SetUpdateExtent(vtkInformation *, int extent[6]);
107  static void GetUpdateExtent(vtkInformation *, int extent[6]);
108  static int* GetUpdateExtent(vtkInformation *);
110 
112 
114  int SetUpdateExtent(int port,
115  int piece, int numPieces, int ghostLevel);
116  static int SetUpdateExtent(vtkInformation *,
117  int piece, int numPieces, int ghostLevel);
118  static int SetUpdatePiece(vtkInformation *, int piece);
119  static int GetUpdatePiece(vtkInformation *);
120  static int SetUpdateNumberOfPieces(vtkInformation *, int n);
121  static int GetUpdateNumberOfPieces(vtkInformation *);
122  static int SetUpdateGhostLevel(vtkInformation *, int n);
123  static int GetUpdateGhostLevel(vtkInformation *);
125 
127 
128  int SetUpdateTimeStep(int port, double time);
129  static int SetUpdateTimeStep(vtkInformation *, double time);
131 
133 
139  int SetRequestExactExtent(int port, int flag);
140  int GetRequestExactExtent(int port);
142 
145  static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT();
146 
149  static vtkInformationRequestKey* REQUEST_UPDATE_TIME();
152  static vtkInformationRequestKey* REQUEST_TIME_DEPENDENT_INFORMATION();
153 
156  static vtkInformationIntegerKey* CONTINUE_EXECUTING();
157 
160  static vtkInformationIntegerKey* UPDATE_EXTENT_INITIALIZED();
162  static vtkInformationIntegerVectorKey* UPDATE_EXTENT();
164  static vtkInformationIntegerKey* UPDATE_PIECE_NUMBER();
166  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES();
168  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS();
169 
173  static vtkInformationIntegerVectorKey* COMBINED_UPDATE_EXTENT();
174 
177  static vtkInformationIntegerVectorKey* WHOLE_EXTENT();
178 
182  static vtkInformationIntegerKey* UNRESTRICTED_UPDATE_EXTENT();
183 
186  static vtkInformationIntegerKey* EXACT_EXTENT();
187 
189  static vtkInformationDoubleVectorKey* TIME_STEPS();
190 
193  static vtkInformationDoubleVectorKey* TIME_RANGE();
194 
196  static vtkInformationDoubleKey* UPDATE_TIME_STEP();
197 
201  static vtkInformationIntegerKey* TIME_DEPENDENT_INFORMATION();
202 
204  static vtkInformationDoubleVectorKey *BOUNDS();
205 
206 protected:
209 
217  static vtkInformationDoubleKey* PREVIOUS_UPDATE_TIME_STEP();
218 
219  // Does the time request correspond to what is in the data?
220  // Returns 0 if yes, 1 otherwise.
221  virtual int NeedToExecuteBasedOnTime(vtkInformation* outInfo,
222  vtkDataObject* dataObject);
223 
224  // Setup default information on the output after the algorithm
225  // executes information.
226  virtual int ExecuteInformation(vtkInformation* request,
227  vtkInformationVector** inInfoVec,
228  vtkInformationVector* outInfoVec);
229 
230  // Copy information for the given request.
231  virtual void CopyDefaultInformation(vtkInformation* request, int direction,
232  vtkInformationVector** inInfoVec,
233  vtkInformationVector* outInfoVec);
234 
235  // Helper to check output information before propagating it to inputs.
236  virtual int VerifyOutputInformation(int outputPort,
237  vtkInformationVector** inInfoVec,
238  vtkInformationVector* outInfoVec);
239 
240 
241  // Override this check to account for update extent.
242  virtual int NeedToExecuteData(int outputPort,
243  vtkInformationVector** inInfoVec,
244  vtkInformationVector* outInfoVec);
245 
246  // Override these to handle the continue-executing option.
247  virtual void ExecuteDataStart(vtkInformation* request,
248  vtkInformationVector** inInfoVec,
249  vtkInformationVector* outInfoVec);
250  virtual void ExecuteDataEnd(vtkInformation* request,
251  vtkInformationVector** inInfoVec,
252  vtkInformationVector* outInfoVec);
253 
254  // Override this to handle cropping and ghost levels.
255  virtual void MarkOutputsGenerated(vtkInformation* request,
256  vtkInformationVector** inInfoVec,
257  vtkInformationVector* outInfoVec);
258 
259 
260  // Remove update/whole extent when resetting pipeline information.
261  virtual void ResetPipelineInformation(int port, vtkInformation*);
262 
263  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
264  // request.
266 
268 
269  // did the most recent PUE do anything ?
271 
272 private:
274  void operator=(const vtkStreamingDemandDrivenPipeline&); // Not implemented.
275 };
276 
277 #endif
#define VTKCOMMONEXECUTIONMODEL_EXPORT
Key for unsigned long values in vtkInformation.
virtual void ResetPipelineInformation(int, vtkInformation *)
Store vtkAlgorithm input/output information.
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
Key for string values in vtkInformation.
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Key for double vector values.
a simple class to control print indentation
Definition: vtkIndent.h:38
Key for pointer to pointer.
Key for integer values in vtkInformation.
Executive supporting on-demand execution.
virtual void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Key for vtkObjectBase values.
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
static vtkDemandDrivenPipeline * New()
Key for double values in vtkInformation.
Store zero or more vtkInformation instances.
Executive supporting partial updates.
void PrintSelf(ostream &os, vtkIndent indent)
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
general representation of visualization data
Definition: vtkDataObject.h:64
Key for vtkIdType values in vtkInformation.