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 =========================================================================*/
44 #ifndef vtkCompositeDataPipeline_h
45 #define vtkCompositeDataPipeline_h
46 
47 #include "vtkCommonExecutionModelModule.h" // For export macro
49 
58 
59 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkCompositeDataPipeline :
61 {
62 public:
63  static vtkCompositeDataPipeline* New();
65  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
66 
71  vtkDataObject* GetCompositeOutputData(int port);
72 
77  vtkDataObject* GetCompositeInputData(
78  int port, int index, vtkInformationVector **inInfoVec);
79 
84  static vtkInformationIntegerKey* LOAD_REQUESTED_BLOCKS();
85 
93  static vtkInformationObjectBaseKey* COMPOSITE_DATA_META_DATA();
94 
105  static vtkInformationIntegerVectorKey* UPDATE_COMPOSITE_INDICES();
106 
114  static vtkInformationDoubleKey* BLOCK_AMOUNT_OF_DETAIL();
115 
116 protected:
118  ~vtkCompositeDataPipeline() VTK_OVERRIDE;
119 
120  int ForwardUpstream(vtkInformation* request) VTK_OVERRIDE;
121  virtual int ForwardUpstream(int i, int j, vtkInformation* request);
122 
123  // Copy information for the given request.
124  void CopyDefaultInformation(vtkInformation* request, int direction,
125  vtkInformationVector** inInfoVec,
126  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
127 
128  virtual void PushInformation(vtkInformation*);
129  virtual void PopInformation (vtkInformation*);
130 
131  int ExecuteDataObject(vtkInformation* request,
132  vtkInformationVector** inInfo,
133  vtkInformationVector* outInfo) VTK_OVERRIDE;
134 
135  int ExecuteData(vtkInformation* request,
136  vtkInformationVector** inInfoVec,
137  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
138 
139  void ExecuteDataStart(vtkInformation* request,
140  vtkInformationVector** inInfoVec,
141  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
142 
143  // Override this check to account for update extent.
144  int NeedToExecuteData(int outputPort,
145  vtkInformationVector** inInfoVec,
146  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
147 
148  // Check whether the data object in the pipeline information for an
149  // output port exists and has a valid type.
150  virtual int CheckCompositeData(vtkInformation *request,
151  int port,
152  vtkInformationVector** inInfoVec,
153  vtkInformationVector* outInfoVec);
154 
155  // True when the pipeline is iterating over the current (simple) filter
156  // to produce composite output. In this case, ExecuteDataStart() should
157  // NOT Initialize() the composite output.
158  int InLocalLoop;
159 
160  virtual void ExecuteSimpleAlgorithm(vtkInformation* request,
161  vtkInformationVector** inInfoVec,
162  vtkInformationVector* outInfoVec,
163  int compositePort);
164 
165  virtual void ExecuteEach(vtkCompositeDataIterator* iter,
166  vtkInformationVector** inInfoVec,
167  vtkInformationVector* outInfoVec,
168  int compositePort,
169  int connection,
170  vtkInformation* request,
171  vtkCompositeDataSet* compositeOutput);
172 
173  vtkDataObject* ExecuteSimpleAlgorithmForBlock(
174  vtkInformationVector** inInfoVec,
175  vtkInformationVector* outInfoVec,
176  vtkInformation* inInfo,
177  vtkInformation* outInfo,
178  vtkInformation* request,
179  vtkDataObject* dobj);
180 
181  bool ShouldIterateOverInput(vtkInformationVector** inInfoVec,
182  int& compositePort);
183 
184  int InputTypeIsValid(int port, int index,
185  vtkInformationVector **inInfoVec) VTK_OVERRIDE;
186 
187  vtkInformation* InformationCache;
188 
189  vtkInformation* GenericRequest;
190  vtkInformation* DataObjectRequest;
191  vtkInformation* InformationRequest;
192  vtkInformation* UpdateExtentRequest;
193  vtkInformation* DataRequest;
194 
195 
196  void ResetPipelineInformation(int port, vtkInformation*) VTK_OVERRIDE;
197 
207  vtkCompositeDataSet* CreateOutputCompositeDataSet(
208  vtkCompositeDataSet* input, int compositePort);
209 
210  // Override this to handle UPDATE_COMPOSITE_INDICES().
211  void MarkOutputsGenerated(vtkInformation* request,
212  vtkInformationVector** inInfoVec,
213  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
214 
215  int NeedToExecuteBasedOnCompositeIndices(vtkInformation* outInfo);
216 
217  // Because we sometimes have to swap between "simple" data types and composite
218  // data types, we sometimes want to skip resetting the pipeline information.
219  static vtkInformationIntegerKey* SUPPRESS_RESET_PI();
220 
229  static vtkInformationIntegerVectorKey* DATA_COMPOSITE_INDICES();
230 
231 private:
232  vtkCompositeDataPipeline(const vtkCompositeDataPipeline&) VTK_DELETE_FUNCTION;
233  void operator=(const vtkCompositeDataPipeline&) VTK_DELETE_FUNCTION;
234 };
235 
236 #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.
Key for string values in vtkInformation.
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:33
Key for integer values in vtkInformation.
Key for vtkObjectBase values.
Executive supporting composite datasets.
Key for double values in vtkInformation.
Store zero or more vtkInformation instances.
Executive supporting partial updates.
general representation of visualization data
Definition: vtkDataObject.h:58