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 
50 
51 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkStreamingDemandDrivenPipeline : public vtkDemandDrivenPipeline
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
62  int ProcessRequest(vtkInformation* request,
63  vtkInformationVector** inInfo,
64  vtkInformationVector* outInfo) override;
65 
67 
70  int Update() override;
71  int Update(int port) override;
72  virtual int UpdateWholeExtent();
74 
97  virtual int Update(int port, vtkInformationVector* requests);
98 
104  int PropagateUpdateExtent(int outputPort);
105 
107 
111  int PropagateTime(int outputPort);
112  int UpdateTimeDependentInformation(int outputPort);
114 
116 
121  static int SetWholeExtent(vtkInformation *, int extent[6]);
122  static void GetWholeExtent(vtkInformation *, int extent[6]);
123  static int* GetWholeExtent(vtkInformation *);
125 
127 
135  int SetRequestExactExtent(int port, int flag);
136  int GetRequestExactExtent(int port);
138 
143  static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT();
144 
149  static vtkInformationRequestKey* REQUEST_UPDATE_TIME();
154  static vtkInformationRequestKey* REQUEST_TIME_DEPENDENT_INFORMATION();
155 
161  static vtkInformationIntegerKey* CONTINUE_EXECUTING();
162 
167  static vtkInformationIntegerKey* UPDATE_EXTENT_INITIALIZED();
171  static vtkInformationIntegerVectorKey* UPDATE_EXTENT();
175  static vtkInformationIntegerKey* UPDATE_PIECE_NUMBER();
179  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES();
183  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS();
184 
190  static vtkInformationIntegerVectorKey* COMBINED_UPDATE_EXTENT();
191 
196  static vtkInformationIntegerVectorKey* WHOLE_EXTENT();
197 
204  static vtkInformationIntegerKey* UNRESTRICTED_UPDATE_EXTENT();
205 
210  static vtkInformationIntegerKey* EXACT_EXTENT();
211 
216  static vtkInformationDoubleVectorKey* TIME_STEPS();
217 
222  static vtkInformationDoubleVectorKey* TIME_RANGE();
223 
228  static vtkInformationDoubleKey* UPDATE_TIME_STEP();
229 
236  static vtkInformationIntegerKey* TIME_DEPENDENT_INFORMATION();
237 
242  static vtkInformationDoubleVectorKey *BOUNDS();
243 
245 
248  static void GetUpdateExtent(vtkInformation *, int extent[6]);
249  static int* GetUpdateExtent(vtkInformation *);
251 
252 
257  static int GetUpdatePiece(vtkInformation *);
258  static int GetUpdateNumberOfPieces(vtkInformation *);
259  static int GetUpdateGhostLevel(vtkInformation *);
261 
262 protected:
265 
276  static vtkInformationDoubleKey* PREVIOUS_UPDATE_TIME_STEP();
277 
278  // Does the time request correspond to what is in the data?
279  // Returns 0 if yes, 1 otherwise.
280  virtual int NeedToExecuteBasedOnTime(vtkInformation* outInfo,
281  vtkDataObject* dataObject);
282 
283  // Setup default information on the output after the algorithm
284  // executes information.
285  int ExecuteInformation(vtkInformation* request,
286  vtkInformationVector** inInfoVec,
287  vtkInformationVector* outInfoVec) override;
288 
289  // Copy information for the given request.
291  vtkInformationVector** inInfoVec,
292  vtkInformationVector* outInfoVec) override;
293 
294  // Helper to check output information before propagating it to inputs.
295  virtual int VerifyOutputInformation(int outputPort,
296  vtkInformationVector** inInfoVec,
297  vtkInformationVector* outInfoVec);
298 
299 
300  // Override this check to account for update extent.
301  int NeedToExecuteData(int outputPort,
302  vtkInformationVector** inInfoVec,
303  vtkInformationVector* outInfoVec) override;
304 
305  // Override these to handle the continue-executing option.
306  void ExecuteDataStart(vtkInformation* request,
307  vtkInformationVector** inInfoVec,
308  vtkInformationVector* outInfoVec) override;
309  void ExecuteDataEnd(vtkInformation* request,
310  vtkInformationVector** inInfoVec,
311  vtkInformationVector* outInfoVec) override;
312 
313  // Override this to handle cropping and ghost levels.
314  void MarkOutputsGenerated(vtkInformation* request,
315  vtkInformationVector** inInfoVec,
316  vtkInformationVector* outInfoVec) override;
317 
318 
319  // Remove update/whole extent when resetting pipeline information.
320  void ResetPipelineInformation(int port, vtkInformation*) override;
321 
322  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
323  // request.
325 
327 
328  // did the most recent PUE do anything ?
330 
331 private:
333  void operator=(const vtkStreamingDemandDrivenPipeline&) = delete;
334 };
335 
336 #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.
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
Key for string values in vtkInformation.
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
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.
virtual void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Key for vtkObjectBase values.
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
void ResetPipelineInformation(int, vtkInformation *) override
static vtkDemandDrivenPipeline * New()
int Update() override
Bring the algorithm's outputs up-to-date.
Key for double values in vtkInformation.
int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
Store zero or more vtkInformation instances.
Executive supporting partial updates.
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
general representation of visualization data
Definition: vtkDataObject.h:64
Key for vtkIdType values in vtkInformation.