VTK: Common/ExecutionModel/vtkCompositeDataPipeline.h Source File

| VTK 9.3.1

vtkCompositeDataPipeline.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
38 #ifndef vtkCompositeDataPipeline_h
39 #define vtkCompositeDataPipeline_h
40
41 #include "vtkCommonExecutionModelModule.h" // For export macro
42 #include "vtkStreamingDemandDrivenPipeline.h"
43 #include <vtkSmartPointer.h> // smart pointer
44
45 #include <vector> // for vector in return type
46
47 VTK_ABI_NAMESPACE_BEGIN
48 class vtkCompositeDataSet;
49 class vtkCompositeDataIterator;
50 class vtkInformationDoubleKey;
51 class vtkInformationIntegerVectorKey;
52 class vtkInformationObjectBaseKey;
53 class vtkInformationStringKey;
54 class vtkInformationDataObjectKey;
55 class vtkInformationIntegerKey;
56
57 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkCompositeDataPipeline
58 : public vtkStreamingDemandDrivenPipeline
59 {
60 public:
61 static vtkCompositeDataPipeline* New();
62 vtkTypeMacro(vtkCompositeDataPipeline, vtkStreamingDemandDrivenPipeline);
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
69 vtkDataObject* GetCompositeOutputData(int port);
70
75 vtkDataObject* GetCompositeInputData(int port, int index, vtkInformationVector** inInfoVec);
76
81 static vtkInformationIntegerKey* LOAD_REQUESTED_BLOCKS();
82
90 static vtkInformationObjectBaseKey* COMPOSITE_DATA_META_DATA();
91
102 static vtkInformationIntegerVectorKey* UPDATE_COMPOSITE_INDICES();
103
111 static vtkInformationDoubleKey* BLOCK_AMOUNT_OF_DETAIL();
112
113 protected:
114 vtkCompositeDataPipeline();
115 ~vtkCompositeDataPipeline() override;
116
117 int ForwardUpstream(vtkInformation* request) override;
118 virtual int ForwardUpstream(int i, int j, vtkInformation* request);
119
120 // Copy information for the given request.
121 void CopyDefaultInformation(vtkInformation* request, int direction,
122 vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
123
124 virtual void PushInformation(vtkInformation*);
125 virtual void PopInformation(vtkInformation*);
126
127 int ExecuteDataObject(
128 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
129
130 int ExecuteData(vtkInformation* request, vtkInformationVector** inInfoVec,
131 vtkInformationVector* outInfoVec) override;
132
133 void ExecuteDataStart(vtkInformation* request, vtkInformationVector** inInfoVec,
134 vtkInformationVector* outInfoVec) override;
135
136 // Override this check to account for update extent.
137 int NeedToExecuteData(
138 int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
139
140 // Check whether the data object in the pipeline information exists
141 // and has a valid type.
142 virtual int CheckCompositeData(
143 vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
144
145 // True when the pipeline is iterating over the current (simple) filter
146 // to produce composite output. In this case, ExecuteDataStart() should
147 // NOT Initialize() the composite output.
148 int InLocalLoop;
149
150 virtual void ExecuteSimpleAlgorithm(vtkInformation* request, vtkInformationVector** inInfoVec,
151 vtkInformationVector* outInfoVec, int compositePort);
152
153 virtual void ExecuteEach(vtkCompositeDataIterator* iter, vtkInformationVector** inInfoVec,
154 vtkInformationVector* outInfoVec, int compositePort, int connection, vtkInformation* request,
155 std::vector<vtkSmartPointer<vtkCompositeDataSet>>& compositeOutput);
156
157 std::vector<vtkDataObject*> ExecuteSimpleAlgorithmForBlock(vtkInformationVector** inInfoVec,
158 vtkInformationVector* outInfoVec, vtkInformation* inInfo, vtkInformation* request,
159 vtkDataObject* dobj);
160
161 bool ShouldIterateOverInput(vtkInformationVector** inInfoVec, int& compositePort);
162
163 int InputTypeIsValid(int port, int index, vtkInformationVector** inInfoVec) override;
164
165 vtkInformation* InformationCache;
166
167 vtkInformation* GenericRequest;
168 vtkInformation* InformationRequest;
169
170 void ResetPipelineInformation(int port, vtkInformation*) override;
171
181 std::vector<vtkSmartPointer<vtkDataObject>> CreateOutputCompositeDataSet(
182 vtkCompositeDataSet* input, int compositePort, int numOutputPorts);
183
184 // Override this to handle UPDATE_COMPOSITE_INDICES().
185 void MarkOutputsGenerated(vtkInformation* request, vtkInformationVector** inInfoVec,
186 vtkInformationVector* outInfoVec) override;
187
188 int NeedToExecuteBasedOnCompositeIndices(vtkInformation* outInfo);
189
190 // Because we sometimes have to swap between "simple" data types and composite
191 // data types, we sometimes want to skip resetting the pipeline information.
192 static vtkInformationIntegerKey* SUPPRESS_RESET_PI();
193
202 static vtkInformationIntegerVectorKey* DATA_COMPOSITE_INDICES();
203
204 private:
205 vtkCompositeDataPipeline(const vtkCompositeDataPipeline&) = delete;
206 void operator=(const vtkCompositeDataPipeline&) = delete;
207 };
208
209 VTK_ABI_NAMESPACE_END
210 #endif
vtkCompositeDataIterator
superclass for composite data iterators
Definition: vtkCompositeDataIterator.h:28
vtkCompositeDataPipeline
Executive supporting composite datasets.
Definition: vtkCompositeDataPipeline.h:59
vtkCompositeDataPipeline::UPDATE_COMPOSITE_INDICES
static vtkInformationIntegerVectorKey * UPDATE_COMPOSITE_INDICES()
UPDATE_COMPOSITE_INDICES is a key placed in the request to request a set of composite indices from a ...
vtkCompositeDataPipeline::ForwardUpstream
int ForwardUpstream(vtkInformation *request) override
vtkCompositeDataPipeline::InformationCache
vtkInformation * InformationCache
Definition: vtkCompositeDataPipeline.h:165
vtkCompositeDataPipeline::NeedToExecuteBasedOnCompositeIndices
int NeedToExecuteBasedOnCompositeIndices(vtkInformation *outInfo)
vtkCompositeDataPipeline::ExecuteSimpleAlgorithm
virtual void ExecuteSimpleAlgorithm(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int compositePort)
vtkCompositeDataPipeline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCompositeDataPipeline::CopyDefaultInformation
void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkCompositeDataPipeline::CreateOutputCompositeDataSet
std::vector< vtkSmartPointer< vtkDataObject > > CreateOutputCompositeDataSet(vtkCompositeDataSet *input, int compositePort, int numOutputPorts)
Tries to create the best possible composite data output for the given input and non-composite algorit...
vtkCompositeDataPipeline::ResetPipelineInformation
void ResetPipelineInformation(int port, vtkInformation *) override
vtkCompositeDataPipeline::ExecuteData
int ExecuteData(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkCompositeDataPipeline::MarkOutputsGenerated
void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkCompositeDataPipeline::ForwardUpstream
virtual int ForwardUpstream(int i, int j, vtkInformation *request)
vtkCompositeDataPipeline::PushInformation
virtual void PushInformation(vtkInformation *)
vtkCompositeDataPipeline::InformationRequest
vtkInformation * InformationRequest
Definition: vtkCompositeDataPipeline.h:168
vtkCompositeDataPipeline::GetCompositeOutputData
vtkDataObject * GetCompositeOutputData(int port)
Returns the data object stored with the DATA_OBJECT() in the output port.
vtkCompositeDataPipeline::vtkCompositeDataPipeline
vtkCompositeDataPipeline()
vtkCompositeDataPipeline::SUPPRESS_RESET_PI
static vtkInformationIntegerKey * SUPPRESS_RESET_PI()
vtkCompositeDataPipeline::ExecuteDataStart
void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkCompositeDataPipeline::DATA_COMPOSITE_INDICES
static vtkInformationIntegerVectorKey * DATA_COMPOSITE_INDICES()
COMPOSITE_INDICES() is put in the output information by the executive if the request has UPDATE_COMPO...
vtkCompositeDataPipeline::BLOCK_AMOUNT_OF_DETAIL
static vtkInformationDoubleKey * BLOCK_AMOUNT_OF_DETAIL()
BLOCK_AMOUNT_OF_DETAIL is a key placed in the information about a multi-block dataset that indicates ...
vtkCompositeDataPipeline::NeedToExecuteData
int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkCompositeDataPipeline::ExecuteDataObject
int ExecuteDataObject(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
vtkCompositeDataPipeline::ShouldIterateOverInput
bool ShouldIterateOverInput(vtkInformationVector **inInfoVec, int &compositePort)
vtkCompositeDataPipeline::CheckCompositeData
virtual int CheckCompositeData(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkCompositeDataPipeline::LOAD_REQUESTED_BLOCKS
static vtkInformationIntegerKey * LOAD_REQUESTED_BLOCKS()
An integer key that indicates to the source to load all requested blocks specified in UPDATE_COMPOSIT...
vtkCompositeDataPipeline::InLocalLoop
int InLocalLoop
Definition: vtkCompositeDataPipeline.h:148
vtkCompositeDataPipeline::InputTypeIsValid
int InputTypeIsValid(int port, int index, vtkInformationVector **inInfoVec) override
vtkCompositeDataPipeline::ExecuteSimpleAlgorithmForBlock
std::vector< vtkDataObject * > ExecuteSimpleAlgorithmForBlock(vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, vtkInformation *inInfo, vtkInformation *request, vtkDataObject *dobj)
vtkCompositeDataPipeline::COMPOSITE_DATA_META_DATA
static vtkInformationObjectBaseKey * COMPOSITE_DATA_META_DATA()
COMPOSITE_DATA_META_DATA is a key placed in the output-port information by readers/sources producing ...
vtkCompositeDataPipeline::New
static vtkCompositeDataPipeline * New()
vtkCompositeDataPipeline::GenericRequest
vtkInformation * GenericRequest
Definition: vtkCompositeDataPipeline.h:167
vtkCompositeDataPipeline::~vtkCompositeDataPipeline
~vtkCompositeDataPipeline() override
vtkCompositeDataPipeline::GetCompositeInputData
vtkDataObject * GetCompositeInputData(int port, int index, vtkInformationVector **inInfoVec)
Returns the data object stored with the DATA_OBJECT() in the input port.
vtkCompositeDataPipeline::PopInformation
virtual void PopInformation(vtkInformation *)
vtkCompositeDataPipeline::ExecuteEach
virtual void ExecuteEach(vtkCompositeDataIterator *iter, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int compositePort, int connection, vtkInformation *request, std::vector< vtkSmartPointer< vtkCompositeDataSet >> &compositeOutput)
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:51
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDemandDrivenPipeline::vtkCompositeDataPipeline
friend class vtkCompositeDataPipeline
Definition: vtkDemandDrivenPipeline.h:229
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationDataObjectKey
Key for vtkDataObject values.
Definition: vtkInformationDataObjectKey.h:23
vtkInformationDoubleKey
Key for double values in vtkInformation.
Definition: vtkInformationDoubleKey.h:24
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:24
vtkInformationIntegerVectorKey
Key for integer vector values.
Definition: vtkInformationIntegerVectorKey.h:24
vtkInformationObjectBaseKey
Key for vtkObjectBase values.
Definition: vtkInformationObjectBaseKey.h:26
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:26
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkSmartPointer< vtkCompositeDataSet >
vtkStreamingDemandDrivenPipeline
Executive supporting partial updates.
Definition: vtkStreamingDemandDrivenPipeline.h:52
vtkX3D::vector
@ vector
Definition: vtkX3D.h:237
vtkX3D::direction
@ direction
Definition: vtkX3D.h:260
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkSmartPointer.h
vtkStreamingDemandDrivenPipeline.h