VTK  9.2.6
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 =========================================================================*/
32 #ifndef vtkStreamingDemandDrivenPipeline_h
33 #define vtkStreamingDemandDrivenPipeline_h
34 
35 #include "vtkCommonExecutionModelModule.h" // For export macro
37 
38 #define VTK_UPDATE_EXTENT_COMBINE 1
39 #define VTK_UPDATE_EXTENT_REPLACE 2
40 
51 
52 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkStreamingDemandDrivenPipeline
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
65  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
66 
68 
71  vtkTypeBool Update() override;
72  vtkTypeBool Update(int port) override;
73  virtual vtkTypeBool UpdateWholeExtent();
75 
98  virtual vtkTypeBool Update(int port, vtkInformationVector* requests);
99 
105  int PropagateUpdateExtent(int outputPort);
106 
108 
112  int PropagateTime(int outputPort);
113  int UpdateTimeDependentInformation(int outputPort);
115 
117 
122  static int SetWholeExtent(vtkInformation*, int extent[6]);
123  static void GetWholeExtent(vtkInformation*, int extent[6]);
124  static int* GetWholeExtent(vtkInformation*) VTK_SIZEHINT(6);
126 
128 
136  int SetRequestExactExtent(int port, int flag);
137  int GetRequestExactExtent(int port);
139 
144  static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT();
145 
150  static vtkInformationRequestKey* REQUEST_UPDATE_TIME();
155  static vtkInformationRequestKey* REQUEST_TIME_DEPENDENT_INFORMATION();
156 
162  static vtkInformationIntegerKey* CONTINUE_EXECUTING();
163 
168  static vtkInformationIntegerKey* UPDATE_EXTENT_INITIALIZED();
172  static vtkInformationIntegerVectorKey* UPDATE_EXTENT();
176  static vtkInformationIntegerKey* UPDATE_PIECE_NUMBER();
180  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES();
184  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS();
185 
191  static vtkInformationIntegerVectorKey* COMBINED_UPDATE_EXTENT();
192 
197  static vtkInformationIntegerVectorKey* WHOLE_EXTENT();
198 
205  static vtkInformationIntegerKey* UNRESTRICTED_UPDATE_EXTENT();
206 
211  static vtkInformationIntegerKey* EXACT_EXTENT();
212 
217  static vtkInformationDoubleVectorKey* TIME_STEPS();
218 
223  static vtkInformationDoubleVectorKey* TIME_RANGE();
224 
229  static vtkInformationDoubleKey* UPDATE_TIME_STEP();
230 
237  static vtkInformationIntegerKey* TIME_DEPENDENT_INFORMATION();
238 
243  static vtkInformationDoubleVectorKey* BOUNDS();
244 
246 
249  static void GetUpdateExtent(vtkInformation*, int extent[6]);
250  static int* GetUpdateExtent(vtkInformation*);
253 
258  static int GetUpdatePiece(vtkInformation*);
259  static int GetUpdateNumberOfPieces(vtkInformation*);
260  static int GetUpdateGhostLevel(vtkInformation*);
262 
263 protected:
265  ~vtkStreamingDemandDrivenPipeline() override;
266 
277  static vtkInformationDoubleKey* PREVIOUS_UPDATE_TIME_STEP();
278 
279  // Does the time request correspond to what is in the data?
280  // Returns 0 if yes, 1 otherwise.
281  virtual int NeedToExecuteBasedOnTime(vtkInformation* outInfo, vtkDataObject* dataObject);
282 
283  // Setup default information on the output after the algorithm
284  // executes information.
285  int ExecuteInformation(vtkInformation* request, vtkInformationVector** inInfoVec,
286  vtkInformationVector* outInfoVec) override;
287 
288  // Copy information for the given request.
289  void CopyDefaultInformation(vtkInformation* request, int direction,
290  vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
291 
292  // Helper to check output information before propagating it to inputs.
293  virtual int VerifyOutputInformation(
294  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
295 
296  // Override this check to account for update extent.
297  int NeedToExecuteData(
298  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
299 
300  // Override these to handle the continue-executing option.
301  void ExecuteDataStart(vtkInformation* request, vtkInformationVector** inInfoVec,
302  vtkInformationVector* outInfoVec) override;
303  void ExecuteDataEnd(vtkInformation* request, vtkInformationVector** inInfoVec,
304  vtkInformationVector* outInfoVec) override;
305 
306  // Override this to handle cropping and ghost levels.
307  void MarkOutputsGenerated(vtkInformation* request, vtkInformationVector** inInfoVec,
308  vtkInformationVector* outInfoVec) override;
309 
310  // Remove update/whole extent when resetting pipeline information.
311  void ResetPipelineInformation(int port, vtkInformation*) override;
312 
313  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
314  // request.
315  int ContinueExecuting;
316 
317  vtkInformation* UpdateExtentRequest;
318  vtkInformation* UpdateTimeRequest;
319  vtkInformation* TimeDependentInformationRequest;
320  vtkInformationIterator* InformationIterator;
321 
322  // did the most recent PUE do anything ?
323  int LastPropogateUpdateExtentShortCircuited;
324 
325 private:
326  vtkStreamingDemandDrivenPipeline(const vtkStreamingDemandDrivenPipeline&) = delete;
327  void operator=(const vtkStreamingDemandDrivenPipeline&) = delete;
328 };
329 
330 #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.
Key for string values in vtkInformation.
vtkTypeBool Update() override
Bring the algorithm's outputs up-to-date.
int vtkTypeBool
Definition: vtkABI.h:69
Key for double vector values.
a simple class to control print indentation
Definition: vtkIndent.h:39
Key for pointer to pointer.
Key for integer values in vtkInformation.
Executive supporting on-demand execution.
Iterates over keys of an information object.
Key for vtkObjectBase values.
#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.
general representation of visualization data
Definition: vtkDataObject.h:65
Key for vtkIdType values in vtkInformation.