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
43 #include <vtkSmartPointer.h> // smart pointer
44 
45 #include <vector> // for vector in return type
46 
47 VTK_ABI_NAMESPACE_BEGIN
56 
57 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkCompositeDataPipeline
59 {
60 public:
61  static vtkCompositeDataPipeline* New();
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:
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.
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.
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,
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 
166 
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:
206  void operator=(const vtkCompositeDataPipeline&) = delete;
207 };
208 
209 VTK_ABI_NAMESPACE_END
210 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkStreamingDemandDrivenPipeline * New()
Store vtkAlgorithm input/output information.
Key for vtkDataObject values.
virtual int ExecuteData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Key for string values in vtkInformation.
void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:28
Key for integer values in vtkInformation.
virtual int ExecuteDataObject(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
Key for vtkObjectBase values.
int InputTypeIsValid(vtkInformationVector **)
void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
Executive supporting composite datasets.
Key for double values in vtkInformation.
void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
Store zero or more vtkInformation instances.
Executive supporting partial updates.
general representation of visualization data
Definition: vtkDataObject.h:54
virtual int ForwardUpstream(vtkInformation *request)
void ResetPipelineInformation(int port, vtkInformation *) override