VTK  9.0.3
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 
45 
46 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkStreamingDemandDrivenPipeline
48 {
49 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
59  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
60 
62 
65  vtkTypeBool Update() override;
66  vtkTypeBool Update(int port) override;
69 
92  virtual vtkTypeBool Update(int port, vtkInformationVector* requests);
93 
99  int PropagateUpdateExtent(int outputPort);
100 
102 
106  int PropagateTime(int outputPort);
107  int UpdateTimeDependentInformation(int outputPort);
109 
111 
116  static int SetWholeExtent(vtkInformation*, int extent[6]);
117  static void GetWholeExtent(vtkInformation*, int extent[6]);
120 
122 
130  int SetRequestExactExtent(int port, int flag);
133 
139 
150 
157 
179 
186 
192 
200 
206 
212 
218 
224 
232 
238 
240 
243  static void GetUpdateExtent(vtkInformation*, int extent[6]);
246 
247 
256 
257 protected:
260 
272 
273  // Does the time request correspond to what is in the data?
274  // Returns 0 if yes, 1 otherwise.
275  virtual int NeedToExecuteBasedOnTime(vtkInformation* outInfo, vtkDataObject* dataObject);
276 
277  // Setup default information on the output after the algorithm
278  // executes information.
280  vtkInformationVector* outInfoVec) override;
281 
282  // Copy information for the given request.
284  vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
285 
286  // Helper to check output information before propagating it to inputs.
288  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
289 
290  // Override this check to account for update extent.
292  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
293 
294  // Override these to handle the continue-executing option.
296  vtkInformationVector* outInfoVec) override;
298  vtkInformationVector* outInfoVec) override;
299 
300  // Override this to handle cropping and ghost levels.
302  vtkInformationVector* outInfoVec) override;
303 
304  // Remove update/whole extent when resetting pipeline information.
306 
307  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
308  // request.
310 
315 
316  // did the most recent PUE do anything ?
318 
319 private:
321  void operator=(const vtkStreamingDemandDrivenPipeline&) = delete;
322 };
323 
324 #endif
general representation of visualization data
Definition: vtkDataObject.h:60
Executive supporting on-demand execution.
a simple class to control print indentation
Definition: vtkIndent.h:34
Key for double values in vtkInformation.
Key for vtkIdType values in vtkInformation.
Key for integer values in vtkInformation.
Iterates over keys of an information object.
Key for vtkObjectBase values.
Key for pointer to pointer.
Key for string values in vtkInformation.
Key for unsigned long values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Executive supporting partial updates.
static vtkStreamingDemandDrivenPipeline * New()
void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
static int * GetWholeExtent(vtkInformation *)
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
static int GetUpdateGhostLevel(vtkInformation *)
virtual int NeedToExecuteBasedOnTime(vtkInformation *outInfo, vtkDataObject *dataObject)
int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
virtual vtkTypeBool Update(int port, vtkInformationVector *requests)
This method enables the passing of data requests to the algorithm to be used during execution (in add...
int PropagateTime(int outputPort)
Propagate time through the pipeline.
virtual vtkTypeBool UpdateWholeExtent()
vtkTypeBool Update(int port) override
virtual int VerifyOutputInformation(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static void GetUpdateExtent(vtkInformation *, int extent[6])
Get/Set the update extent for output ports that use 3D extents.
static int GetUpdatePiece(vtkInformation *)
Set/Get the update piece, update number of pieces, and update number of ghost levels for an output po...
void ResetPipelineInformation(int port, vtkInformation *) override
static int * GetUpdateExtent(vtkInformation *)
int UpdateTimeDependentInformation(int outputPort)
int PropagateUpdateExtent(int outputPort)
Propagate the update request from the given output port back through the pipeline.
void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
static void GetWholeExtent(vtkInformation *, int extent[6])
static int SetWholeExtent(vtkInformation *, int extent[6])
Set/Get the whole extent of an output port.
static int GetUpdateNumberOfPieces(vtkInformation *)
int SetRequestExactExtent(int port, int flag)
This request flag indicates whether the requester can handle more data than requested for the given p...
void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkTypeBool Update() override
Bring the outputs up-to-date.
static vtkInformationRequestKey * REQUEST_TIME_DEPENDENT_INFORMATION()
Key defining a request to make sure the meta information is up to date.
static vtkInformationIntegerVectorKey * WHOLE_EXTENT()
Key to store the whole extent provided in pipeline information.
static vtkInformationIntegerVectorKey * COMBINED_UPDATE_EXTENT()
Key for combining the update extents requested by all consumers, so that the final extent that is pro...
static vtkInformationDoubleVectorKey * TIME_RANGE()
Key to store available time range for continuous sources.
static vtkInformationIntegerKey * EXACT_EXTENT()
Key to specify the request for exact extent in pipeline information.
static vtkInformationIntegerKey * UPDATE_NUMBER_OF_GHOST_LEVELS()
static vtkInformationIntegerKey * UPDATE_PIECE_NUMBER()
static vtkInformationIntegerKey * UNRESTRICTED_UPDATE_EXTENT()
This is set if the update extent is not restricted to the whole extent, for sources that can generate...
static vtkInformationRequestKey * REQUEST_UPDATE_TIME()
Key defining a request to propagate the update extent upstream.
static vtkInformationRequestKey * REQUEST_UPDATE_EXTENT()
Key defining a request to propagate the update extent upstream.
static vtkInformationDoubleKey * UPDATE_TIME_STEP()
Update time steps requested by the pipeline.
static vtkInformationDoubleVectorKey * BOUNDS()
key to record the bounds of a dataset.
static vtkInformationDoubleVectorKey * TIME_STEPS()
Key to store available time steps.
static vtkInformationIntegerKey * UPDATE_EXTENT_INITIALIZED()
Keys to store an update request in pipeline information.
static vtkInformationIntegerVectorKey * UPDATE_EXTENT()
static vtkInformationDoubleKey * PREVIOUS_UPDATE_TIME_STEP()
Keep track of the update time request corresponding to the previous executing.
static vtkInformationIntegerKey * TIME_DEPENDENT_INFORMATION()
Whether there are time dependent meta information if there is, the pipeline will perform two extra pa...
static vtkInformationIntegerKey * UPDATE_NUMBER_OF_PIECES()
static vtkInformationIntegerKey * CONTINUE_EXECUTING()
Key for an algorithm to store in a request to tell this executive to keep executing it.
@ direction
Definition: vtkX3D.h:266
@ port
Definition: vtkX3D.h:453
@ extent
Definition: vtkX3D.h:351
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_SIZEHINT(...)