VTK
vtkCompositeDataPipeline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCompositeDataPipeline.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 =========================================================================*/
50 #ifndef vtkCompositeDataPipeline_h
51 #define vtkCompositeDataPipeline_h
52 
53 #include "vtkCommonExecutionModelModule.h" // For export macro
55 
64 
65 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkCompositeDataPipeline :
67 {
68 public:
69  static vtkCompositeDataPipeline* New();
71  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
77  vtkDataObject* GetCompositeOutputData(int port);
78 
83  vtkDataObject* GetCompositeInputData(
84  int port, int index, vtkInformationVector **inInfoVec);
85 
90  static vtkInformationIntegerKey* LOAD_REQUESTED_BLOCKS();
91 
99  static vtkInformationObjectBaseKey* COMPOSITE_DATA_META_DATA();
100 
111  static vtkInformationIntegerVectorKey* UPDATE_COMPOSITE_INDICES();
112 
120  static vtkInformationDoubleKey* BLOCK_AMOUNT_OF_DETAIL();
121 
122 protected:
124  ~vtkCompositeDataPipeline() override;
125 
126  int ForwardUpstream(vtkInformation* request) override;
127  virtual int ForwardUpstream(int i, int j, vtkInformation* request);
128 
129  // Copy information for the given request.
131  vtkInformationVector** inInfoVec,
132  vtkInformationVector* outInfoVec) override;
133 
134  virtual void PushInformation(vtkInformation*);
135  virtual void PopInformation (vtkInformation*);
136 
137  int ExecuteDataObject(vtkInformation* request,
138  vtkInformationVector** inInfo,
139  vtkInformationVector* outInfo) override;
140 
141  int ExecuteData(vtkInformation* request,
142  vtkInformationVector** inInfoVec,
143  vtkInformationVector* outInfoVec) override;
144 
145  void ExecuteDataStart(vtkInformation* request,
146  vtkInformationVector** inInfoVec,
147  vtkInformationVector* outInfoVec) override;
148 
149  // Override this check to account for update extent.
150  int NeedToExecuteData(int outputPort,
151  vtkInformationVector** inInfoVec,
152  vtkInformationVector* outInfoVec) override;
153 
154  // Check whether the data object in the pipeline information for an
155  // output port exists and has a valid type.
156  virtual int CheckCompositeData(vtkInformation *request,
157  int port,
158  vtkInformationVector** inInfoVec,
159  vtkInformationVector* outInfoVec);
160 
161  // True when the pipeline is iterating over the current (simple) filter
162  // to produce composite output. In this case, ExecuteDataStart() should
163  // NOT Initialize() the composite output.
165 
166  virtual void ExecuteSimpleAlgorithm(vtkInformation* request,
167  vtkInformationVector** inInfoVec,
168  vtkInformationVector* outInfoVec,
169  int compositePort);
170 
171  virtual void ExecuteEach(vtkCompositeDataIterator* iter,
172  vtkInformationVector** inInfoVec,
173  vtkInformationVector* outInfoVec,
174  int compositePort,
175  int connection,
176  vtkInformation* request,
177  vtkCompositeDataSet* compositeOutput);
178 
179  vtkDataObject* ExecuteSimpleAlgorithmForBlock(
180  vtkInformationVector** inInfoVec,
181  vtkInformationVector* outInfoVec,
182  vtkInformation* inInfo,
183  vtkInformation* outInfo,
184  vtkInformation* request,
185  vtkDataObject* dobj);
186 
187  bool ShouldIterateOverInput(vtkInformationVector** inInfoVec,
188  int& compositePort);
189 
190  int InputTypeIsValid(int port, int index,
191  vtkInformationVector **inInfoVec) override;
192 
194 
197 
198  void ResetPipelineInformation(int port, vtkInformation*) override;
199 
209  vtkCompositeDataSet* CreateOutputCompositeDataSet(
210  vtkCompositeDataSet* input, int compositePort);
211 
212  // Override this to handle UPDATE_COMPOSITE_INDICES().
213  void MarkOutputsGenerated(vtkInformation* request,
214  vtkInformationVector** inInfoVec,
215  vtkInformationVector* outInfoVec) override;
216 
217  int NeedToExecuteBasedOnCompositeIndices(vtkInformation* outInfo);
218 
219  // Because we sometimes have to swap between "simple" data types and composite
220  // data types, we sometimes want to skip resetting the pipeline information.
221  static vtkInformationIntegerKey* SUPPRESS_RESET_PI();
222 
231  static vtkInformationIntegerVectorKey* DATA_COMPOSITE_INDICES();
232 
233 private:
235  void operator=(const vtkCompositeDataPipeline&) = delete;
236 };
237 
238 #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:39
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:64
virtual int ForwardUpstream(vtkInformation *request)
void ResetPipelineInformation(int port, vtkInformation *) override