VTK
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 : public vtkDemandDrivenPipeline
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
64  vtkInformationVector** inInfo,
65  vtkInformationVector* outInfo) override;
66 
68 
71  int Update() override;
72  int Update(int port) override;
73  virtual int UpdateWholeExtent();
75 
98  virtual int 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]);
126 
128 
136  int SetRequestExactExtent(int port, int flag);
139 
145 
156 
163 
185 
192 
198 
206 
212 
218 
224 
230 
238 
244 
246 
249  static void GetUpdateExtent(vtkInformation *, int extent[6]);
252 
253 
262 
263 protected:
266 
278 
279  // Does the time request correspond to what is in the data?
280  // Returns 0 if yes, 1 otherwise.
282  vtkDataObject* dataObject);
283 
284  // Setup default information on the output after the algorithm
285  // executes information.
287  vtkInformationVector** inInfoVec,
288  vtkInformationVector* outInfoVec) override;
289 
290  // Copy information for the given request.
292  vtkInformationVector** inInfoVec,
293  vtkInformationVector* outInfoVec) override;
294 
295  // Helper to check output information before propagating it to inputs.
296  virtual int VerifyOutputInformation(int outputPort,
297  vtkInformationVector** inInfoVec,
298  vtkInformationVector* outInfoVec);
299 
300 
301  // Override this check to account for update extent.
302  int NeedToExecuteData(int outputPort,
303  vtkInformationVector** inInfoVec,
304  vtkInformationVector* outInfoVec) override;
305 
306  // Override these to handle the continue-executing option.
308  vtkInformationVector** inInfoVec,
309  vtkInformationVector* outInfoVec) override;
311  vtkInformationVector** inInfoVec,
312  vtkInformationVector* outInfoVec) override;
313 
314  // Override this to handle cropping and ghost levels.
316  vtkInformationVector** inInfoVec,
317  vtkInformationVector* outInfoVec) override;
318 
319 
320  // Remove update/whole extent when resetting pipeline information.
322 
323  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
324  // request.
326 
331 
332  // did the most recent PUE do anything ?
334 
335 private:
337  void operator=(const vtkStreamingDemandDrivenPipeline&) = delete;
338 };
339 
340 #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:41
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:35
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:37
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:325
vtkDemandDrivenPipeline
Executive supporting on-demand execution.
Definition: vtkDemandDrivenPipeline.h:52
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::Update
int Update(int port) override
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:327
vtkStreamingDemandDrivenPipeline::VerifyOutputInformation
virtual int VerifyOutputInformation(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::GetWholeExtent
static void GetWholeExtent(vtkInformation *, int extent[6])
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:260
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
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:330
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::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)
vtkInformationDoubleKey
Key for double values in vtkInformation.
Definition: vtkInformationDoubleKey.h:35
vtkStreamingDemandDrivenPipeline::GetUpdateNumberOfPieces
static int GetUpdateNumberOfPieces(vtkInformation *)
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...
vtkStreamingDemandDrivenPipeline::Update
int Update() override
Bring the outputs up-to-date.
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkStreamingDemandDrivenPipeline::ProcessRequest
int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
vtkStreamingDemandDrivenPipeline::ResetPipelineInformation
void ResetPipelineInformation(int port, vtkInformation *) override
vtkStreamingDemandDrivenPipeline::GetUpdateExtent
static int * GetUpdateExtent(vtkInformation *)
vtkStreamingDemandDrivenPipeline::UpdateWholeExtent
virtual int UpdateWholeExtent()
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkStreamingDemandDrivenPipeline::New
static vtkStreamingDemandDrivenPipeline * New()
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:333
vtkInformationObjectBaseKey
Key for vtkObjectBase values.
Definition: vtkInformationObjectBaseKey.h:37
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:35
vtkStreamingDemandDrivenPipeline::UpdateTimeDependentInformation
int UpdateTimeDependentInformation(int outputPort)
vtkStreamingDemandDrivenPipeline::GetUpdateGhostLevel
static int GetUpdateGhostLevel(vtkInformation *)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
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:35
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:87
vtkStreamingDemandDrivenPipeline::GetWholeExtent
static int * GetWholeExtent(vtkInformation *)
vtkStreamingDemandDrivenPipeline::UpdateTimeRequest
vtkInformation * UpdateTimeRequest
Definition: vtkStreamingDemandDrivenPipeline.h:328
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:35
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...
vtkDemandDrivenPipeline.h
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
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:35
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkStreamingDemandDrivenPipeline
Executive supporting partial updates.
Definition: vtkStreamingDemandDrivenPipeline.h:53
vtkStreamingDemandDrivenPipeline::TimeDependentInformationRequest
vtkInformation * TimeDependentInformationRequest
Definition: vtkStreamingDemandDrivenPipeline.h:329
vtkStreamingDemandDrivenPipeline::CopyDefaultInformation
void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkStreamingDemandDrivenPipeline::Update
virtual int 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.