VTK: Common/ExecutionModel/vtkDemandDrivenPipeline.h Source File

| VTK 9.3.1

vtkDemandDrivenPipeline.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
27 #ifndef vtkDemandDrivenPipeline_h
28 #define vtkDemandDrivenPipeline_h
29
30 #include "vtkCommonExecutionModelModule.h" // For export macro
31 #include "vtkExecutive.h"
32
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkAbstractArray;
35 class vtkDataArray;
36 class vtkDataSetAttributes;
37 class vtkDemandDrivenPipelineInternals;
38 class vtkFieldData;
39 class vtkInformation;
40 class vtkInformationIntegerKey;
41 class vtkInformationVector;
42 class vtkInformationKeyVectorKey;
43 class vtkInformationUnsignedLongKey;
44
51
52 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkDemandDrivenPipeline : public vtkExecutive
53 {
54 public:
55 static vtkDemandDrivenPipeline* New();
56 vtkTypeMacro(vtkDemandDrivenPipeline, vtkExecutive);
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
63 vtkTypeBool ProcessRequest(
64 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
65
69 int ComputePipelineMTime(vtkInformation* request, vtkInformationVector** inInfoVec,
70 vtkInformationVector* outInfoVec, int requestFromOutputPort, vtkMTimeType* mtime) override;
71
73
77 vtkTypeBool Update() override;
78 vtkTypeBool Update(int port) override;
80
82
85 vtkGetMacro(PipelineMTime, vtkMTimeType);
87
92 virtual int SetReleaseDataFlag(int port, vtkTypeBool n);
93
97 virtual vtkTypeBool GetReleaseDataFlag(int port);
98
102 virtual int UpdatePipelineMTime();
103
109 int UpdateDataObject() override;
110
114 int UpdateInformation() override;
115
121 virtual int UpdateData(int outputPort);
122
127 static vtkInformationRequestKey* REQUEST_DATA_OBJECT();
128
133 static vtkInformationRequestKey* REQUEST_INFORMATION();
134
139 static vtkInformationRequestKey* REQUEST_DATA();
140
146 static vtkInformationRequestKey* REQUEST_DATA_NOT_GENERATED();
147
153 static vtkInformationIntegerKey* RELEASE_DATA();
154
161 static vtkInformationIntegerKey* DATA_NOT_GENERATED();
162
168 static vtkDataObject* NewDataObject(const char* type);
169
170 protected:
171 vtkDemandDrivenPipeline();
172 ~vtkDemandDrivenPipeline() override;
173
174 // Helper methods to send requests to the algorithm.
175 virtual int ExecuteDataObject(
176 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
177 virtual int ExecuteInformation(
178 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
179 virtual int ExecuteData(
180 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
181
182 // Reset the pipeline update values in the given output information object.
183 void ResetPipelineInformation(int, vtkInformation*) override;
184
185 // Check whether the data object in the pipeline information for an
186 // output port exists and has a valid type.
187 virtual int CheckDataObject(int port, vtkInformationVector* outInfo);
188
189 // Input connection validity checkers.
190 int InputCountIsValid(vtkInformationVector**);
191 int InputCountIsValid(int port, vtkInformationVector**);
192 int InputTypeIsValid(vtkInformationVector**);
193 int InputTypeIsValid(int port, vtkInformationVector**);
194 virtual int InputTypeIsValid(int port, int index, vtkInformationVector**);
195 int InputFieldsAreValid(vtkInformationVector**);
196 int InputFieldsAreValid(int port, vtkInformationVector**);
197 virtual int InputFieldsAreValid(int port, int index, vtkInformationVector**);
198
199 // Field existence checkers.
200 int DataSetAttributeExists(vtkDataSetAttributes* dsa, vtkInformation* field);
201 int FieldArrayExists(vtkFieldData* data, vtkInformation* field);
202 int ArrayIsValid(vtkAbstractArray* array, vtkInformation* field);
203
204 // Input port information checkers.
205 int InputIsOptional(int port);
206 int InputIsRepeatable(int port);
207
208 // Decide whether the output data need to be generated.
209 virtual int NeedToExecuteData(
210 int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
211
212 // Handle before/after operations for ExecuteData method.
213 virtual void ExecuteDataStart(
214 vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
215 virtual void ExecuteDataEnd(
216 vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
217 virtual void MarkOutputsGenerated(
218 vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
219
220 // Largest MTime of any algorithm on this executive or preceding
221 // executives.
222 vtkMTimeType PipelineMTime;
223
224 // Time when information or data were last generated.
225 vtkTimeStamp DataObjectTime;
226 vtkTimeStamp InformationTime;
227 vtkTimeStamp DataTime;
228
229 friend class vtkCompositeDataPipeline;
230
231 vtkInformation* InfoRequest;
232 vtkInformation* DataObjectRequest;
233 vtkInformation* DataRequest;
234
235 private:
236 vtkDemandDrivenPipeline(const vtkDemandDrivenPipeline&) = delete;
237 void operator=(const vtkDemandDrivenPipeline&) = delete;
238 };
239
240 VTK_ABI_NAMESPACE_END
241 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkCompositeDataPipeline
Executive supporting composite datasets.
Definition: vtkCompositeDataPipeline.h:59
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:65
vtkDemandDrivenPipeline
Executive supporting on-demand execution.
Definition: vtkDemandDrivenPipeline.h:53
vtkDemandDrivenPipeline::ResetPipelineInformation
void ResetPipelineInformation(int, vtkInformation *) override
vtkDemandDrivenPipeline::ComputePipelineMTime
int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime) override
Implement the pipeline modified time request.
vtkDemandDrivenPipeline::UpdateInformation
int UpdateInformation() override
Bring the output information up to date.
vtkDemandDrivenPipeline::DataObjectTime
vtkTimeStamp DataObjectTime
Definition: vtkDemandDrivenPipeline.h:225
vtkDemandDrivenPipeline::InputIsOptional
int InputIsOptional(int port)
vtkDemandDrivenPipeline::UpdatePipelineMTime
virtual int UpdatePipelineMTime()
Bring the PipelineMTime up to date.
vtkDemandDrivenPipeline::InputCountIsValid
int InputCountIsValid(int port, vtkInformationVector **)
vtkDemandDrivenPipeline::MarkOutputsGenerated
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkDemandDrivenPipeline::DataRequest
vtkInformation * DataRequest
Definition: vtkDemandDrivenPipeline.h:233
vtkDemandDrivenPipeline::UpdateData
virtual int UpdateData(int outputPort)
Bring the output data up to date.
vtkDemandDrivenPipeline::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
vtkDemandDrivenPipeline::ExecuteInformation
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::InputTypeIsValid
int InputTypeIsValid(vtkInformationVector **)
vtkDemandDrivenPipeline::ExecuteData
virtual int ExecuteData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::New
static vtkDemandDrivenPipeline * New()
vtkDemandDrivenPipeline::ArrayIsValid
int ArrayIsValid(vtkAbstractArray *array, vtkInformation *field)
vtkDemandDrivenPipeline::InputFieldsAreValid
int InputFieldsAreValid(vtkInformationVector **)
vtkDemandDrivenPipeline::CheckDataObject
virtual int CheckDataObject(int port, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::ExecuteDataStart
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkDemandDrivenPipeline::ExecuteDataEnd
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkDemandDrivenPipeline::InfoRequest
vtkInformation * InfoRequest
Definition: vtkDemandDrivenPipeline.h:231
vtkDemandDrivenPipeline::GetReleaseDataFlag
virtual vtkTypeBool GetReleaseDataFlag(int port)
Get whether the given output port releases data when it is consumed.
vtkDemandDrivenPipeline::Update
vtkTypeBool Update() override
Bring the algorithm's outputs up-to-date.
vtkDemandDrivenPipeline::DataTime
vtkTimeStamp DataTime
Definition: vtkDemandDrivenPipeline.h:227
vtkDemandDrivenPipeline::InputCountIsValid
int InputCountIsValid(vtkInformationVector **)
vtkDemandDrivenPipeline::FieldArrayExists
int FieldArrayExists(vtkFieldData *data, vtkInformation *field)
vtkDemandDrivenPipeline::SetReleaseDataFlag
virtual int SetReleaseDataFlag(int port, vtkTypeBool n)
Set whether the given output port releases data when it is consumed.
vtkDemandDrivenPipeline::Update
vtkTypeBool Update(int port) override
Bring the algorithm's outputs up-to-date.
vtkDemandDrivenPipeline::PipelineMTime
vtkMTimeType PipelineMTime
Definition: vtkDemandDrivenPipeline.h:222
vtkDemandDrivenPipeline::DataObjectRequest
vtkInformation * DataObjectRequest
Definition: vtkDemandDrivenPipeline.h:232
vtkDemandDrivenPipeline::InputTypeIsValid
virtual int InputTypeIsValid(int port, int index, vtkInformationVector **)
vtkDemandDrivenPipeline::vtkDemandDrivenPipeline
vtkDemandDrivenPipeline()
vtkDemandDrivenPipeline::InputTypeIsValid
int InputTypeIsValid(int port, vtkInformationVector **)
vtkDemandDrivenPipeline::NeedToExecuteData
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkDemandDrivenPipeline::InputFieldsAreValid
virtual int InputFieldsAreValid(int port, int index, vtkInformationVector **)
vtkDemandDrivenPipeline::ExecuteDataObject
virtual int ExecuteDataObject(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::UpdateDataObject
int UpdateDataObject() override
Bring the output data object's existence up to date.
vtkDemandDrivenPipeline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDemandDrivenPipeline::InputFieldsAreValid
int InputFieldsAreValid(int port, vtkInformationVector **)
vtkDemandDrivenPipeline::~vtkDemandDrivenPipeline
~vtkDemandDrivenPipeline() override
vtkDemandDrivenPipeline::DataSetAttributeExists
int DataSetAttributeExists(vtkDataSetAttributes *dsa, vtkInformation *field)
vtkDemandDrivenPipeline::NewDataObject
static vtkDataObject * NewDataObject(const char *type)
Create (New) and return a data object of the given type.
vtkDemandDrivenPipeline::InformationTime
vtkTimeStamp InformationTime
Definition: vtkDemandDrivenPipeline.h:226
vtkDemandDrivenPipeline::InputIsRepeatable
int InputIsRepeatable(int port)
vtkExecutive
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:48
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:61
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:24
vtkInformationKeyVectorKey
Key for vector-of-keys values.
Definition: vtkInformationKeyVectorKey.h:21
vtkInformationRequestKey
Key for pointer to pointer.
Definition: vtkInformationRequestKey.h:21
vtkInformationUnsignedLongKey
Key for unsigned long values in vtkInformation.
Definition: vtkInformationUnsignedLongKey.h:24
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkDemandDrivenPipeline::REQUEST_INFORMATION
static vtkInformationRequestKey * REQUEST_INFORMATION()
Key defining a request to make sure the output information is up to date.
vtkDemandDrivenPipeline::REQUEST_DATA_NOT_GENERATED
static vtkInformationRequestKey * REQUEST_DATA_NOT_GENERATED()
Key defining a request to mark outputs that will NOT be generated during a REQUEST_DATA.
vtkDemandDrivenPipeline::RELEASE_DATA
static vtkInformationIntegerKey * RELEASE_DATA()
Key to specify in pipeline information the request that data be released after it is used.
vtkDemandDrivenPipeline::DATA_NOT_GENERATED
static vtkInformationIntegerKey * DATA_NOT_GENERATED()
Key to store a mark for an output that will not be generated.
vtkDemandDrivenPipeline::REQUEST_DATA
static vtkInformationRequestKey * REQUEST_DATA()
Key defining a request to make sure the output data are up to date.
vtkDemandDrivenPipeline::REQUEST_DATA_OBJECT
static vtkInformationRequestKey * REQUEST_DATA_OBJECT()
Key defining a request to make sure the output data objects exist.
vtkX3D::field
@ field
Definition: vtkX3D.h:177
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkExecutive.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270