VTK  9.4.20250112
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
43#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
44#include <vtkSmartPointer.h> // smart pointer
45
46#include <vector> // for vector in return type
47
48VTK_ABI_NAMESPACE_BEGIN
57
58class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALAUTO vtkCompositeDataPipeline
60{
61public:
64 void PrintSelf(ostream& os, vtkIndent indent) override;
65
71
76 vtkDataObject* GetCompositeInputData(int port, int index, vtkInformationVector** inInfoVec);
77
83
92
104
113
114protected:
117
118 int ForwardUpstream(vtkInformation* request) override;
119 virtual int ForwardUpstream(int i, int j, vtkInformation* request);
120
121 // Copy information for the given request.
122 void CopyDefaultInformation(vtkInformation* request, int direction,
123 vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
124
127
129 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
130
132 vtkInformationVector* outInfoVec) override;
133
135 vtkInformationVector* outInfoVec) override;
136
137 // Override this check to account for update extent.
139 int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
140
141 // Check whether the data object in the pipeline information exists
142 // and has a valid type.
144 vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
145
146 // True when the pipeline is iterating over the current (simple) filter
147 // to produce composite output. In this case, ExecuteDataStart() should
148 // NOT Initialize() the composite output.
150
152 vtkInformationVector* outInfoVec, int compositePort);
153
155 vtkInformationVector* outInfoVec, int compositePort, int connection, vtkInformation* request,
156 std::vector<vtkSmartPointer<vtkCompositeDataSet>>& compositeOutput);
157
158 std::vector<vtkDataObject*> ExecuteSimpleAlgorithmForBlock(vtkInformationVector** inInfoVec,
159 vtkInformationVector* outInfoVec, vtkInformation* inInfo, vtkInformation* request,
160 vtkDataObject* dobj);
161
162 bool ShouldIterateOverInput(vtkInformationVector** inInfoVec, int& compositePort);
163
164 int InputTypeIsValid(int port, int index, vtkInformationVector** inInfoVec) override;
165
167
170
171 void ResetPipelineInformation(int port, vtkInformation*) override;
172
182 std::vector<vtkSmartPointer<vtkDataObject>> CreateOutputCompositeDataSet(
183 vtkCompositeDataSet* input, int compositePort, int numOutputPorts);
184
185 // Override this to handle UPDATE_COMPOSITE_INDICES().
187 vtkInformationVector* outInfoVec) override;
188
190
191 // Because we sometimes have to swap between "simple" data types and composite
192 // data types, we sometimes want to skip resetting the pipeline information.
194
204
205private:
207 void operator=(const vtkCompositeDataPipeline&) = delete;
208};
209
210VTK_ABI_NAMESPACE_END
211#endif
superclass for composite data iterators
Executive supporting composite datasets.
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...
int ForwardUpstream(vtkInformation *request) override
vtkDataObject * GetCompositeOutputData(int port)
Returns the data object stored with the DATA_OBJECT() in the output port.
int NeedToExecuteBasedOnCompositeIndices(vtkInformation *outInfo)
static vtkInformationIntegerKey * LOAD_REQUESTED_BLOCKS()
An integer key that indicates to the source to load all requested blocks specified in UPDATE_COMPOSIT...
static vtkCompositeDataPipeline * New()
virtual void ExecuteSimpleAlgorithm(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int compositePort)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
void ResetPipelineInformation(int port, vtkInformation *) override
int ExecuteData(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkDataObject * GetCompositeInputData(int port, int index, vtkInformationVector **inInfoVec)
Returns the data object stored with the DATA_OBJECT() in the input port.
void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
virtual int ForwardUpstream(int i, int j, vtkInformation *request)
virtual void PushInformation(vtkInformation *)
void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
static vtkInformationIntegerVectorKey * UPDATE_COMPOSITE_INDICES()
UPDATE_COMPOSITE_INDICES is a key placed in the request to request a set of composite indices from a ...
int ExecuteDataObject(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
static vtkInformationObjectBaseKey * COMPOSITE_DATA_META_DATA()
COMPOSITE_DATA_META_DATA is a key placed in the output-port information by readers/sources producing ...
bool ShouldIterateOverInput(vtkInformationVector **inInfoVec, int &compositePort)
virtual void ExecuteEach(vtkCompositeDataIterator *iter, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int compositePort, int connection, vtkInformation *request, std::vector< vtkSmartPointer< vtkCompositeDataSet > > &compositeOutput)
virtual int CheckCompositeData(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
std::vector< vtkDataObject * > ExecuteSimpleAlgorithmForBlock(vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, vtkInformation *inInfo, vtkInformation *request, vtkDataObject *dobj)
int InputTypeIsValid(int port, int index, vtkInformationVector **inInfoVec) override
static vtkInformationIntegerVectorKey * DATA_COMPOSITE_INDICES()
COMPOSITE_INDICES() is put in the output information by the executive if the request has UPDATE_COMPO...
~vtkCompositeDataPipeline() override
static vtkInformationIntegerKey * SUPPRESS_RESET_PI()
static vtkInformationDoubleKey * BLOCK_AMOUNT_OF_DETAIL()
BLOCK_AMOUNT_OF_DETAIL is a key placed in the information about a multi-block dataset that indicates ...
virtual void PopInformation(vtkInformation *)
abstract superclass for composite (multi-block or AMR) datasets
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:108
Key for vtkDataObject values.
Key for double values in vtkInformation.
Key for integer values in vtkInformation.
Key for vtkObjectBase values.
Key for string values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Hold a reference to a vtkObjectBase instance.
Executive supporting partial updates.
#define VTK_MARSHALAUTO