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
vtkInformationIterator
Iterates over keys of an information object.
Definition: vtkInformationIterator.h:37
vtkInformationIdTypeKey
Key for vtkIdType values in vtkInformation.
Definition: vtkInformationIdTypeKey.h:31
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:33
vtkStreamingDemandDrivenPipeline::ContinueExecuting
int ContinueExecuting
Definition: vtkStreamingDemandDrivenPipeline.h:309
vtkDemandDrivenPipeline
Executive supporting on-demand execution.
Definition: vtkDemandDrivenPipeline.h:54
vtkStreamingDemandDrivenPipeline::UpdateExtentRequest
vtkInformation * UpdateExtentRequest
Definition: vtkStreamingDemandDrivenPipeline.h:311
vtkDemandDrivenPipeline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkX3D::direction
@ direction
Definition: vtkX3D.h:266
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkDemandDrivenPipeline::Update
vtkTypeBool Update() override
Bring the algorithm's outputs up-to-date.
vtkDemandDrivenPipeline::MarkOutputsGenerated
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::InformationIterator
vtkInformationIterator * InformationIterator
Definition: vtkStreamingDemandDrivenPipeline.h:314
vtkInformationDoubleKey
Key for double values in vtkInformation.
Definition: vtkInformationDoubleKey.h:31
vtkDemandDrivenPipeline::ExecuteInformation
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::ExecuteDataStart
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkExecutive::CopyDefaultInformation
virtual void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkDemandDrivenPipeline::ResetPipelineInformation
void ResetPipelineInformation(int, vtkInformation *) override
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:45
vtkStreamingDemandDrivenPipeline::LastPropogateUpdateExtentShortCircuited
int LastPropogateUpdateExtentShortCircuited
Definition: vtkStreamingDemandDrivenPipeline.h:317
vtkInformationObjectBaseKey
Key for vtkObjectBase values.
Definition: vtkInformationObjectBaseKey.h:33
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:31
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInformationRequestKey
Key for pointer to pointer.
Definition: vtkInformationRequestKey.h:31
vtkDemandDrivenPipeline::New
static vtkDemandDrivenPipeline * New()
vtkInformationUnsignedLongKey
Key for unsigned long values in vtkInformation.
Definition: vtkInformationUnsignedLongKey.h:31
vtkDemandDrivenPipeline::NeedToExecuteData
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkDemandDrivenPipeline::ExecuteDataEnd
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::UpdateTimeRequest
vtkInformation * UpdateTimeRequest
Definition: vtkStreamingDemandDrivenPipeline.h:312
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:31
vtkDemandDrivenPipeline.h
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkInformationIntegerVectorKey
Key for integer vector values.
Definition: vtkInformationIntegerVectorKey.h:31
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkStreamingDemandDrivenPipeline
Executive supporting partial updates.
Definition: vtkStreamingDemandDrivenPipeline.h:46
vtkStreamingDemandDrivenPipeline::TimeDependentInformationRequest
vtkInformation * TimeDependentInformationRequest
Definition: vtkStreamingDemandDrivenPipeline.h:313
vtkDemandDrivenPipeline::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69