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 =========================================================================*/
49 #ifndef vtkCompositeDataPipeline_h
50 #define vtkCompositeDataPipeline_h
51 
52 #include "vtkCommonExecutionModelModule.h" // For export macro
54 
63 
66 {
67 public:
68  static vtkCompositeDataPipeline* New();
70  void PrintSelf(ostream& os, vtkIndent indent);
71 
74  vtkDataObject* GetCompositeOutputData(int port);
75 
77 
79  vtkDataObject* GetCompositeInputData(
80  int port, int index, vtkInformationVector **inInfoVec);
82 
85  static vtkInformationIntegerKey* LOAD_REQUESTED_BLOCKS();
86 
92  static vtkInformationObjectBaseKey* COMPOSITE_DATA_META_DATA();
93 
102  static vtkInformationIntegerVectorKey* UPDATE_COMPOSITE_INDICES();
103 
110  static vtkInformationDoubleKey* BLOCK_AMOUNT_OF_DETAIL();
111 
112 protected:
115 
116  virtual int ForwardUpstream(vtkInformation* request);
117  virtual int ForwardUpstream(int i, int j, vtkInformation* request);
118 
119  // Copy information for the given request.
120  virtual void CopyDefaultInformation(vtkInformation* request, int direction,
121  vtkInformationVector** inInfoVec,
122  vtkInformationVector* outInfoVec);
123 
124  virtual void PushInformation(vtkInformation*);
125  virtual void PopInformation (vtkInformation*);
126 
127  virtual int ExecuteDataObject(vtkInformation* request,
128  vtkInformationVector** inInfo,
129  vtkInformationVector* outInfo);
130 
131  virtual int ExecuteData(vtkInformation* request,
132  vtkInformationVector** inInfoVec,
133  vtkInformationVector* outInfoVec);
134 
135  virtual void ExecuteDataStart(vtkInformation* request,
136  vtkInformationVector** inInfoVec,
137  vtkInformationVector* outInfoVec);
138 
139  // Override this check to account for update extent.
140  virtual int NeedToExecuteData(int outputPort,
141  vtkInformationVector** inInfoVec,
142  vtkInformationVector* outInfoVec);
143 
144  // Check whether the data object in the pipeline information for an
145  // output port exists and has a valid type.
146  virtual int CheckCompositeData(vtkInformation *request,
147  int port,
148  vtkInformationVector** inInfoVec,
149  vtkInformationVector* outInfoVec);
150 
151  // True when the pipeline is iterating over the current (simple) filter
152  // to produce composite output. In this case, ExecuteDataStart() should
153  // NOT Initialize() the composite output.
155 
156  virtual void ExecuteSimpleAlgorithm(vtkInformation* request,
157  vtkInformationVector** inInfoVec,
158  vtkInformationVector* outInfoVec,
159  int compositePort);
160 
161  virtual void ExecuteEach(vtkCompositeDataIterator* iter,
162  vtkInformationVector** inInfoVec,
163  vtkInformationVector* outInfoVec,
164  int compositePort,
165  int connection,
166  vtkInformation* request,
167  vtkCompositeDataSet* compositeOutput);
168 
169  vtkDataObject* ExecuteSimpleAlgorithmForBlock(
170  vtkInformationVector** inInfoVec,
171  vtkInformationVector* outInfoVec,
172  vtkInformation* inInfo,
173  vtkInformation* outInfo,
174  vtkInformation* request,
175  vtkDataObject* dobj);
176 
177  bool ShouldIterateOverInput(vtkInformationVector** inInfoVec,
178  int& compositePort);
179 
180  virtual int InputTypeIsValid(int port, int index,
181  vtkInformationVector **inInfoVec);
182 
184 
190 
191 
192  virtual void ResetPipelineInformation(int port, vtkInformation*);
193 
195 
202  vtkCompositeDataSet* CreateOutputCompositeDataSet(
203  vtkCompositeDataSet* input, int compositePort);
205 
206  // Override this to handle UPDATE_COMPOSITE_INDICES().
207  virtual void MarkOutputsGenerated(vtkInformation* request,
208  vtkInformationVector** inInfoVec,
209  vtkInformationVector* outInfoVec);
210 
211  int NeedToExecuteBasedOnCompositeIndices(vtkInformation* outInfo);
212 
213  // Because we sometimes have to swap between "simple" data types and composite
214  // data types, we sometimes want to skip resetting the pipeline information.
215  static vtkInformationIntegerKey* SUPPRESS_RESET_PI();
216 
222  static vtkInformationIntegerVectorKey* DATA_COMPOSITE_INDICES();
223 
224 private:
225  vtkCompositeDataPipeline(const vtkCompositeDataPipeline&); // Not implemented.
226  void operator=(const vtkCompositeDataPipeline&); // Not implemented.
227 };
228 
229 #endif
#define VTKCOMMONEXECUTIONMODEL_EXPORT
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
static vtkStreamingDemandDrivenPipeline * New()
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
Store vtkAlgorithm input/output information.
Key for vtkDataObject values.
virtual int ExecuteData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
virtual void ResetPipelineInformation(int port, vtkInformation *)
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:38
Key for integer values in vtkInformation.
virtual int ExecuteDataObject(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Key for vtkObjectBase values.
int InputTypeIsValid(vtkInformationVector **)
Executive supporting composite datasets.
void PrintSelf(ostream &os, vtkIndent indent)
Key for double values in vtkInformation.
virtual void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
Store zero or more vtkInformation instances.
Executive supporting partial updates.
general representation of visualization data
Definition: vtkDataObject.h:64
virtual int ForwardUpstream(vtkInformation *request)