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

vtkCompositeDataPipeline.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCompositeDataPipeline.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 =========================================================================*/
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   // Check whether the data object in the pipeline information for an
00133   // output port exists and has a valid type.
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   // Copy information for the given request.
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   // Composite data pipeline times. Similar to superclass'
00150   vtkTimeStamp SubPassTime;
00151 
00152   // If true, the producer is being driven in a loop (dumb filters
00153   // between composite consumer and producer)
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   // Helper to check output information before propagating it to inputs.
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   // True when the pipeline is iterating over the current (simple) filter
00182   // to produce composite output. In this case, ExecuteDataStart() should
00183   // NOT Initialize() the composite output.
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 //BTX
00212   enum BeginForward
00213   {
00214     EXECUTE_BLOCK_OK,
00215     EXECUTE_BLOCK_CONTINUE,
00216     EXECUTE_BLOCK_ERROR
00217   };
00218 //ETX
00219 
00220 private:
00221   vtkCompositeDataPipeline(const vtkCompositeDataPipeline&);  // Not implemented.
00222   void operator=(const vtkCompositeDataPipeline&);  // Not implemented.
00223 };
00224 
00225 #endif

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