00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00031 #ifndef __vtkStreamingDemandDrivenPipeline_h
00032 #define __vtkStreamingDemandDrivenPipeline_h
00033 
00034 #include "vtkDemandDrivenPipeline.h"
00035 
00036 #define VTK_UPDATE_EXTENT_COMBINE 1
00037 #define VTK_UPDATE_EXTENT_REPLACE 2
00038 
00039 class vtkExtentTranslator;
00040 class vtkInformationDoubleKey;
00041 class vtkInformationDoubleVectorKey;
00042 class vtkInformationIntegerKey;
00043 class vtkInformationIntegerVectorKey;
00044 class vtkInformationObjectBaseKey;
00045 class vtkInformationStringKey;
00046 class vtkInformationIdTypeKey;
00047 
00048 class VTK_FILTERING_EXPORT vtkStreamingDemandDrivenPipeline : public vtkDemandDrivenPipeline
00049 {
00050 public:
00051   static vtkStreamingDemandDrivenPipeline* New();
00052   vtkTypeMacro(vtkStreamingDemandDrivenPipeline,vtkDemandDrivenPipeline);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056 
00058   virtual int ProcessRequest(vtkInformation* request,
00059                              vtkInformationVector** inInfo,
00060                              vtkInformationVector* outInfo);
00062 
00064 
00065   virtual int Update();
00066   virtual int Update(int port);
00067   virtual int UpdateWholeExtent();
00069 
00072   int PropagateUpdateExtent(int outputPort);
00073 
00075 
00079   int SetMaximumNumberOfPieces(int port, int n);
00080   int SetMaximumNumberOfPieces(vtkInformation *, int n);
00081   int GetMaximumNumberOfPieces(int port);
00082   int GetMaximumNumberOfPieces(vtkInformation *);
00084 
00086 
00089   int SetWholeExtent(vtkInformation *, int extent[6]);
00090   void GetWholeExtent(vtkInformation *, int extent[6]);
00091   int* GetWholeExtent(vtkInformation *);
00093 
00095 
00099   int SetUpdateExtentToWholeExtent(int port);
00100   int SetUpdateExtentToWholeExtent(vtkInformation *);
00102   
00104 
00105   int SetUpdateExtent(int port, int extent[6]);
00106   int SetUpdateExtent(vtkInformation *, int extent[6]);
00107   void GetUpdateExtent(vtkInformation *, int extent[6]);
00108   int* GetUpdateExtent(vtkInformation *);
00110 
00112 
00114   int SetUpdateExtent(int port, 
00115                       int piece, int numPieces, int ghostLevel);
00116   int SetUpdateExtent(vtkInformation *, 
00117                       int piece, int numPieces, int ghostLevel);
00118   int SetUpdatePiece(vtkInformation *, int piece);
00119   int GetUpdatePiece(vtkInformation *);
00120   int SetUpdateNumberOfPieces(vtkInformation *, int n);
00121   int GetUpdateNumberOfPieces(vtkInformation *);
00122   int SetUpdateGhostLevel(vtkInformation *, int n);
00123   int GetUpdateGhostLevel(vtkInformation *);
00124   int SetUpdateResolution(int port, double r);
00125   int SetUpdateResolution(vtkInformation *, double r);
00126   double GetUpdateResolution(vtkInformation *);
00128 
00130 
00131   int SetUpdateTimeSteps(int port, double *times, int length);
00132   int SetUpdateTimeSteps(vtkInformation *, double *times, int length);
00133   int SetUpdateTimeStep(int port, double time);
00134   
00136 
00138 
00144   int SetRequestExactExtent(int port, int flag);
00145   int GetRequestExactExtent(int port);
00147 
00149 
00151   int SetExtentTranslator(int port, vtkExtentTranslator* translator);
00152   int SetExtentTranslator(vtkInformation *, vtkExtentTranslator* translator);
00153   vtkExtentTranslator* GetExtentTranslator(int port);
00154   vtkExtentTranslator* GetExtentTranslator(vtkInformation *info);
00156 
00158 
00161   int SetWholeBoundingBox(int port, double bb[6]);
00162   void GetWholeBoundingBox(int port, double bb[6]);
00163   double* GetWholeBoundingBox(int port);
00165 
00167 
00170   int SetPieceBoundingBox(int port, double bb[6]);
00171   void GetPieceBoundingBox(int port, double bb[6]);
00172   double* GetPieceBoundingBox(int port);
00174 
00176   static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT();
00177 
00180   static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT_INFORMATION();
00181 
00183   static vtkInformationRequestKey* REQUEST_RESOLUTION_PROPAGATE();
00184 
00187   static vtkInformationIntegerKey* CONTINUE_EXECUTING();
00188 
00190   static vtkInformationObjectBaseKey* EXTENT_TRANSLATOR();
00191 
00193 
00194   static vtkInformationIntegerKey* UPDATE_EXTENT_INITIALIZED();
00195   static vtkInformationIntegerVectorKey* UPDATE_EXTENT();
00196   static vtkInformationIntegerKey* UPDATE_PIECE_NUMBER();
00197   static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES();
00198   static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS();
00200 
00203   static vtkInformationIntegerVectorKey* COMBINED_UPDATE_EXTENT();
00204 
00207   static vtkInformationIntegerKey* UPDATE_EXTENT_TRANSLATED();
00208 
00210   static vtkInformationIntegerVectorKey* WHOLE_EXTENT();
00211 
00215   static vtkInformationIntegerKey* UNRESTRICTED_UPDATE_EXTENT();
00216 
00219   static vtkInformationIntegerKey* MAXIMUM_NUMBER_OF_PIECES();
00220 
00223   static vtkInformationDoubleVectorKey* WHOLE_BOUNDING_BOX();
00224 
00227   static vtkInformationDoubleVectorKey* PIECE_BOUNDING_BOX();
00228 
00230   static vtkInformationIntegerKey* EXACT_EXTENT();
00231 
00233   static vtkInformationDoubleVectorKey* TIME_STEPS();
00234 
00236   static vtkInformationDoubleVectorKey* TIME_RANGE();
00237 
00239   static vtkInformationDoubleVectorKey* UPDATE_TIME_STEPS();
00240 
00243   static vtkInformationDoubleKey* PRIORITY();
00244 
00247   static vtkInformationDoubleKey* UPDATE_RESOLUTION();
00248 
00251   static vtkInformationIntegerKey* REMOVE_ATTRIBUTE_INFORMATION();
00252 
00259   
00260   
00261   static vtkInformationIntegerKey* FAST_PATH_FOR_TEMPORAL_DATA();
00262   
00263   
00264   static vtkInformationStringKey* FAST_PATH_OBJECT_TYPE();
00265   
00266   static vtkInformationStringKey* FAST_PATH_ID_TYPE();
00267   
00268   static vtkInformationIdTypeKey* FAST_PATH_OBJECT_ID();
00269 
00271 
00275   double ComputePriority()
00276     {
00277       return this->ComputePriority(0);
00278     }
00279   virtual double ComputePriority(int port);
00281 
00282 protected:
00283   vtkStreamingDemandDrivenPipeline();
00284   ~vtkStreamingDemandDrivenPipeline();
00285 
00287 
00290   virtual void ResetUpdateInformation(vtkInformation* request,
00291     vtkInformationVector** inInfoVec,
00292     vtkInformationVector* outInfoVec);
00294 
00295   
00296   
00297   
00298   
00299   
00300   
00301   
00302   static vtkInformationDoubleVectorKey* PREVIOUS_UPDATE_TIME_STEPS();
00303 
00304   
00305   
00306   
00307   static vtkInformationIdTypeKey* PREVIOUS_FAST_PATH_OBJECT_ID();
00308   static vtkInformationStringKey* PREVIOUS_FAST_PATH_OBJECT_TYPE();
00309   static vtkInformationStringKey* PREVIOUS_FAST_PATH_ID_TYPE();
00310 
00311   
00312   
00313   virtual int NeedToExecuteBasedOnTime(vtkInformation* outInfo,
00314                                        vtkDataObject* dataObject);
00315 
00316   
00317   virtual int NeedToExecuteBasedOnFastPathData(vtkInformation* outInfo);
00318 
00319   
00320   
00321   virtual int ExecuteInformation(vtkInformation* request,
00322                                  vtkInformationVector** inInfoVec,
00323                                  vtkInformationVector* outInfoVec);
00324 
00325   
00326   virtual void CopyDefaultInformation(vtkInformation* request, int direction,
00327                                       vtkInformationVector** inInfoVec,
00328                                       vtkInformationVector* outInfoVec);
00329 
00330   
00331   virtual int VerifyOutputInformation(int outputPort,
00332                                       vtkInformationVector** inInfoVec,
00333                                       vtkInformationVector* outInfoVec);
00334 
00335 
00336   
00337   virtual int NeedToExecuteData(int outputPort,
00338                                 vtkInformationVector** inInfoVec,
00339                                 vtkInformationVector* outInfoVec);
00340 
00341   
00342   virtual void ExecuteDataStart(vtkInformation* request,
00343                                 vtkInformationVector** inInfoVec,
00344                                 vtkInformationVector* outInfoVec);
00345   virtual void ExecuteDataEnd(vtkInformation* request,
00346                               vtkInformationVector** inInfoVec,
00347                               vtkInformationVector* outInfoVec);
00348 
00349   
00350   virtual void MarkOutputsGenerated(vtkInformation* request,
00351                                     vtkInformationVector** inInfoVec,
00352                                     vtkInformationVector* outInfoVec);
00353 
00354 
00355   
00356   virtual void ResetPipelineInformation(int port, vtkInformation*);
00357 
00358   
00359   
00360   int ContinueExecuting;
00361 
00362   vtkInformation *UpdateExtentRequest;
00363 
00364   
00365   int LastPropogateUpdateExtentShortCircuited;
00366   
00367 private:
00368   vtkStreamingDemandDrivenPipeline(const vtkStreamingDemandDrivenPipeline&);  
00369   void operator=(const vtkStreamingDemandDrivenPipeline&);  
00370 };
00371 
00372 #endif