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 =========================================================================*/
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 : public vtkDemandDrivenPipeline
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
57  int ProcessRequest(vtkInformation* request,
58  vtkInformationVector** inInfo,
59  vtkInformationVector* outInfo) override;
60 
62 
65  int Update() override;
66  int Update(int port) override;
67  virtual int UpdateWholeExtent();
69 
92  virtual int 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,
276  vtkDataObject* dataObject);
277 
278  // Setup default information on the output after the algorithm
279  // executes information.
280  int ExecuteInformation(vtkInformation* request,
281  vtkInformationVector** inInfoVec,
282  vtkInformationVector* outInfoVec) override;
283 
284  // Copy information for the given request.
286  vtkInformationVector** inInfoVec,
287  vtkInformationVector* outInfoVec) override;
288 
289  // Helper to check output information before propagating it to inputs.
290  virtual int VerifyOutputInformation(int outputPort,
291  vtkInformationVector** inInfoVec,
292  vtkInformationVector* outInfoVec);
293 
294 
295  // Override this check to account for update extent.
296  int NeedToExecuteData(int outputPort,
297  vtkInformationVector** inInfoVec,
298  vtkInformationVector* outInfoVec) override;
299 
300  // Override these to handle the continue-executing option.
301  void ExecuteDataStart(vtkInformation* request,
302  vtkInformationVector** inInfoVec,
303  vtkInformationVector* outInfoVec) override;
304  void ExecuteDataEnd(vtkInformation* request,
305  vtkInformationVector** inInfoVec,
306  vtkInformationVector* outInfoVec) override;
307 
308  // Override this to handle cropping and ghost levels.
309  void MarkOutputsGenerated(vtkInformation* request,
310  vtkInformationVector** inInfoVec,
311  vtkInformationVector* outInfoVec) override;
312 
313 
314  // Remove update/whole extent when resetting pipeline information.
315  void ResetPipelineInformation(int port, vtkInformation*) override;
316 
317  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
318  // request.
320 
325 
326  // did the most recent PUE do anything ?
328 
329 private:
331  void operator=(const vtkStreamingDemandDrivenPipeline&) = delete;
332 };
333 
334 #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:319
vtkDemandDrivenPipeline
Executive supporting on-demand execution.
Definition: vtkDemandDrivenPipeline.h:48
vtkStreamingDemandDrivenPipeline::UpdateExtentRequest
vtkInformation * UpdateExtentRequest
Definition: vtkStreamingDemandDrivenPipeline.h:321
vtkDemandDrivenPipeline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkX3D::direction
Definition: vtkX3D.h:260
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkDemandDrivenPipeline::MarkOutputsGenerated
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::InformationIterator
vtkInformationIterator * InformationIterator
Definition: vtkStreamingDemandDrivenPipeline.h:324
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
Definition: vtkX3D.h:447
vtkDemandDrivenPipeline::ResetPipelineInformation
void ResetPipelineInformation(int, vtkInformation *) override
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkStreamingDemandDrivenPipeline::LastPropogateUpdateExtentShortCircuited
int LastPropogateUpdateExtentShortCircuited
Definition: vtkStreamingDemandDrivenPipeline.h:327
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:80
vtkDemandDrivenPipeline::Update
int Update() override
Bring the algorithm's outputs up-to-date.
vtkDemandDrivenPipeline::ExecuteDataEnd
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::UpdateTimeRequest
vtkInformation * UpdateTimeRequest
Definition: vtkStreamingDemandDrivenPipeline.h:322
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:31
vtkDemandDrivenPipeline::ProcessRequest
int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
vtkDemandDrivenPipeline.h
vtkX3D::extent
Definition: vtkX3D.h:345
vtkInformationIntegerVectorKey
Key for integer vector values.
Definition: vtkInformationIntegerVectorKey.h:31
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkStreamingDemandDrivenPipeline
Executive supporting partial updates.
Definition: vtkStreamingDemandDrivenPipeline.h:46
vtkStreamingDemandDrivenPipeline::TimeDependentInformationRequest
vtkInformation * TimeDependentInformationRequest
Definition: vtkStreamingDemandDrivenPipeline.h:323