VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
62 
63 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkCompositeDataPipeline :
65 {
66 public:
67  static vtkCompositeDataPipeline* New();
69  void PrintSelf(ostream& os, vtkIndent indent);
70 
73  vtkDataObject* GetCompositeOutputData(int port);
74 
76 
78  vtkDataObject* GetCompositeInputData(
79  int port, int index, vtkInformationVector **inInfoVec);
81 
84  static vtkInformationIntegerKey* LOAD_REQUESTED_BLOCKS();
85 
91  static vtkInformationObjectBaseKey* COMPOSITE_DATA_META_DATA();
92 
101  static vtkInformationIntegerVectorKey* UPDATE_COMPOSITE_INDICES();
102 
108  static vtkInformationIntegerVectorKey* COMPOSITE_INDICES();
109 
110 
111 protected:
114 
115  virtual int ForwardUpstream(vtkInformation* request);
116  virtual int ForwardUpstream(int i, int j, vtkInformation* request);
117 
118  // Copy information for the given request.
119  virtual void CopyDefaultInformation(vtkInformation* request, int direction,
120  vtkInformationVector** inInfoVec,
121  vtkInformationVector* outInfoVec);
122 
123  virtual void CopyFromDataToInformation(
124  vtkDataObject* dobj, vtkInformation* inInfo);
125  virtual void PushInformation(vtkInformation*);
126  virtual void PopInformation (vtkInformation*);
127 
128  virtual int ExecuteDataObject(vtkInformation* request,
129  vtkInformationVector** inInfo,
130  vtkInformationVector* outInfo);
131 
132  virtual int ExecuteData(vtkInformation* request,
133  vtkInformationVector** inInfoVec,
134  vtkInformationVector* outInfoVec);
135 
136  virtual void ExecuteDataStart(vtkInformation* request,
137  vtkInformationVector** inInfoVec,
138  vtkInformationVector* outInfoVec);
139 
140  // Override this check to account for update extent.
141  virtual int NeedToExecuteData(int outputPort,
142  vtkInformationVector** inInfoVec,
143  vtkInformationVector* outInfoVec);
144 
145  // Check whether the data object in the pipeline information for an
146  // output port exists and has a valid type.
147  virtual int CheckCompositeData(vtkInformation *request,
148  int port,
149  vtkInformationVector** inInfoVec,
150  vtkInformationVector* outInfoVec);
151 
152  // True when the pipeline is iterating over the current (simple) filter
153  // to produce composite output. In this case, ExecuteDataStart() should
154  // NOT Initialize() the composite output.
156 
157  virtual void ExecuteSimpleAlgorithm(vtkInformation* request,
158  vtkInformationVector** inInfoVec,
159  vtkInformationVector* outInfoVec,
160  int compositePort);
161  vtkDataObject* ExecuteSimpleAlgorithmForBlock(
162  vtkInformationVector** inInfoVec,
163  vtkInformationVector* outInfoVec,
164  vtkInformation* inInfo,
165  vtkInformation* outInfo,
166  vtkInformation* request,
167  vtkDataObject* dobj);
168 
169  bool ShouldIterateOverInput(int& compositePort);
170 
171  virtual int InputTypeIsValid(int port, int index,
172  vtkInformationVector **inInfoVec);
173 
175 
181 
182  // Because we sometimes have to swap between "simple" data types and composite
183  // data types, we sometimes want to skip resetting the pipeline information.
185 
186  virtual void ResetPipelineInformation(int port, vtkInformation*);
187 
189 
196  vtkCompositeDataSet* CreateOutputCompositeDataSet(
197  vtkCompositeDataSet* input, int compositePort);
199 
200  // Override this to handle UPDATE_COMPOSITE_INDICES().
201  virtual void MarkOutputsGenerated(vtkInformation* request,
202  vtkInformationVector** inInfoVec,
203  vtkInformationVector* outInfoVec);
204 
205  int NeedToExecuteBasedOnCompositeIndices(vtkInformation* outInfo);
206 
207 private:
208  vtkCompositeDataPipeline(const vtkCompositeDataPipeline&); // Not implemented.
209  void operator=(const vtkCompositeDataPipeline&); // Not implemented.
210 };
211 
212 #endif
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.
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.
helper class to get VTK data object types as string and instantiate them
virtual int ForwardUpstream(vtkInformation *request)