• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Filtering/vtkStreamingDemandDrivenPipeline.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkStreamingDemandDrivenPipeline.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00028 #ifndef __vtkStreamingDemandDrivenPipeline_h
00029 #define __vtkStreamingDemandDrivenPipeline_h
00030 
00031 #include "vtkDemandDrivenPipeline.h"
00032 
00033 class vtkExtentTranslator;
00034 class vtkInformationDoubleKey;
00035 class vtkInformationDoubleVectorKey;
00036 class vtkInformationIntegerKey;
00037 class vtkInformationIntegerVectorKey;
00038 class vtkInformationObjectBaseKey;
00039 class vtkInformationStringKey;
00040 class vtkInformationIdTypeKey;
00041 
00042 class VTK_FILTERING_EXPORT vtkStreamingDemandDrivenPipeline : public vtkDemandDrivenPipeline
00043 {
00044 public:
00045   static vtkStreamingDemandDrivenPipeline* New();
00046   vtkTypeRevisionMacro(vtkStreamingDemandDrivenPipeline,vtkDemandDrivenPipeline);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00050 
00052   virtual int ProcessRequest(vtkInformation* request,
00053                              vtkInformationVector** inInfo,
00054                              vtkInformationVector* outInfo);
00056 
00058 
00059   virtual int Update();
00060   virtual int Update(int port);
00061   virtual int UpdateWholeExtent();
00063 
00066   int PropagateUpdateExtent(int outputPort);
00067 
00069 
00073   int SetMaximumNumberOfPieces(int port, int n);
00074   int SetMaximumNumberOfPieces(vtkInformation *, int n);
00075   int GetMaximumNumberOfPieces(int port);
00076   int GetMaximumNumberOfPieces(vtkInformation *);
00078 
00080 
00083   int SetWholeExtent(vtkInformation *, int extent[6]);
00084   void GetWholeExtent(vtkInformation *, int extent[6]);
00085   int* GetWholeExtent(vtkInformation *);
00087 
00089 
00093   int SetUpdateExtentToWholeExtent(int port);
00094   int SetUpdateExtentToWholeExtent(vtkInformation *);
00096   
00098 
00099   int SetUpdateExtent(int port, int extent[6]);
00100   int SetUpdateExtent(vtkInformation *, int extent[6]);
00101   void GetUpdateExtent(vtkInformation *, int extent[6]);
00102   int* GetUpdateExtent(vtkInformation *);
00104 
00106 
00108   int SetUpdateExtent(int port, 
00109                       int piece, int numPieces, int ghostLevel);
00110   int SetUpdateExtent(vtkInformation *, 
00111                       int piece, int numPieces, int ghostLevel);
00112   int SetUpdatePiece(vtkInformation *, int piece);
00113   int GetUpdatePiece(vtkInformation *);
00114   int SetUpdateNumberOfPieces(vtkInformation *, int n);
00115   int GetUpdateNumberOfPieces(vtkInformation *);
00116   int SetUpdateGhostLevel(vtkInformation *, int n);
00117   int GetUpdateGhostLevel(vtkInformation *);
00119 
00121 
00125   int SetSplitUpdateExtent(int port, 
00126                            int major, int minor,
00127                            int numPieces, 
00128                            int ghostLevel)
00129   {
00130     return this->SetUpdateExtent(port, major+minor, numPieces, ghostLevel);
00131   }
00133   
00134 
00136 
00137   int SetUpdateTimeSteps(int port, double *times, int length);
00138   int SetUpdateTimeSteps(vtkInformation *, double *times, int length);
00139   int SetUpdateTimeStep(int port, double time);
00140   //void GetUpdateTimeSteps(vtkInformation *, int extent[6]);
00142 
00144 
00150   int SetRequestExactExtent(int port, int flag);
00151   int GetRequestExactExtent(int port);
00153 
00155 
00157   int SetExtentTranslator(int port, vtkExtentTranslator* translator);
00158   int SetExtentTranslator(vtkInformation *, vtkExtentTranslator* translator);
00159   vtkExtentTranslator* GetExtentTranslator(int port);
00160   vtkExtentTranslator* GetExtentTranslator(vtkInformation *info);
00162 
00164 
00167   int SetWholeBoundingBox(int port, double bb[6]);
00168   void GetWholeBoundingBox(int port, double bb[6]);
00169   double* GetWholeBoundingBox(int port);
00171 
00173 
00176   int SetPieceBoundingBox(int port, double bb[6]);
00177   void GetPieceBoundingBox(int port, double bb[6]);
00178   double* GetPieceBoundingBox(int port);
00180 
00182   static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT();
00183 
00186   static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT_INFORMATION();
00187 
00190   static vtkInformationIntegerKey* CONTINUE_EXECUTING();
00191 
00193   static vtkInformationObjectBaseKey* EXTENT_TRANSLATOR();
00194 
00196 
00197   static vtkInformationIntegerKey* UPDATE_EXTENT_INITIALIZED();
00198   static vtkInformationIntegerVectorKey* UPDATE_EXTENT();
00199   static vtkInformationIntegerKey* UPDATE_PIECE_NUMBER();
00200   static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES();
00201   static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS();
00203 
00206   static vtkInformationIntegerKey* UPDATE_EXTENT_TRANSLATED();
00207 
00209   static vtkInformationIntegerVectorKey* WHOLE_EXTENT();
00210 
00213   static vtkInformationIntegerKey* MAXIMUM_NUMBER_OF_PIECES();
00214 
00217   static vtkInformationDoubleVectorKey* WHOLE_BOUNDING_BOX();
00218 
00221   static vtkInformationDoubleVectorKey* PIECE_BOUNDING_BOX();
00222 
00224   static vtkInformationIntegerKey* EXACT_EXTENT();
00225 
00227   static vtkInformationDoubleVectorKey* TIME_STEPS();
00228 
00230   static vtkInformationDoubleVectorKey* TIME_RANGE();
00231 
00233   static vtkInformationDoubleVectorKey* UPDATE_TIME_STEPS();
00234 
00236   static vtkInformationDoubleKey* PRIORITY();
00237 
00240   static vtkInformationIntegerKey* REMOVE_ATTRIBUTE_INFORMATION();
00241 
00248   // Key to allow a reader to advertise that it supports a fast-path
00249   // for reading data over time.
00250   static vtkInformationIntegerKey* FAST_PATH_FOR_TEMPORAL_DATA();
00251   // The type of data being requested.
00252   // Possible values: POINT, CELL, EDGE, FACE
00253   static vtkInformationStringKey* FAST_PATH_OBJECT_TYPE();
00254   // Possible values: INDEX, GLOBAL
00255   static vtkInformationStringKey* FAST_PATH_ID_TYPE();
00256   // The id (either index or global id) being requested
00257   static vtkInformationIdTypeKey* FAST_PATH_OBJECT_ID();
00258 
00260 
00264   double ComputePriority()
00265     {
00266       return this->ComputePriority(0);
00267     }
00268   virtual double ComputePriority(int port);
00270 
00271 protected:
00272   vtkStreamingDemandDrivenPipeline();
00273   ~vtkStreamingDemandDrivenPipeline();
00274 
00276 
00279   virtual void ResetUpdateInformation(vtkInformation* request,
00280     vtkInformationVector** inInfoVec,
00281     vtkInformationVector* outInfoVec);
00283 
00284   // Keep track of the update time request corresponding to the
00285   // previous executing. If the previous update request did not
00286   // correspond to an existing time step and the reader chose 
00287   // a time step with it's own logic, the data time step will
00288   // be different than the request. If the same time step is
00289   // requested again, there is no need to re-execute the algorithm.
00290   // We know that it does not have this time step.
00291   static vtkInformationDoubleVectorKey* PREVIOUS_UPDATE_TIME_STEPS();
00292 
00293   // Keep track of the fast path keys corresponding to the 
00294   // previous executing. If all key values are the same as their
00295   // counterparts in the previous request, we do not need to re-execute.
00296   static vtkInformationIdTypeKey* PREVIOUS_FAST_PATH_OBJECT_ID();
00297   static vtkInformationStringKey* PREVIOUS_FAST_PATH_OBJECT_TYPE();
00298   static vtkInformationStringKey* PREVIOUS_FAST_PATH_ID_TYPE();
00299 
00300   // Does the time request correspond to what is in the data?
00301   // Returns 0 if yes, 1 otherwise.
00302   virtual int NeedToExecuteBasedOnTime(vtkInformation* outInfo,
00303                                        vtkDataObject* dataObject);
00304 
00305   // If the request contains a fast path key for temporal data, always execute
00306   virtual int NeedToExecuteBasedOnFastPathData(vtkInformation* outInfo);
00307 
00308   // Setup default information on the output after the algorithm
00309   // executes information.
00310   virtual int ExecuteInformation(vtkInformation* request,
00311                                  vtkInformationVector** inInfoVec,
00312                                  vtkInformationVector* outInfoVec);
00313 
00314   // Copy information for the given request.
00315   virtual void CopyDefaultInformation(vtkInformation* request, int direction,
00316                                       vtkInformationVector** inInfoVec,
00317                                       vtkInformationVector* outInfoVec);
00318 
00319   // Helper to check output information before propagating it to inputs.
00320   virtual int VerifyOutputInformation(int outputPort,
00321                                       vtkInformationVector** inInfoVec,
00322                                       vtkInformationVector* outInfoVec);
00323 
00324 
00325   // Override this check to account for update extent.
00326   virtual int NeedToExecuteData(int outputPort,
00327                                 vtkInformationVector** inInfoVec,
00328                                 vtkInformationVector* outInfoVec);
00329 
00330   // Override these to handle the continue-executing option.
00331   virtual void ExecuteDataStart(vtkInformation* request,
00332                                 vtkInformationVector** inInfoVec,
00333                                 vtkInformationVector* outInfoVec);
00334   virtual void ExecuteDataEnd(vtkInformation* request,
00335                               vtkInformationVector** inInfoVec,
00336                               vtkInformationVector* outInfoVec);
00337 
00338   // Override this to handle cropping and ghost levels.
00339   virtual void MarkOutputsGenerated(vtkInformation* request,
00340                                     vtkInformationVector** inInfoVec,
00341                                     vtkInformationVector* outInfoVec);
00342 
00343 
00344   // Remove update/whole extent when resetting pipeline information.
00345   virtual void ResetPipelineInformation(int port, vtkInformation*);
00346 
00347   // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
00348   // request.
00349   int ContinueExecuting;
00350 
00351   vtkInformation *UpdateExtentRequest;
00352 
00353   // did the most recent PUE do anything ?
00354   int LastPropogateUpdateExtentShortCircuited;
00355   
00356 private:
00357   vtkStreamingDemandDrivenPipeline(const vtkStreamingDemandDrivenPipeline&);  // Not implemented.
00358   void operator=(const vtkStreamingDemandDrivenPipeline&);  // Not implemented.
00359 };
00360 
00361 #endif

Generated by  doxygen 1.7.1