VTK  9.1.0
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 =========================================================================*/
135 #ifndef vtkStreamingDemandDrivenPipeline_h
136 #define vtkStreamingDemandDrivenPipeline_h
137 
138 #include "vtkCommonExecutionModelModule.h" // For export macro
139 #include "vtkDemandDrivenPipeline.h"
140 
141 #define VTK_UPDATE_EXTENT_COMBINE 1
142 #define VTK_UPDATE_EXTENT_REPLACE 2
143 
154 
155 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkStreamingDemandDrivenPipeline
156  : public vtkDemandDrivenPipeline
157 {
158 public:
161  void PrintSelf(ostream& os, vtkIndent indent) override;
162 
168  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
169 
171 
174  vtkTypeBool Update() override;
175  vtkTypeBool Update(int port) override;
178 
201  virtual vtkTypeBool Update(int port, vtkInformationVector* requests);
202 
208  int PropagateUpdateExtent(int outputPort);
209 
211 
215  int PropagateTime(int outputPort);
216  int UpdateTimeDependentInformation(int outputPort);
218 
220 
225  static int SetWholeExtent(vtkInformation*, int extent[6]);
226  static void GetWholeExtent(vtkInformation*, int extent[6]);
229 
231 
239  int SetRequestExactExtent(int port, int flag);
242 
248 
259 
266 
288 
295 
301 
309 
315 
321 
327 
333 
341 
347 
349 
352  static void GetUpdateExtent(vtkInformation*, int extent[6]);
356 
365 
366 protected:
369 
381 
382  // Does the time request correspond to what is in the data?
383  // Returns 0 if yes, 1 otherwise.
384  virtual int NeedToExecuteBasedOnTime(vtkInformation* outInfo, vtkDataObject* dataObject);
385 
386  // Setup default information on the output after the algorithm
387  // executes information.
389  vtkInformationVector* outInfoVec) override;
390 
391  // Copy information for the given request.
393  vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
394 
395  // Helper to check output information before propagating it to inputs.
397  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
398 
399  // Override this check to account for update extent.
401  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
402 
403  // Override these to handle the continue-executing option.
405  vtkInformationVector* outInfoVec) override;
407  vtkInformationVector* outInfoVec) override;
408 
409  // Override this to handle cropping and ghost levels.
411  vtkInformationVector* outInfoVec) override;
412 
413  // Remove update/whole extent when resetting pipeline information.
415 
416  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
417  // request.
419 
424 
425  // did the most recent PUE do anything ?
427 
428 private:
430  void operator=(const vtkStreamingDemandDrivenPipeline&) = delete;
431 };
432 
433 #endif
vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTING
static vtkInformationIntegerKey * CONTINUE_EXECUTING()
Key for an algorithm to store in a request to tell this executive to keep executing it.
vtkStreamingDemandDrivenPipeline::~vtkStreamingDemandDrivenPipeline
~vtkStreamingDemandDrivenPipeline() override
vtkStreamingDemandDrivenPipeline::vtkStreamingDemandDrivenPipeline
vtkStreamingDemandDrivenPipeline()
vtkInformationIterator
Iterates over keys of an information object.
Definition: vtkInformationIterator.h:38
vtkStreamingDemandDrivenPipeline::MarkOutputsGenerated
void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkStreamingDemandDrivenPipeline::SetRequestExactExtent
int SetRequestExactExtent(int port, int flag)
This request flag indicates whether the requester can handle more data than requested for the given p...
vtkInformationIdTypeKey
Key for vtkIdType values in vtkInformation.
Definition: vtkInformationIdTypeKey.h:32
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:34
vtkStreamingDemandDrivenPipeline::TIME_DEPENDENT_INFORMATION
static vtkInformationIntegerKey * TIME_DEPENDENT_INFORMATION()
Whether there are time dependent meta information if there is, the pipeline will perform two extra pa...
vtkStreamingDemandDrivenPipeline::ContinueExecuting
int ContinueExecuting
Definition: vtkStreamingDemandDrivenPipeline.h:418
vtkDemandDrivenPipeline
Executive supporting on-demand execution.
Definition: vtkDemandDrivenPipeline.h:55
vtkStreamingDemandDrivenPipeline::UNRESTRICTED_UPDATE_EXTENT
static vtkInformationIntegerKey * UNRESTRICTED_UPDATE_EXTENT()
This is set if the update extent is not restricted to the whole extent, for sources that can generate...
vtkStreamingDemandDrivenPipeline::PropagateUpdateExtent
int PropagateUpdateExtent(int outputPort)
Propagate the update request from the given output port back through the pipeline.
vtkStreamingDemandDrivenPipeline::UpdateExtentRequest
vtkInformation * UpdateExtentRequest
Definition: vtkStreamingDemandDrivenPipeline.h:420
vtkStreamingDemandDrivenPipeline::VerifyOutputInformation
virtual int VerifyOutputInformation(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::GetWholeExtent
static void GetWholeExtent(vtkInformation *, int extent[6])
Set/Get the whole extent of an output port.
vtkStreamingDemandDrivenPipeline::REQUEST_TIME_DEPENDENT_INFORMATION
static vtkInformationRequestKey * REQUEST_TIME_DEPENDENT_INFORMATION()
Key defining a request to make sure the meta information is up to date.
vtkX3D::direction
@ direction
Definition: vtkX3D.h:266
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkStreamingDemandDrivenPipeline::BOUNDS
static vtkInformationDoubleVectorKey * BOUNDS()
key to record the bounds of a dataset.
vtkStreamingDemandDrivenPipeline::SetWholeExtent
static int SetWholeExtent(vtkInformation *, int extent[6])
Set/Get the whole extent of an output port.
vtkStreamingDemandDrivenPipeline::ExecuteInformation
int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkStreamingDemandDrivenPipeline::InformationIterator
vtkInformationIterator * InformationIterator
Definition: vtkStreamingDemandDrivenPipeline.h:423
vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_EXTENT
static vtkInformationRequestKey * REQUEST_UPDATE_EXTENT()
Key defining a request to propagate the update extent upstream.
vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT
static vtkInformationIntegerVectorKey * UPDATE_EXTENT()
vtkStreamingDemandDrivenPipeline::UpdateWholeExtent
virtual vtkTypeBool UpdateWholeExtent()
Bring the outputs up-to-date.
vtkStreamingDemandDrivenPipeline::TIME_RANGE
static vtkInformationDoubleVectorKey * TIME_RANGE()
Key to store available time range for continuous sources.
vtkStreamingDemandDrivenPipeline::ExecuteDataStart
void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkStreamingDemandDrivenPipeline::EXACT_EXTENT
static vtkInformationIntegerKey * EXACT_EXTENT()
Key to specify the request for exact extent in pipeline information.
vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES
static vtkInformationIntegerKey * UPDATE_NUMBER_OF_PIECES()
vtkStreamingDemandDrivenPipeline::GetRequestExactExtent
int GetRequestExactExtent(int port)
This request flag indicates whether the requester can handle more data than requested for the given p...
vtkInformationDoubleKey
Key for double values in vtkInformation.
Definition: vtkInformationDoubleKey.h:32
vtkStreamingDemandDrivenPipeline::GetUpdateNumberOfPieces
static int GetUpdateNumberOfPieces(vtkInformation *)
Set/Get the update piece, update number of pieces, and update number of ghost levels for an output po...
vtkStreamingDemandDrivenPipeline::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
vtkStreamingDemandDrivenPipeline::NeedToExecuteData
int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkStreamingDemandDrivenPipeline::COMBINED_UPDATE_EXTENT
static vtkInformationIntegerVectorKey * COMBINED_UPDATE_EXTENT()
Key for combining the update extents requested by all consumers, so that the final extent that is pro...
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkStreamingDemandDrivenPipeline::ResetPipelineInformation
void ResetPipelineInformation(int port, vtkInformation *) override
vtkStreamingDemandDrivenPipeline::GetUpdateExtent
static int * GetUpdateExtent(vtkInformation *)
Get/Set the update extent for output ports that use 3D extents.
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:48
vtkStreamingDemandDrivenPipeline::New
static vtkStreamingDemandDrivenPipeline * New()
vtkStreamingDemandDrivenPipeline::Update
vtkTypeBool Update() override
Bring the outputs up-to-date.
vtkStreamingDemandDrivenPipeline::ExecuteDataEnd
void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS
static vtkInformationIntegerKey * UPDATE_NUMBER_OF_GHOST_LEVELS()
vtkStreamingDemandDrivenPipeline::TIME_STEPS
static vtkInformationDoubleVectorKey * TIME_STEPS()
Key to store available time steps.
vtkStreamingDemandDrivenPipeline::LastPropogateUpdateExtentShortCircuited
int LastPropogateUpdateExtentShortCircuited
Definition: vtkStreamingDemandDrivenPipeline.h:426
vtkInformationObjectBaseKey
Key for vtkObjectBase values.
Definition: vtkInformationObjectBaseKey.h:34
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:32
vtkStreamingDemandDrivenPipeline::UpdateTimeDependentInformation
int UpdateTimeDependentInformation(int outputPort)
Propagate time through the pipeline.
vtkStreamingDemandDrivenPipeline::GetUpdateGhostLevel
static int GetUpdateGhostLevel(vtkInformation *)
Set/Get the update piece, update number of pieces, and update number of ghost levels for an output po...
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkStreamingDemandDrivenPipeline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT
static vtkInformationIntegerVectorKey * WHOLE_EXTENT()
Key to store the whole extent provided in pipeline information.
vtkInformationRequestKey
Key for pointer to pointer.
Definition: vtkInformationRequestKey.h:32
vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT_INITIALIZED
static vtkInformationIntegerKey * UPDATE_EXTENT_INITIALIZED()
Keys to store an update request in pipeline information.
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP
static vtkInformationDoubleKey * UPDATE_TIME_STEP()
Update time steps requested by the pipeline.
vtkInformationUnsignedLongKey
Key for unsigned long values in vtkInformation.
Definition: vtkInformationUnsignedLongKey.h:32
vtkStreamingDemandDrivenPipeline::NeedToExecuteBasedOnTime
virtual int NeedToExecuteBasedOnTime(vtkInformation *outInfo, vtkDataObject *dataObject)
vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_TIME
static vtkInformationRequestKey * REQUEST_UPDATE_TIME()
Key defining a request to propagate the update extent upstream.
vtkStreamingDemandDrivenPipeline::PREVIOUS_UPDATE_TIME_STEP
static vtkInformationDoubleKey * PREVIOUS_UPDATE_TIME_STEP()
Keep track of the update time request corresponding to the previous executing.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkStreamingDemandDrivenPipeline::GetWholeExtent
static int * GetWholeExtent(vtkInformation *)
Set/Get the whole extent of an output port.
vtkStreamingDemandDrivenPipeline::UpdateTimeRequest
vtkInformation * UpdateTimeRequest
Definition: vtkStreamingDemandDrivenPipeline.h:421
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:51
vtkStreamingDemandDrivenPipeline::GetUpdatePiece
static int GetUpdatePiece(vtkInformation *)
Set/Get the update piece, update number of pieces, and update number of ghost levels for an output po...
vtkStreamingDemandDrivenPipeline::Update
vtkTypeBool Update(int port) override
Bring the outputs up-to-date.
vtkDemandDrivenPipeline.h
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkStreamingDemandDrivenPipeline::PropagateTime
int PropagateTime(int outputPort)
Propagate time through the pipeline.
vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER
static vtkInformationIntegerKey * UPDATE_PIECE_NUMBER()
vtkInformationIntegerVectorKey
Key for integer vector values.
Definition: vtkInformationIntegerVectorKey.h:32
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkStreamingDemandDrivenPipeline
Executive supporting partial updates.
Definition: vtkStreamingDemandDrivenPipeline.h:157
vtkStreamingDemandDrivenPipeline::TimeDependentInformationRequest
vtkInformation * TimeDependentInformationRequest
Definition: vtkStreamingDemandDrivenPipeline.h:422
vtkStreamingDemandDrivenPipeline::CopyDefaultInformation
void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkStreamingDemandDrivenPipeline::Update
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...
vtkStreamingDemandDrivenPipeline::GetUpdateExtent
static void GetUpdateExtent(vtkInformation *, int extent[6])
Get/Set the update extent for output ports that use 3D extents.