VTK
vtkDemandDrivenPipeline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDemandDrivenPipeline.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 vtkDemandDrivenPipeline_h
33 #define vtkDemandDrivenPipeline_h
34 
35 #include "vtkCommonExecutionModelModule.h" // For export macro
36 #include "vtkExecutive.h"
37 
38 class vtkAbstractArray;
39 class vtkDataArray;
41 class vtkDemandDrivenPipelineInternals;
42 class vtkFieldData;
43 class vtkInformation;
48 
55 
57 {
58 public:
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
64 
66  virtual int ProcessRequest(vtkInformation* request,
67  vtkInformationVector** inInfo,
68  vtkInformationVector* outInfo);
70 
72 
73  virtual int
75  vtkInformationVector** inInfoVec,
76  vtkInformationVector* outInfoVec,
77  int requestFromOutputPort,
78  unsigned long* mtime);
80 
82 
84  virtual int Update();
85  virtual int Update(int port);
87 
89 
90  vtkGetMacro(PipelineMTime, unsigned long);
92 
95  virtual int SetReleaseDataFlag(int port, int n);
96 
98  virtual int GetReleaseDataFlag(int port);
99 
101  virtual int UpdatePipelineMTime();
102 
106  virtual int UpdateDataObject();
107 
109  virtual int UpdateInformation();
110 
114  virtual int UpdateData(int outputPort);
115 
119 
123 
127 
131 
135 
140 
144  static vtkDataObject* NewDataObject(const char* type);
145 
146 protected:
149 
150  // Helper methods to send requests to the algorithm.
151  virtual int ExecuteDataObject(vtkInformation* request,
152  vtkInformationVector** inInfo,
153  vtkInformationVector* outInfo);
154  virtual int ExecuteInformation(vtkInformation* request,
155  vtkInformationVector** inInfo,
156  vtkInformationVector* outInfo);
157  virtual int ExecuteData(vtkInformation* request,
158  vtkInformationVector** inInfo,
159  vtkInformationVector* outInfo);
160 
161 
162  // Reset the pipeline update values in the given output information object.
164 
165  // Check whether the data object in the pipeline information for an
166  // output port exists and has a valid type.
167  virtual int CheckDataObject(int port, vtkInformationVector* outInfo);
168 
169 
170  // Input connection validity checkers.
179 
180  // Field existence checkers.
184 
185  // Input port information checkers.
188 
189  // Decide whether the output data need to be generated.
190  virtual int NeedToExecuteData(int outputPort,
191  vtkInformationVector** inInfoVec,
192  vtkInformationVector* outInfoVec);
193 
194  // Handle before/after operations for ExecuteData method.
195  virtual void ExecuteDataStart(vtkInformation* request,
196  vtkInformationVector** inInfoVec,
197  vtkInformationVector* outInfoVec);
198  virtual void ExecuteDataEnd(vtkInformation* request,
199  vtkInformationVector** inInfoVec,
200  vtkInformationVector* outInfoVec);
201  virtual void MarkOutputsGenerated(vtkInformation* request,
202  vtkInformationVector** inInfoVec,
203  vtkInformationVector* outInfoVec);
204 
205  // Largest MTime of any algorithm on this executive or preceding
206  // executives.
207  unsigned long PipelineMTime;
208 
209  // Time when information or data were last generated.
213 
214 //BTX
216 //ETX
217 
218 
222 
223 private:
224  vtkDemandDrivenPipeline(const vtkDemandDrivenPipeline&); // Not implemented.
225  void operator=(const vtkDemandDrivenPipeline&); // Not implemented.
226 };
227 
228 #endif
vtkDemandDrivenPipeline::InputIsRepeatable
int InputIsRepeatable(int port)
vtkgl::data
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
vtkDemandDrivenPipeline
Executive supporting on-demand execution.
Definition: vtkDemandDrivenPipeline.h:57
VTKCOMMONEXECUTIONMODEL_EXPORT
#define VTKCOMMONEXECUTIONMODEL_EXPORT
Definition: vtkCommonExecutionModelModule.h:15
vtkInformationKeyVectorKey
Key for vector-of-keys values.
Definition: vtkInformationKeyVectorKey.h:31
vtkDemandDrivenPipeline::ResetPipelineInformation
virtual void ResetPipelineInformation(int, vtkInformation *)
vtkDemandDrivenPipeline::DataRequest
vtkInformation * DataRequest
Definition: vtkDemandDrivenPipeline.h:221
vtkDemandDrivenPipeline::vtkDemandDrivenPipeline
vtkDemandDrivenPipeline()
vtkDemandDrivenPipeline::ArrayIsValid
int ArrayIsValid(vtkAbstractArray *array, vtkInformation *field)
vtkDemandDrivenPipeline::REQUEST_INFORMATION
static vtkInformationRequestKey * REQUEST_INFORMATION()
vtkDemandDrivenPipeline::DataObjectTime
vtkTimeStamp DataObjectTime
Definition: vtkDemandDrivenPipeline.h:210
vtkDemandDrivenPipeline::InputTypeIsValid
virtual int InputTypeIsValid(int port, int index, vtkInformationVector **)
vtkDemandDrivenPipeline::InputTypeIsValid
int InputTypeIsValid(int port, vtkInformationVector **)
vtkDemandDrivenPipeline::PipelineMTime
unsigned long PipelineMTime
Definition: vtkDemandDrivenPipeline.h:207
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:58
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkDemandDrivenPipeline::REQUEST_DATA_NOT_GENERATED
static vtkInformationRequestKey * REQUEST_DATA_NOT_GENERATED()
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkDemandDrivenPipeline::ExecuteData
virtual int ExecuteData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::ProcessRequest
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::MarkOutputsGenerated
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkgl::n
GLclampd n
Definition: vtkgl.h:14370
vtkDemandDrivenPipeline::DATA_NOT_GENERATED
static vtkInformationIntegerKey * DATA_NOT_GENERATED()
vtkExecutive.h
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkCommonExecutionModelModule.h
vtkDemandDrivenPipeline::REQUEST_DATA_OBJECT
static vtkInformationRequestKey * REQUEST_DATA_OBJECT()
vtkDemandDrivenPipeline::ExecuteInformation
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::ComputePipelineMTime
virtual int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, unsigned long *mtime)
vtkDemandDrivenPipeline::ExecuteDataStart
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:56
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkDemandDrivenPipeline::InfoRequest
vtkInformation * InfoRequest
Definition: vtkDemandDrivenPipeline.h:219
vtkExecutive
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:52
vtkDemandDrivenPipeline::NewDataObject
static vtkDataObject * NewDataObject(const char *type)
vtkCompositeDataPipeline
Executive supporting composite datasets.
Definition: vtkCompositeDataPipeline.h:66
vtkDemandDrivenPipeline::REQUEST_DATA
static vtkInformationRequestKey * REQUEST_DATA()
vtkDemandDrivenPipeline::UpdateInformation
virtual int UpdateInformation()
vtkDemandDrivenPipeline::UpdatePipelineMTime
virtual int UpdatePipelineMTime()
vtkDemandDrivenPipeline::InputCountIsValid
int InputCountIsValid(int port, vtkInformationVector **)
vtkDemandDrivenPipeline::~vtkDemandDrivenPipeline
~vtkDemandDrivenPipeline()
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:34
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkX3D::field
@ field
Definition: vtkX3D.h:177
vtkDemandDrivenPipeline::Update
virtual int Update()
vtkDemandDrivenPipeline::FieldArrayExists
int FieldArrayExists(vtkFieldData *data, vtkInformation *field)
vtkDemandDrivenPipeline::InformationTime
vtkTimeStamp InformationTime
Definition: vtkDemandDrivenPipeline.h:211
vtkInformationRequestKey
Key for pointer to pointer.
Definition: vtkInformationRequestKey.h:31
vtkDemandDrivenPipeline::New
static vtkDemandDrivenPipeline * New()
vtkDemandDrivenPipeline::ExecuteDataObject
virtual int ExecuteDataObject(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkDemandDrivenPipeline::Update
virtual int Update(int port)
vtkInformationUnsignedLongKey
Key for unsigned long values in vtkInformation.
Definition: vtkInformationUnsignedLongKey.h:31
vtkDemandDrivenPipeline::DataObjectRequest
vtkInformation * DataObjectRequest
Definition: vtkDemandDrivenPipeline.h:220
vtkDemandDrivenPipeline::NeedToExecuteData
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkDemandDrivenPipeline::InputIsOptional
int InputIsOptional(int port)
vtkDemandDrivenPipeline::InputTypeIsValid
int InputTypeIsValid(vtkInformationVector **)
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:65
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkDemandDrivenPipeline::InputFieldsAreValid
int InputFieldsAreValid(int port, vtkInformationVector **)
vtkDemandDrivenPipeline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkDemandDrivenPipeline::ExecuteDataEnd
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkDemandDrivenPipeline::InputFieldsAreValid
int InputFieldsAreValid(vtkInformationVector **)
vtkDemandDrivenPipeline::InputCountIsValid
int InputCountIsValid(vtkInformationVector **)
vtkDemandDrivenPipeline::SetReleaseDataFlag
virtual int SetReleaseDataFlag(int port, int n)
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkDemandDrivenPipeline::UpdateData
virtual int UpdateData(int outputPort)
vtkDemandDrivenPipeline::UpdateDataObject
virtual int UpdateDataObject()
vtkDemandDrivenPipeline::DataTime
vtkTimeStamp DataTime
Definition: vtkDemandDrivenPipeline.h:212
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
vtkDemandDrivenPipeline::InputFieldsAreValid
virtual int InputFieldsAreValid(int port, int index, vtkInformationVector **)
vtkDemandDrivenPipeline::DataSetAttributeExists
int DataSetAttributeExists(vtkDataSetAttributes *dsa, vtkInformation *field)
vtkDemandDrivenPipeline::GetReleaseDataFlag
virtual int GetReleaseDataFlag(int port)
vtkDemandDrivenPipeline::RELEASE_DATA
static vtkInformationIntegerKey * RELEASE_DATA()
vtkDemandDrivenPipeline::CheckDataObject
virtual int CheckDataObject(int port, vtkInformationVector *outInfo)