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 =========================================================================*/
26 #ifndef vtkStreamingDemandDrivenPipeline_h
27 #define vtkStreamingDemandDrivenPipeline_h
28 
29 #include "vtkCommonExecutionModelModule.h" // For export macro
31 
32 #define VTK_UPDATE_EXTENT_COMBINE 1
33 #define VTK_UPDATE_EXTENT_REPLACE 2
34 
44 
45 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkStreamingDemandDrivenPipeline : public vtkDemandDrivenPipeline
46 {
47 public:
50  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
51 
56  int ProcessRequest(vtkInformation* request,
57  vtkInformationVector** inInfo,
58  vtkInformationVector* outInfo) VTK_OVERRIDE;
59 
61 
64  int Update() VTK_OVERRIDE;
65  int Update(int port) VTK_OVERRIDE;
66  virtual int UpdateWholeExtent();
68 
91  virtual int Update(int port, vtkInformationVector* requests);
92 
98  int PropagateUpdateExtent(int outputPort);
99 
101 
105  int PropagateTime(int outputPort);
106  int UpdateTimeDependentInformation(int outputPort);
108 
110 
115  static int SetWholeExtent(vtkInformation *, int extent[6]);
116  static void GetWholeExtent(vtkInformation *, int extent[6]);
117  static int* GetWholeExtent(vtkInformation *);
119 
121 
129  int SetRequestExactExtent(int port, int flag);
130  int GetRequestExactExtent(int port);
132 
137  static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT();
138 
143  static vtkInformationRequestKey* REQUEST_UPDATE_TIME();
148  static vtkInformationRequestKey* REQUEST_TIME_DEPENDENT_INFORMATION();
149 
155  static vtkInformationIntegerKey* CONTINUE_EXECUTING();
156 
161  static vtkInformationIntegerKey* UPDATE_EXTENT_INITIALIZED();
165  static vtkInformationIntegerVectorKey* UPDATE_EXTENT();
169  static vtkInformationIntegerKey* UPDATE_PIECE_NUMBER();
173  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES();
177  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS();
178 
184  static vtkInformationIntegerVectorKey* COMBINED_UPDATE_EXTENT();
185 
190  static vtkInformationIntegerVectorKey* WHOLE_EXTENT();
191 
198  static vtkInformationIntegerKey* UNRESTRICTED_UPDATE_EXTENT();
199 
204  static vtkInformationIntegerKey* EXACT_EXTENT();
205 
210  static vtkInformationDoubleVectorKey* TIME_STEPS();
211 
216  static vtkInformationDoubleVectorKey* TIME_RANGE();
217 
222  static vtkInformationDoubleKey* UPDATE_TIME_STEP();
223 
230  static vtkInformationIntegerKey* TIME_DEPENDENT_INFORMATION();
231 
236  static vtkInformationDoubleVectorKey *BOUNDS();
237 
239 
245  VTK_LEGACY(int SetUpdateExtentToWholeExtent(int port));
246  VTK_LEGACY(static int SetUpdateExtentToWholeExtent(vtkInformation *));
248 
250 
253  VTK_LEGACY(int SetUpdateExtent(int port, int extent[6]));
254  VTK_LEGACY(int SetUpdateExtent(int port, int x0, int x1, int y0, int y1, int z0, int z1));
255  VTK_LEGACY(static int SetUpdateExtent(vtkInformation *, int extent[6]));
256  static void GetUpdateExtent(vtkInformation *, int extent[6]);
257  static int* GetUpdateExtent(vtkInformation *);
259 
260 
265  VTK_LEGACY(int SetUpdateExtent(int port,
266  int piece, int numPieces, int ghostLevel));
267  VTK_LEGACY(static int SetUpdateExtent(vtkInformation *,
268  int piece, int numPieces, int ghostLevel));
269  VTK_LEGACY(static int SetUpdatePiece(vtkInformation *, int piece));
270  static int GetUpdatePiece(vtkInformation *);
271  VTK_LEGACY(static int SetUpdateNumberOfPieces(vtkInformation *, int n));
272  static int GetUpdateNumberOfPieces(vtkInformation *);
273  VTK_LEGACY(static int SetUpdateGhostLevel(vtkInformation *, int n));
274  static int GetUpdateGhostLevel(vtkInformation *);
276 
278 
281  VTK_LEGACY(int SetUpdateTimeStep(int port, double time));
282  VTK_LEGACY(static int SetUpdateTimeStep(vtkInformation *, double time));
284 
285 protected:
287  ~vtkStreamingDemandDrivenPipeline() VTK_OVERRIDE;
288 
299  static vtkInformationDoubleKey* PREVIOUS_UPDATE_TIME_STEP();
300 
301  // Does the time request correspond to what is in the data?
302  // Returns 0 if yes, 1 otherwise.
303  virtual int NeedToExecuteBasedOnTime(vtkInformation* outInfo,
304  vtkDataObject* dataObject);
305 
306  // Setup default information on the output after the algorithm
307  // executes information.
308  int ExecuteInformation(vtkInformation* request,
309  vtkInformationVector** inInfoVec,
310  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
311 
312  // Copy information for the given request.
313  void CopyDefaultInformation(vtkInformation* request, int direction,
314  vtkInformationVector** inInfoVec,
315  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
316 
317  // Helper to check output information before propagating it to inputs.
318  virtual int VerifyOutputInformation(int outputPort,
319  vtkInformationVector** inInfoVec,
320  vtkInformationVector* outInfoVec);
321 
322 
323  // Override this check to account for update extent.
324  int NeedToExecuteData(int outputPort,
325  vtkInformationVector** inInfoVec,
326  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
327 
328  // Override these to handle the continue-executing option.
329  void ExecuteDataStart(vtkInformation* request,
330  vtkInformationVector** inInfoVec,
331  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
332  void ExecuteDataEnd(vtkInformation* request,
333  vtkInformationVector** inInfoVec,
334  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
335 
336  // Override this to handle cropping and ghost levels.
337  void MarkOutputsGenerated(vtkInformation* request,
338  vtkInformationVector** inInfoVec,
339  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
340 
341 
342  // Remove update/whole extent when resetting pipeline information.
343  void ResetPipelineInformation(int port, vtkInformation*) VTK_OVERRIDE;
344 
345  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
346  // request.
347  int ContinueExecuting;
348 
349  vtkInformation *UpdateExtentRequest;
350 
351  // did the most recent PUE do anything ?
352  int LastPropogateUpdateExtentShortCircuited;
353 
354 private:
356  void operator=(const vtkStreamingDemandDrivenPipeline&) VTK_DELETE_FUNCTION;
357 };
358 
359 #endif
Key for unsigned long values in vtkInformation.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store vtkAlgorithm input/output information.
virtual void Update()
Updates the extensions string.
Key for string values in vtkInformation.
Key for double vector values.
a simple class to control print indentation
Definition: vtkIndent.h:33
Key for pointer to pointer.
Key for integer values in vtkInformation.
Executive supporting on-demand execution.
Key for vtkObjectBase values.
static vtkDemandDrivenPipeline * New()
int Update() override
Bring the algorithm's outputs up-to-date.
Key for double values in vtkInformation.
int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
Store zero or more vtkInformation instances.
Executive supporting partial updates.
general representation of visualization data
Definition: vtkDataObject.h:58
Key for vtkIdType values in vtkInformation.