00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00075 #ifndef __vtkCompositeDataPipeline_h
00076 #define __vtkCompositeDataPipeline_h
00077
00078 #include "vtkStreamingDemandDrivenPipeline.h"
00079
00080 class vtkCompositeDataSet;
00081 class vtkHierarchicalDataSet;
00082 class vtkInformationDoubleKey;
00083 class vtkInformationIntegerVectorKey;
00084 class vtkInformationObjectBaseKey;
00085 class vtkInformationStringKey;
00086 class vtkInformationDataObjectKey;
00087
00088 class VTK_FILTERING_EXPORT vtkCompositeDataPipeline : public vtkStreamingDemandDrivenPipeline
00089 {
00090 public:
00091 static vtkCompositeDataPipeline* New();
00092 vtkTypeRevisionMacro(vtkCompositeDataPipeline,vtkStreamingDemandDrivenPipeline);
00093 void PrintSelf(ostream& os, vtkIndent indent);
00094
00096
00098 virtual int ProcessRequest(vtkInformation* request,
00099 vtkInformationVector** inInfo,
00100 vtkInformationVector* outInfo);
00102
00104
00105 virtual int
00106 ComputePipelineMTime(vtkInformation* request,
00107 vtkInformationVector** inInfoVec,
00108 vtkInformationVector* outInfoVec,
00109 int reqeustFromOutputPort,
00110 unsigned long* mtime);
00112
00115 vtkDataObject* GetCompositeOutputData(int port);
00116
00118
00119 static vtkInformationIntegerKey* BEGIN_LOOP();
00120 static vtkInformationIntegerKey* END_LOOP();
00121 static vtkInformationStringKey* COMPOSITE_DATA_TYPE_NAME();
00122 static vtkInformationObjectBaseKey* COMPOSITE_DATA_INFORMATION();
00123 static vtkInformationIntegerKey* MARKED_FOR_UPDATE();
00124 static vtkInformationStringKey* INPUT_REQUIRED_COMPOSITE_DATA_TYPE();
00125 static vtkInformationObjectBaseKey* UPDATE_BLOCKS();
00127
00128 protected:
00129 vtkCompositeDataPipeline();
00130 ~vtkCompositeDataPipeline();
00131
00132
00133
00134 virtual int CheckDataObject(int port, vtkInformationVector *outInfo);
00135
00136 virtual int ForwardUpstream(vtkInformation* request);
00137 virtual int ForwardUpstream(int i, int j, vtkInformation* request);
00138
00139
00140 virtual void CopyDefaultInformation(vtkInformation* request, int direction,
00141 vtkInformationVector** inInfoVec,
00142 vtkInformationVector* outInfoVec);
00143
00144 virtual void CopyFromDataToInformation(
00145 vtkDataObject* dobj, vtkInformation* inInfo);
00146 virtual void PushInformation(vtkInformation*);
00147 virtual void PopInformation (vtkInformation*);
00148
00149
00150 vtkTimeStamp SubPassTime;
00151
00152
00153
00154 int InSubPass;
00155
00156 virtual int ExecuteDataObjectForBlock(vtkInformation* request);
00157 virtual int ExecuteDataObject(vtkInformation* request,
00158 vtkInformationVector** inInfo,
00159 vtkInformationVector* outInfo);
00160
00161 virtual int ExecuteInformationForBlock(vtkInformation* request);
00162
00163 virtual int ExecuteDataForBlock(vtkInformation* request);
00164 virtual int ExecuteData(vtkInformation* request,
00165 vtkInformationVector** inInfoVec,
00166 vtkInformationVector* outInfoVec);
00167
00168 virtual void ExecuteDataStart(vtkInformation* request,
00169 vtkInformationVector** inInfoVec,
00170 vtkInformationVector* outInfoVec);
00171
00172
00173 virtual int VerifyOutputInformation(int outputPort,
00174 vtkInformationVector** inInfoVec,
00175 vtkInformationVector* outInfoVec);
00176
00177
00178 int CheckCompositeData(int port, vtkInformationVector* outInfoVec);
00179 int SendEndLoop(int i, int j);
00180
00181
00182
00183
00184 int InLocalLoop;
00185
00186 virtual int SendBeginLoop(int i, int j,
00187 vtkInformation* inInfo,
00188 vtkHierarchicalDataSet* updateInfo);
00189 virtual vtkCompositeDataSet* CreateInputCompositeData(
00190 int i, vtkInformation* inInfo);
00191 virtual int UpdateBlocks(int i, int j, int outputPort,
00192 vtkHierarchicalDataSet* updateInfo,
00193 vtkCompositeDataSet* input,
00194 vtkInformation* inInfo);
00195 virtual void ExecuteSimpleAlgorithm(vtkInformation* request,
00196 vtkInformationVector** inInfoVec,
00197 vtkInformationVector* outInfoVec,
00198 int compositePort);
00199 void CheckInputPorts(int& inputPortIsComposite,
00200 int& inputIsComposite,
00201 int& compositePort);
00202
00203 vtkInformation* InformationCache;
00204
00205 vtkInformation* GenericRequest;
00206 vtkInformation* DataObjectRequest;
00207 vtkInformation* InformationRequest;
00208 vtkInformation* UpdateExtentRequest;
00209 vtkInformation* DataRequest;
00210
00211
00212 enum BeginForward
00213 {
00214 EXECUTE_BLOCK_OK,
00215 EXECUTE_BLOCK_CONTINUE,
00216 EXECUTE_BLOCK_ERROR
00217 };
00218
00219
00220 private:
00221 vtkCompositeDataPipeline(const vtkCompositeDataPipeline&);
00222 void operator=(const vtkCompositeDataPipeline&);
00223 };
00224
00225 #endif