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) VTK_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() VTK_OVERRIDE;
125 
126  int ForwardUpstream(vtkInformation* request) VTK_OVERRIDE;
127  virtual int ForwardUpstream(int i, int j, vtkInformation* request);
128 
129  // Copy information for the given request.
130  void CopyDefaultInformation(vtkInformation* request, int direction,
131  vtkInformationVector** inInfoVec,
132  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
133 
134  virtual void PushInformation(vtkInformation*);
135  virtual void PopInformation (vtkInformation*);
136 
137  int ExecuteDataObject(vtkInformation* request,
138  vtkInformationVector** inInfo,
139  vtkInformationVector* outInfo) VTK_OVERRIDE;
140 
141  int ExecuteData(vtkInformation* request,
142  vtkInformationVector** inInfoVec,
143  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
144 
145  void ExecuteDataStart(vtkInformation* request,
146  vtkInformationVector** inInfoVec,
147  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
148 
149  // Override this check to account for update extent.
150  int NeedToExecuteData(int outputPort,
151  vtkInformationVector** inInfoVec,
152  vtkInformationVector* outInfoVec) VTK_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.
164  int InLocalLoop;
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) VTK_OVERRIDE;
192 
193  vtkInformation* InformationCache;
194 
195  vtkInformation* GenericRequest;
196  vtkInformation* DataObjectRequest;
197  vtkInformation* InformationRequest;
198  vtkInformation* UpdateExtentRequest;
199  vtkInformation* DataRequest;
200 
201 
202  void ResetPipelineInformation(int port, vtkInformation*) VTK_OVERRIDE;
203 
213  vtkCompositeDataSet* CreateOutputCompositeDataSet(
214  vtkCompositeDataSet* input, int compositePort);
215 
216  // Override this to handle UPDATE_COMPOSITE_INDICES().
217  void MarkOutputsGenerated(vtkInformation* request,
218  vtkInformationVector** inInfoVec,
219  vtkInformationVector* outInfoVec) VTK_OVERRIDE;
220 
221  int NeedToExecuteBasedOnCompositeIndices(vtkInformation* outInfo);
222 
223  // Because we sometimes have to swap between "simple" data types and composite
224  // data types, we sometimes want to skip resetting the pipeline information.
225  static vtkInformationIntegerKey* SUPPRESS_RESET_PI();
226 
235  static vtkInformationIntegerVectorKey* DATA_COMPOSITE_INDICES();
236 
237 private:
238  vtkCompositeDataPipeline(const vtkCompositeDataPipeline&) VTK_DELETE_FUNCTION;
239  void operator=(const vtkCompositeDataPipeline&) VTK_DELETE_FUNCTION;
240 };
241 
242 #endif
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:36
vtkX3D::direction
@ direction
Definition: vtkX3D.h:260
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkInformationDataObjectKey
Key for vtkDataObject values.
Definition: vtkInformationDataObjectKey.h:33
vtkStreamingDemandDrivenPipeline.h
vtkInformationDoubleKey
Key for double values in vtkInformation.
Definition: vtkInformationDoubleKey.h:34
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:51
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkCompositeDataPipeline
Executive supporting composite datasets.
Definition: vtkCompositeDataPipeline.h:65
vtkStreamingDemandDrivenPipeline::New
static vtkStreamingDemandDrivenPipeline * New()
vtkInformationObjectBaseKey
Key for vtkObjectBase values.
Definition: vtkInformationObjectBaseKey.h:36
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:34
vtkCompositeDataIterator
superclass for composite data iterators
Definition: vtkCompositeDataIterator.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkStreamingDemandDrivenPipeline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkDemandDrivenPipeline::vtkCompositeDataPipeline
friend class vtkCompositeDataPipeline
Definition: vtkDemandDrivenPipeline.h:242
vtkInformationIntegerVectorKey
Key for integer vector values.
Definition: vtkInformationIntegerVectorKey.h:34
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkStreamingDemandDrivenPipeline
Executive supporting partial updates.
Definition: vtkStreamingDemandDrivenPipeline.h:51