VTK  9.0.1
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;
67  virtual vtkTypeBool UpdateWholeExtent();
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]);
118  static int* GetWholeExtent(vtkInformation*) VTK_SIZEHINT(6);
120 
122 
130  int SetRequestExactExtent(int port, int flag);
131  int GetRequestExactExtent(int port);
133 
138  static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT();
139 
144  static vtkInformationRequestKey* REQUEST_UPDATE_TIME();
149  static vtkInformationRequestKey* REQUEST_TIME_DEPENDENT_INFORMATION();
150 
156  static vtkInformationIntegerKey* CONTINUE_EXECUTING();
157 
162  static vtkInformationIntegerKey* UPDATE_EXTENT_INITIALIZED();
166  static vtkInformationIntegerVectorKey* UPDATE_EXTENT();
170  static vtkInformationIntegerKey* UPDATE_PIECE_NUMBER();
174  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES();
178  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS();
179 
185  static vtkInformationIntegerVectorKey* COMBINED_UPDATE_EXTENT();
186 
191  static vtkInformationIntegerVectorKey* WHOLE_EXTENT();
192 
199  static vtkInformationIntegerKey* UNRESTRICTED_UPDATE_EXTENT();
200 
205  static vtkInformationIntegerKey* EXACT_EXTENT();
206 
211  static vtkInformationDoubleVectorKey* TIME_STEPS();
212 
217  static vtkInformationDoubleVectorKey* TIME_RANGE();
218 
223  static vtkInformationDoubleKey* UPDATE_TIME_STEP();
224 
231  static vtkInformationIntegerKey* TIME_DEPENDENT_INFORMATION();
232 
237  static vtkInformationDoubleVectorKey* BOUNDS();
238 
240 
243  static void GetUpdateExtent(vtkInformation*, int extent[6]);
244  static int* GetUpdateExtent(vtkInformation*);
246 
247 
252  static int GetUpdatePiece(vtkInformation*);
253  static int GetUpdateNumberOfPieces(vtkInformation*);
254  static int GetUpdateGhostLevel(vtkInformation*);
256 
257 protected:
260 
271  static vtkInformationDoubleKey* PREVIOUS_UPDATE_TIME_STEP();
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.
279  int ExecuteInformation(vtkInformation* request, vtkInformationVector** inInfoVec,
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.
287  virtual int VerifyOutputInformation(
288  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
289 
290  // Override this check to account for update extent.
291  int NeedToExecuteData(
292  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
293 
294  // Override these to handle the continue-executing option.
295  void ExecuteDataStart(vtkInformation* request, vtkInformationVector** inInfoVec,
296  vtkInformationVector* outInfoVec) override;
297  void ExecuteDataEnd(vtkInformation* request, vtkInformationVector** inInfoVec,
298  vtkInformationVector* outInfoVec) override;
299 
300  // Override this to handle cropping and ghost levels.
301  void MarkOutputsGenerated(vtkInformation* request, vtkInformationVector** inInfoVec,
302  vtkInformationVector* outInfoVec) override;
303 
304  // Remove update/whole extent when resetting pipeline information.
305  void ResetPipelineInformation(int port, vtkInformation*) override;
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
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 MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
Key for string values in vtkInformation.
vtkTypeBool Update() override
Bring the algorithm's outputs up-to-date.
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
int vtkTypeBool
Definition: vtkABI.h:69
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.
Iterates over keys of an information object.
virtual void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Key for vtkObjectBase values.
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
void ResetPipelineInformation(int, vtkInformation *) override
#define VTK_SIZEHINT(...)
static vtkDemandDrivenPipeline * New()
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
Key for double values in vtkInformation.
Store zero or more vtkInformation instances.
Executive supporting partial updates.
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
general representation of visualization data
Definition: vtkDataObject.h:59
Key for vtkIdType values in vtkInformation.