VTK  9.7.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
44 #ifndef vtkCompositeDataPipeline_h
45 #define vtkCompositeDataPipeline_h
46 
47 #include "vtkCommonExecutionModelModule.h" // For export macro
49 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
50 #include <vtkSmartPointer.h> // smart pointer
51 
52 #include <vector> // for vector in return type
53 
54 VTK_ABI_NAMESPACE_BEGIN
63 
64 class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALAUTO vtkCompositeDataPipeline
66 {
67 public:
68  static vtkCompositeDataPipeline* New();
70  void PrintSelf(ostream& os, vtkIndent indent) override;
71 
76  vtkDataObject* GetCompositeOutputData(int port);
77 
82  vtkDataObject* GetCompositeInputData(int port, int index, vtkInformationVector** inInfoVec);
83 
89  static vtkInformationIntegerKey* LOAD_REQUESTED_BLOCKS();
90 
99  static vtkInformationObjectBaseKey* COMPOSITE_DATA_META_DATA();
100 
112  static vtkInformationIntegerVectorKey* UPDATE_COMPOSITE_INDICES();
113 
122  static vtkInformationDoubleKey* BLOCK_AMOUNT_OF_DETAIL();
123 
124 protected:
126  ~vtkCompositeDataPipeline() override;
127 
128  int ForwardUpstream(vtkInformation* request) override;
129  virtual int ForwardUpstream(int i, int j, vtkInformation* request);
130 
131  // Copy information for the given request.
133  vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
134 
135  virtual void PushInformation(vtkInformation*);
136  virtual void PopInformation(vtkInformation*);
137 
138  int ExecuteDataObject(
139  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
140 
141  int ExecuteData(vtkInformation* request, vtkInformationVector** inInfoVec,
142  vtkInformationVector* outInfoVec) override;
143 
144  void ExecuteDataStart(vtkInformation* request, vtkInformationVector** inInfoVec,
145  vtkInformationVector* outInfoVec) override;
146 
147  // Override this check to account for update extent.
148  int NeedToExecuteData(
149  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
150 
151  // Check whether the data object in the pipeline information exists
152  // and has a valid type.
153  virtual int CheckCompositeData(
154  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
155 
156  // True when the pipeline is iterating over the current (simple) filter
157  // to produce composite output. In this case, ExecuteDataStart() should
158  // NOT Initialize() the composite output.
160 
161  virtual void ExecuteSimpleAlgorithm(vtkInformation* request, vtkInformationVector** inInfoVec,
162  vtkInformationVector* outInfoVec, int compositePort);
163 
164  virtual void ExecuteEach(vtkCompositeDataIterator* iter, vtkInformationVector** inInfoVec,
165  vtkInformationVector* outInfoVec, int compositePort, int connection, vtkInformation* request,
167 
168  std::vector<vtkDataObject*> ExecuteSimpleAlgorithmForBlock(vtkInformationVector** inInfoVec,
169  vtkInformationVector* outInfoVec, vtkInformation* inInfo, vtkInformation* request,
170  vtkDataObject* dobj);
171 
172  bool ShouldIterateOverInput(vtkInformationVector** inInfoVec, int& compositePort);
173 
174  int InputTypeIsValid(int port, int index, vtkInformationVector** inInfoVec) override;
175 
177 
180 
181  void ResetPipelineInformation(int port, vtkInformation*) override;
182 
192  std::vector<vtkSmartPointer<vtkDataObject>> CreateOutputCompositeDataSet(
193  vtkCompositeDataSet* input, int compositePort, int numOutputPorts);
194 
195  // Override this to handle UPDATE_COMPOSITE_INDICES().
196  void MarkOutputsGenerated(vtkInformation* request, vtkInformationVector** inInfoVec,
197  vtkInformationVector* outInfoVec) override;
198 
199  int NeedToExecuteBasedOnCompositeIndices(vtkInformation* outInfo);
200 
206  static vtkInformationIntegerKey* SUPPRESS_RESET_PI();
207 
217  static vtkInformationIntegerVectorKey* DATA_COMPOSITE_INDICES();
218 
219 private:
221  void operator=(const vtkCompositeDataPipeline&) = delete;
222 };
223 
224 VTK_ABI_NAMESPACE_END
225 #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.
#define VTK_MARSHALAUTO
Executive supporting partial updates.
general representation of visualization data
Definition: vtkDataObject.h:55
virtual int ForwardUpstream(vtkInformation *request)
void ResetPipelineInformation(int port, vtkInformation *) override