Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkDemandDrivenPipeline.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDemandDrivenPipeline.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 =========================================================================*/
00026 #ifndef __vtkDemandDrivenPipeline_h
00027 #define __vtkDemandDrivenPipeline_h
00028 
00029 #include "vtkExecutive.h"
00030 
00031 class vtkDataArray;
00032 class vtkDataSetAttributes;
00033 class vtkDemandDrivenPipelineInternals;
00034 class vtkFieldData;
00035 class vtkInformation;
00036 class vtkInformationIntegerKey;
00037 class vtkInformationVector;
00038 class vtkInformationKeyVectorKey;
00039 class vtkInformationUnsignedLongKey;
00040 
00041 class VTK_FILTERING_EXPORT vtkDemandDrivenPipeline : public vtkExecutive
00042 {
00043 public:
00044   static vtkDemandDrivenPipeline* New();
00045   vtkTypeRevisionMacro(vtkDemandDrivenPipeline,vtkExecutive);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00049 
00051   virtual int ProcessRequest(vtkInformation* request,
00052                              vtkInformationVector** inInfo,
00053                              vtkInformationVector* outInfo);
00055 
00057 
00058   virtual int
00059   ComputePipelineMTime(vtkInformation* request,
00060                        vtkInformationVector** inInfoVec,
00061                        vtkInformationVector* outInfoVec,
00062                        int requestFromOutputPort,
00063                        unsigned long* mtime);
00065 
00067 
00069   virtual int Update();
00070   virtual int Update(int port);
00072 
00074 
00075   vtkGetMacro(PipelineMTime, unsigned long);
00077 
00080   virtual int SetReleaseDataFlag(int port, int n);
00081 
00083   virtual int GetReleaseDataFlag(int port);
00084 
00086   virtual int UpdatePipelineMTime();
00087 
00091   virtual int UpdateDataObject();
00092 
00094   virtual int UpdateInformation();
00095 
00099   virtual int UpdateData(int outputPort);
00100 
00102   static vtkInformationRequestKey* REQUEST_DATA_OBJECT();
00103   
00106   static vtkInformationRequestKey* REQUEST_INFORMATION();
00107   
00109   static vtkInformationRequestKey* REQUEST_DATA();
00110 
00113   static vtkInformationRequestKey* REQUEST_DATA_NOT_GENERATED();
00114 
00117   static vtkInformationIntegerKey* RELEASE_DATA();
00118 
00122   static vtkInformationIntegerKey* DATA_NOT_GENERATED();
00123 
00125   static vtkDataObject* NewDataObject(const char* type);
00126 
00127 protected:
00128   vtkDemandDrivenPipeline();
00129   ~vtkDemandDrivenPipeline();
00130 
00131   // Helper methods to send requests to the algorithm.
00132   virtual int ExecuteDataObject(vtkInformation* request,
00133                                 vtkInformationVector** inInfo,
00134                                 vtkInformationVector* outInfo);
00135   virtual int ExecuteInformation(vtkInformation* request,
00136                                  vtkInformationVector** inInfo,
00137                                  vtkInformationVector* outInfo);
00138   virtual int ExecuteData(vtkInformation* request,
00139                           vtkInformationVector** inInfo,
00140                           vtkInformationVector* outInfo);
00141 
00142 
00143   // Reset the pipeline update values in the given output information object.
00144   virtual void ResetPipelineInformation(int port, vtkInformation*);
00145 
00146   // Check whether the data object in the pipeline information for an
00147   // output port exists and has a valid type.
00148   virtual int CheckDataObject(int port, vtkInformationVector* outInfo);
00149 
00150 
00151   // Input connection validity checkers.
00152   int InputCountIsValid(vtkInformationVector **);
00153   int InputCountIsValid(int port,vtkInformationVector **);
00154   int InputTypeIsValid(vtkInformationVector **);
00155   int InputTypeIsValid(int port,vtkInformationVector **);
00156   int InputTypeIsValid(int port, int index,vtkInformationVector **);
00157   int InputFieldsAreValid(vtkInformationVector **);
00158   int InputFieldsAreValid(int port,vtkInformationVector **);
00159   int InputFieldsAreValid(int port, int index,vtkInformationVector **);
00160 
00161   // Field existence checkers.
00162   int DataSetAttributeExists(vtkDataSetAttributes* dsa, vtkInformation* field);
00163   int FieldArrayExists(vtkFieldData* data, vtkInformation* field);
00164   int ArrayIsValid(vtkDataArray* array, vtkInformation* field);
00165 
00166   // Input port information checkers.
00167   int InputIsOptional(int port);
00168   int InputIsRepeatable(int port);
00169 
00170   // Decide whether the output data need to be generated.
00171   virtual int NeedToExecuteData(int outputPort,
00172                                 vtkInformationVector** inInfoVec,
00173                                 vtkInformationVector* outInfoVec);
00174 
00175   // Handle before/after operations for ExecuteData method.
00176   virtual void ExecuteDataStart(vtkInformation* request,
00177                                 vtkInformationVector** inInfoVec,
00178                                 vtkInformationVector* outInfoVec);
00179   virtual void ExecuteDataEnd(vtkInformation* request,
00180                               vtkInformationVector** inInfoVec,
00181                               vtkInformationVector* outInfoVec);
00182   virtual void MarkOutputsGenerated(vtkInformation* request,
00183                                     vtkInformationVector** inInfoVec,
00184                                     vtkInformationVector* outInfoVec);
00185 
00186   // Largest MTime of any algorithm on this executive or preceding
00187   // executives.
00188   unsigned long PipelineMTime;
00189 
00190   // Time when information or data were last generated.
00191   vtkTimeStamp DataObjectTime;
00192   vtkTimeStamp InformationTime;
00193   vtkTimeStamp DataTime;
00194 
00195 //BTX
00196   friend class vtkCompositeDataPipeline;
00197 //ETX
00198 
00199 
00200   vtkInformation *InfoRequest;
00201   vtkInformation *DataObjectRequest;
00202   vtkInformation *DataRequest;
00203   
00204 private:
00205   vtkDemandDrivenPipeline(const vtkDemandDrivenPipeline&);  // Not implemented.
00206   void operator=(const vtkDemandDrivenPipeline&);  // Not implemented.
00207 };
00208 
00209 #endif

Generated on Mon Jan 21 23:07:19 2008 for VTK by  doxygen 1.4.3-20050530