VTK  9.1.0
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 =========================================================================*/
30 #ifndef vtkDemandDrivenPipeline_h
31 #define vtkDemandDrivenPipeline_h
32 
33 #include "vtkCommonExecutionModelModule.h" // For export macro
34 #include "vtkExecutive.h"
35 
36 class vtkAbstractArray;
37 class vtkDataArray;
39 class vtkDemandDrivenPipelineInternals;
40 class vtkFieldData;
41 class vtkInformation;
46 
53 
54 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkDemandDrivenPipeline : public vtkExecutive
55 {
56 public:
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
66  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
67 
72  vtkInformationVector* outInfoVec, int requestFromOutputPort, vtkMTimeType* mtime) override;
73 
75 
79  vtkTypeBool Update() override;
80  vtkTypeBool Update(int port) override;
82 
84 
87  vtkGetMacro(PipelineMTime, vtkMTimeType);
89 
94  virtual int SetReleaseDataFlag(int port, int n);
95 
99  virtual int GetReleaseDataFlag(int port);
100 
104  virtual int UpdatePipelineMTime();
105 
111  int UpdateDataObject() override;
112 
116  int UpdateInformation() override;
117 
123  virtual int UpdateData(int outputPort);
124 
130 
136 
142 
149 
156 
164 
170  static vtkDataObject* NewDataObject(const char* type);
171 
172 protected:
175 
176  // Helper methods to send requests to the algorithm.
177  virtual int ExecuteDataObject(
178  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
179  virtual int ExecuteInformation(
180  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
181  virtual int ExecuteData(
182  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
183 
184  // Reset the pipeline update values in the given output information object.
186 
187  // Check whether the data object in the pipeline information for an
188  // output port exists and has a valid type.
189  virtual int CheckDataObject(int port, vtkInformationVector* outInfo);
190 
191  // Input connection validity checkers.
200 
201  // Field existence checkers.
205 
206  // Input port information checkers.
209 
210  // Decide whether the output data need to be generated.
211  virtual int NeedToExecuteData(
212  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
213 
214  // Handle before/after operations for ExecuteData method.
215  virtual void ExecuteDataStart(
216  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
217  virtual void ExecuteDataEnd(
218  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
219  virtual void MarkOutputsGenerated(
220  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
221 
222  // Largest MTime of any algorithm on this executive or preceding
223  // executives.
225 
226  // Time when information or data were last generated.
230 
232 
236 
237 private:
239  void operator=(const vtkDemandDrivenPipeline&) = delete;
240 };
241 
242 #endif
vtkDemandDrivenPipeline::InputIsRepeatable
int InputIsRepeatable(int port)
vtkDemandDrivenPipeline
Executive supporting on-demand execution.
Definition: vtkDemandDrivenPipeline.h:55
vtkInformationKeyVectorKey
Key for vector-of-keys values.
Definition: vtkInformationKeyVectorKey.h:32
vtkDemandDrivenPipeline::DataRequest
vtkInformation * DataRequest
Definition: vtkDemandDrivenPipeline.h:235
vtkDemandDrivenPipeline::vtkDemandDrivenPipeline
vtkDemandDrivenPipeline()
vtkDemandDrivenPipeline::ArrayIsValid
int ArrayIsValid(vtkAbstractArray *array, vtkInformation *field)
vtkDemandDrivenPipeline::REQUEST_INFORMATION
static vtkInformationRequestKey * REQUEST_INFORMATION()
Key defining a request to make sure the output information is up to date.
vtkDemandDrivenPipeline::DataObjectTime
vtkTimeStamp DataObjectTime
Definition: vtkDemandDrivenPipeline.h:227
vtkDemandDrivenPipeline::InputTypeIsValid
virtual int InputTypeIsValid(int port, int index, vtkInformationVector **)
vtkX3D::type
@ type
Definition: vtkX3D.h:522
vtkDemandDrivenPipeline::InputTypeIsValid
int InputTypeIsValid(int port, vtkInformationVector **)
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:170
vtkX3D::data
@ data
Definition: vtkX3D.h:321
vtkDemandDrivenPipeline::ComputePipelineMTime
int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime) override
Implement the pipeline modified time request.
vtkDemandDrivenPipeline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
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.
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:52
vtkDemandDrivenPipeline::Update
vtkTypeBool Update() override
Bring the algorithm's outputs up-to-date.
vtkDemandDrivenPipeline::PipelineMTime
vtkMTimeType PipelineMTime
Definition: vtkDemandDrivenPipeline.h:224
vtkDemandDrivenPipeline::ExecuteData
virtual int ExecuteData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::MarkOutputsGenerated
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkDemandDrivenPipeline::Update
vtkTypeBool Update(int port) override
Bring the algorithm's outputs up-to-date.
vtkDemandDrivenPipeline::DATA_NOT_GENERATED
static vtkInformationIntegerKey * DATA_NOT_GENERATED()
Key to store a mark for an output that will not be generated.
vtkExecutive.h
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
vtkDemandDrivenPipeline::REQUEST_DATA_OBJECT
static vtkInformationRequestKey * REQUEST_DATA_OBJECT()
Key defining a request to make sure the output data objects exist.
vtkDemandDrivenPipeline::ExecuteInformation
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDemandDrivenPipeline::ExecuteDataStart
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkDemandDrivenPipeline::UpdateInformation
int UpdateInformation() override
Bring the output information up to date.
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:164
vtkDemandDrivenPipeline::UpdateDataObject
int UpdateDataObject() override
Bring the output data object's existence up to date.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkDemandDrivenPipeline::InfoRequest
vtkInformation * InfoRequest
Definition: vtkDemandDrivenPipeline.h:233
vtkExecutive
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:76
vtkDemandDrivenPipeline::NewDataObject
static vtkDataObject * NewDataObject(const char *type)
Create (New) and return a data object of the given type.
vtkDemandDrivenPipeline::ResetPipelineInformation
void ResetPipelineInformation(int, vtkInformation *) override
vtkCompositeDataPipeline
Executive supporting composite datasets.
Definition: vtkCompositeDataPipeline.h:64
vtkDemandDrivenPipeline::REQUEST_DATA
static vtkInformationRequestKey * REQUEST_DATA()
Key defining a request to make sure the output data are up to date.
vtkDemandDrivenPipeline::UpdatePipelineMTime
virtual int UpdatePipelineMTime()
Bring the PipelineMTime up to date.
vtkDemandDrivenPipeline::InputCountIsValid
int InputCountIsValid(int port, vtkInformationVector **)
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:32
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkX3D::field
@ field
Definition: vtkX3D.h:183
vtkDemandDrivenPipeline::FieldArrayExists
int FieldArrayExists(vtkFieldData *data, vtkInformation *field)
vtkDemandDrivenPipeline::InformationTime
vtkTimeStamp InformationTime
Definition: vtkDemandDrivenPipeline.h:228
vtkInformationRequestKey
Key for pointer to pointer.
Definition: vtkInformationRequestKey.h:32
vtkDemandDrivenPipeline::New
static vtkDemandDrivenPipeline * New()
vtkDemandDrivenPipeline::ExecuteDataObject
virtual int ExecuteDataObject(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkInformationUnsignedLongKey
Key for unsigned long values in vtkInformation.
Definition: vtkInformationUnsignedLongKey.h:32
vtkDemandDrivenPipeline::DataObjectRequest
vtkInformation * DataObjectRequest
Definition: vtkDemandDrivenPipeline.h:234
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:76
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkDemandDrivenPipeline::InputFieldsAreValid
int InputFieldsAreValid(int port, vtkInformationVector **)
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)
Set whether the given output port releases data when it is consumed.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkDemandDrivenPipeline::UpdateData
virtual int UpdateData(int outputPort)
Bring the output data up to date.
vtkDemandDrivenPipeline::DataTime
vtkTimeStamp DataTime
Definition: vtkDemandDrivenPipeline.h:229
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkDemandDrivenPipeline::InputFieldsAreValid
virtual int InputFieldsAreValid(int port, int index, vtkInformationVector **)
vtkDemandDrivenPipeline::DataSetAttributeExists
int DataSetAttributeExists(vtkDataSetAttributes *dsa, vtkInformation *field)
vtkDemandDrivenPipeline::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkDemandDrivenPipeline::~vtkDemandDrivenPipeline
~vtkDemandDrivenPipeline() override
vtkDemandDrivenPipeline::GetReleaseDataFlag
virtual int GetReleaseDataFlag(int port)
Get whether the given output port releases data when it is consumed.
vtkDemandDrivenPipeline::RELEASE_DATA
static vtkInformationIntegerKey * RELEASE_DATA()
Key to specify in pipeline information the request that data be released after it is used.
vtkDemandDrivenPipeline::CheckDataObject
virtual int CheckDataObject(int port, vtkInformationVector *outInfo)
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287