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 =========================================================================*/
31 #ifndef vtkStreamingDemandDrivenPipeline_h
32 #define vtkStreamingDemandDrivenPipeline_h
33 
34 #include "vtkCommonExecutionModelModule.h" // For export macro
36 
37 #define VTK_UPDATE_EXTENT_COMBINE 1
38 #define VTK_UPDATE_EXTENT_REPLACE 2
39 
49 
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
60  virtual int ProcessRequest(vtkInformation* request,
61  vtkInformationVector** inInfo,
62  vtkInformationVector* outInfo);
64 
66 
67  virtual int Update();
68  virtual int Update(int port);
69  virtual int UpdateWholeExtent();
71 
74  int PropagateUpdateExtent(int outputPort);
75 
76 
78 
80  int PropagateTime(int outputPort);
81  int UpdateTimeDependentInformation(int outputPort);
83 
85 
88  static int SetWholeExtent(vtkInformation *, int extent[6]);
89  static void GetWholeExtent(vtkInformation *, int extent[6]);
92 
94 
101 
103 
104  int SetUpdateExtent(int port, int extent[6]);
105  int SetUpdateExtent(int port, int x0, int x1, int y0, int y1, int z0, int z1);
106  static int SetUpdateExtent(vtkInformation *, int extent[6]);
107  static void GetUpdateExtent(vtkInformation *, int extent[6]);
110 
112 
115  int piece, int numPieces, int ghostLevel);
117  int piece, int numPieces, int ghostLevel);
118  static int SetUpdatePiece(vtkInformation *, int piece);
125 
127 
128  int SetUpdateTimeStep(int port, double time);
129  static int SetUpdateTimeStep(vtkInformation *, double time);
131 
133 
139  int SetRequestExactExtent(int port, int flag);
142 
146 
153 
157 
169 
174 
178 
183 
187 
190 
194 
197 
202 
205 
206 protected:
209 
218 
219  // Does the time request correspond to what is in the data?
220  // Returns 0 if yes, 1 otherwise.
222  vtkDataObject* dataObject);
223 
224  // Setup default information on the output after the algorithm
225  // executes information.
226  virtual int ExecuteInformation(vtkInformation* request,
227  vtkInformationVector** inInfoVec,
228  vtkInformationVector* outInfoVec);
229 
230  // Copy information for the given request.
231  virtual void CopyDefaultInformation(vtkInformation* request, int direction,
232  vtkInformationVector** inInfoVec,
233  vtkInformationVector* outInfoVec);
234 
235  // Helper to check output information before propagating it to inputs.
236  virtual int VerifyOutputInformation(int outputPort,
237  vtkInformationVector** inInfoVec,
238  vtkInformationVector* outInfoVec);
239 
240 
241  // Override this check to account for update extent.
242  virtual int NeedToExecuteData(int outputPort,
243  vtkInformationVector** inInfoVec,
244  vtkInformationVector* outInfoVec);
245 
246  // Override these to handle the continue-executing option.
247  virtual void ExecuteDataStart(vtkInformation* request,
248  vtkInformationVector** inInfoVec,
249  vtkInformationVector* outInfoVec);
250  virtual void ExecuteDataEnd(vtkInformation* request,
251  vtkInformationVector** inInfoVec,
252  vtkInformationVector* outInfoVec);
253 
254  // Override this to handle cropping and ghost levels.
255  virtual void MarkOutputsGenerated(vtkInformation* request,
256  vtkInformationVector** inInfoVec,
257  vtkInformationVector* outInfoVec);
258 
259 
260  // Remove update/whole extent when resetting pipeline information.
262 
263  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
264  // request.
266 
268 
269  // did the most recent PUE do anything ?
271 
272 private:
274  void operator=(const vtkStreamingDemandDrivenPipeline&); // Not implemented.
275 };
276 
277 #endif
vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTING
static vtkInformationIntegerKey * CONTINUE_EXECUTING()
vtkStreamingDemandDrivenPipeline::vtkStreamingDemandDrivenPipeline
vtkStreamingDemandDrivenPipeline()
vtkStreamingDemandDrivenPipeline::SetRequestExactExtent
int SetRequestExactExtent(int port, int flag)
vtkStreamingDemandDrivenPipeline::SetUpdateExtent
static int SetUpdateExtent(vtkInformation *, int extent[6])
vtkInformationIdTypeKey
Key for vtkIdType values in vtkInformation.
Definition: vtkInformationIdTypeKey.h:31
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:34
vtkStreamingDemandDrivenPipeline::TIME_DEPENDENT_INFORMATION
static vtkInformationIntegerKey * TIME_DEPENDENT_INFORMATION()
vtkStreamingDemandDrivenPipeline::ContinueExecuting
int ContinueExecuting
Definition: vtkStreamingDemandDrivenPipeline.h:265
vtkStreamingDemandDrivenPipeline::Update
virtual int Update(int port)
vtkDemandDrivenPipeline
Executive supporting on-demand execution.
Definition: vtkDemandDrivenPipeline.h:57
vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT_INITIALIZED
static vtkInformationIntegerKey * UPDATE_EXTENT_INITIALIZED()
VTKCOMMONEXECUTIONMODEL_EXPORT
#define VTKCOMMONEXECUTIONMODEL_EXPORT
Definition: vtkCommonExecutionModelModule.h:15
vtkStreamingDemandDrivenPipeline::UNRESTRICTED_UPDATE_EXTENT
static vtkInformationIntegerKey * UNRESTRICTED_UPDATE_EXTENT()
vtkStreamingDemandDrivenPipeline::NeedToExecuteData
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::PropagateUpdateExtent
int PropagateUpdateExtent(int outputPort)
vtkStreamingDemandDrivenPipeline::UpdateExtentRequest
vtkInformation * UpdateExtentRequest
Definition: vtkStreamingDemandDrivenPipeline.h:267
vtkStreamingDemandDrivenPipeline::SetUpdateNumberOfPieces
static int SetUpdateNumberOfPieces(vtkInformation *, int n)
vtkStreamingDemandDrivenPipeline::SetUpdateExtentToWholeExtent
int SetUpdateExtentToWholeExtent(int port)
vtkStreamingDemandDrivenPipeline::VerifyOutputInformation
virtual int VerifyOutputInformation(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::GetWholeExtent
static void GetWholeExtent(vtkInformation *, int extent[6])
vtkStreamingDemandDrivenPipeline::PREVIOUS_UPDATE_TIME_STEP
static vtkInformationDoubleKey * PREVIOUS_UPDATE_TIME_STEP()
vtkStreamingDemandDrivenPipeline::REQUEST_TIME_DEPENDENT_INFORMATION
static vtkInformationRequestKey * REQUEST_TIME_DEPENDENT_INFORMATION()
vtkX3D::direction
@ direction
Definition: vtkX3D.h:260
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkStreamingDemandDrivenPipeline::SetUpdateGhostLevel
static int SetUpdateGhostLevel(vtkInformation *, int n)
vtkStreamingDemandDrivenPipeline::BOUNDS
static vtkInformationDoubleVectorKey * BOUNDS()
vtkStreamingDemandDrivenPipeline::SetUpdateTimeStep
int SetUpdateTimeStep(int port, double time)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkStreamingDemandDrivenPipeline::SetWholeExtent
static int SetWholeExtent(vtkInformation *, int extent[6])
vtkgl::n
GLclampd n
Definition: vtkgl.h:14370
vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_EXTENT
static vtkInformationRequestKey * REQUEST_UPDATE_EXTENT()
vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT
static vtkInformationIntegerVectorKey * UPDATE_EXTENT()
vtkStreamingDemandDrivenPipeline::SetUpdateExtent
int SetUpdateExtent(int port, int piece, int numPieces, int ghostLevel)
vtkCommonExecutionModelModule.h
vtkX3D::time
@ time
Definition: vtkX3D.h:497
vtkStreamingDemandDrivenPipeline::~vtkStreamingDemandDrivenPipeline
~vtkStreamingDemandDrivenPipeline()
vtkStreamingDemandDrivenPipeline::EXACT_EXTENT
static vtkInformationIntegerKey * EXACT_EXTENT()
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:34
vtkStreamingDemandDrivenPipeline::ExecuteDataStart
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::GetUpdateNumberOfPieces
static int GetUpdateNumberOfPieces(vtkInformation *)
vtkStreamingDemandDrivenPipeline::Update
virtual int Update()
vtkStreamingDemandDrivenPipeline::ExecuteDataEnd
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::COMBINED_UPDATE_EXTENT
static vtkInformationIntegerVectorKey * COMBINED_UPDATE_EXTENT()
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkStreamingDemandDrivenPipeline::GetUpdateExtent
static int * GetUpdateExtent(vtkInformation *)
vtkStreamingDemandDrivenPipeline::UpdateWholeExtent
virtual int UpdateWholeExtent()
vtkStreamingDemandDrivenPipeline::CopyDefaultInformation
virtual void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::New
static vtkStreamingDemandDrivenPipeline * New()
vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS
static vtkInformationIntegerKey * UPDATE_NUMBER_OF_GHOST_LEVELS()
vtkStreamingDemandDrivenPipeline::SetUpdateTimeStep
static int SetUpdateTimeStep(vtkInformation *, double time)
vtkStreamingDemandDrivenPipeline::TIME_STEPS
static vtkInformationDoubleVectorKey * TIME_STEPS()
vtkStreamingDemandDrivenPipeline::LastPropogateUpdateExtentShortCircuited
int LastPropogateUpdateExtentShortCircuited
Definition: vtkStreamingDemandDrivenPipeline.h:270
vtkInformationObjectBaseKey
Key for vtkObjectBase values.
Definition: vtkInformationObjectBaseKey.h:33
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:34
vtkStreamingDemandDrivenPipeline::UpdateTimeDependentInformation
int UpdateTimeDependentInformation(int outputPort)
vtkStreamingDemandDrivenPipeline::GetUpdateGhostLevel
static int GetUpdateGhostLevel(vtkInformation *)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkStreamingDemandDrivenPipeline::SetUpdateExtent
int SetUpdateExtent(int port, int extent[6])
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT
static vtkInformationIntegerVectorKey * WHOLE_EXTENT()
vtkInformationRequestKey
Key for pointer to pointer.
Definition: vtkInformationRequestKey.h:31
vtkStreamingDemandDrivenPipeline::SetUpdateExtentToWholeExtent
static int SetUpdateExtentToWholeExtent(vtkInformation *)
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP
static vtkInformationDoubleKey * UPDATE_TIME_STEP()
vtkInformationUnsignedLongKey
Key for unsigned long values in vtkInformation.
Definition: vtkInformationUnsignedLongKey.h:31
vtkStreamingDemandDrivenPipeline::NeedToExecuteBasedOnTime
virtual int NeedToExecuteBasedOnTime(vtkInformation *outInfo, vtkDataObject *dataObject)
vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_TIME
static vtkInformationRequestKey * REQUEST_UPDATE_TIME()
vtkStreamingDemandDrivenPipeline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkStreamingDemandDrivenPipeline::GetWholeExtent
static int * GetWholeExtent(vtkInformation *)
vtkStreamingDemandDrivenPipeline::SetUpdatePiece
static int SetUpdatePiece(vtkInformation *, int piece)
vtkStreamingDemandDrivenPipeline::ResetPipelineInformation
virtual void ResetPipelineInformation(int port, vtkInformation *)
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:34
vtkStreamingDemandDrivenPipeline::GetUpdatePiece
static int GetUpdatePiece(vtkInformation *)
vtkStreamingDemandDrivenPipeline::SetUpdateExtent
int SetUpdateExtent(int port, int x0, int x1, int y0, int y1, int z0, int z1)
vtkDemandDrivenPipeline.h
vtkStreamingDemandDrivenPipeline::TIME_RANGE
static vtkInformationDoubleVectorKey * TIME_RANGE()
vtkStreamingDemandDrivenPipeline::MarkOutputsGenerated
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkStreamingDemandDrivenPipeline::ExecuteInformation
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkStreamingDemandDrivenPipeline::PropagateTime
int PropagateTime(int outputPort)
vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER
static vtkInformationIntegerKey * UPDATE_PIECE_NUMBER()
vtkInformationIntegerVectorKey
Key for integer vector values.
Definition: vtkInformationIntegerVectorKey.h:31
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkStreamingDemandDrivenPipeline::SetUpdateExtent
static int SetUpdateExtent(vtkInformation *, int piece, int numPieces, int ghostLevel)
vtkStreamingDemandDrivenPipeline
Executive supporting partial updates.
Definition: vtkStreamingDemandDrivenPipeline.h:51
vtkStreamingDemandDrivenPipeline::ProcessRequest
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkStreamingDemandDrivenPipeline::GetUpdateExtent
static void GetUpdateExtent(vtkInformation *, int extent[6])