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

dox/Filtering/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 =========================================================================*/
00046 #ifndef __vtkCompositeDataPipeline_h
00047 #define __vtkCompositeDataPipeline_h
00048 
00049 #include "vtkStreamingDemandDrivenPipeline.h"
00050 
00051 class vtkCompositeDataSet;
00052 class vtkInformationDoubleKey;
00053 class vtkInformationIntegerVectorKey;
00054 class vtkInformationObjectBaseKey;
00055 class vtkInformationStringKey;
00056 class vtkInformationDataObjectKey;
00057 class vtkInformationIntegerKey;
00058 
00059 class VTK_FILTERING_EXPORT vtkCompositeDataPipeline : public vtkStreamingDemandDrivenPipeline
00060 {
00061 public:
00062   static vtkCompositeDataPipeline* New();
00063   vtkTypeRevisionMacro(vtkCompositeDataPipeline,vtkStreamingDemandDrivenPipeline);
00064   void PrintSelf(ostream& os, vtkIndent indent);
00065 
00067 
00069   virtual int ProcessRequest(vtkInformation* request,
00070                              vtkInformationVector** inInfo,
00071                              vtkInformationVector* outInfo);
00073 
00076   vtkDataObject* GetCompositeOutputData(int port);
00077 
00079 
00081   vtkDataObject* GetCompositeInputData(
00082     int port, int index, vtkInformationVector **inInfoVec);
00084 
00086   static vtkInformationIntegerKey*       REQUIRES_TIME_DOWNSTREAM();
00087 
00088 protected:
00089   vtkCompositeDataPipeline();
00090   ~vtkCompositeDataPipeline();
00091 
00092   virtual int ForwardUpstream(vtkInformation* request);
00093   virtual int ForwardUpstream(int i, int j, vtkInformation* request);
00094 
00095   // Copy information for the given request.
00096   virtual void CopyDefaultInformation(vtkInformation* request, int direction,
00097                                       vtkInformationVector** inInfoVec,
00098                                       vtkInformationVector* outInfoVec);
00099 
00100   virtual void CopyFromDataToInformation(
00101     vtkDataObject* dobj, vtkInformation* inInfo);
00102   virtual void PushInformation(vtkInformation*);
00103   virtual void PopInformation (vtkInformation*);
00104 
00105   virtual int ExecuteDataObject(vtkInformation* request,
00106                                 vtkInformationVector** inInfo,
00107                                 vtkInformationVector* outInfo);
00108 
00109   virtual int ExecuteData(vtkInformation* request,
00110                           vtkInformationVector** inInfoVec,
00111                           vtkInformationVector* outInfoVec);
00112 
00113   virtual void ExecuteDataStart(vtkInformation* request,
00114                                 vtkInformationVector** inInfoVec,
00115                                 vtkInformationVector* outInfoVec);
00116 
00117   // Override this check to account for update extent.
00118   virtual int NeedToExecuteData(int outputPort,
00119                                 vtkInformationVector** inInfoVec,
00120                                 vtkInformationVector* outInfoVec);
00121 
00122   // Override this check to account for iterating over temporal data.
00123   virtual int NeedToExecuteBasedOnTime(vtkInformation *outInfo,
00124                                        vtkDataObject *dataObject);
00125 
00126   // Check whether the data object in the pipeline information for an
00127   // output port exists and has a valid type.
00128   virtual int CheckCompositeData(vtkInformation *request,
00129                                  int port, 
00130                                  vtkInformationVector** inInfoVec,
00131                                  vtkInformationVector* outInfoVec);
00132 
00133   // True when the pipeline is iterating over the current (simple) filter
00134   // to produce composite output. In this case, ExecuteDataStart() should
00135   // NOT Initialize() the composite output.
00136   int InLocalLoop;
00137   
00138   virtual void ExecuteSimpleAlgorithm(vtkInformation* request,
00139                                       vtkInformationVector** inInfoVec,
00140                                       vtkInformationVector* outInfoVec,
00141                                       int compositePort);
00142   virtual void ExecuteSimpleAlgorithmTime(vtkInformation* request,
00143                                           vtkInformationVector** inInfoVec,
00144                                           vtkInformationVector* outInfoVec);
00145   vtkDataObject* ExecuteSimpleAlgorithmForBlock(
00146     vtkInformationVector** inInfoVec,
00147     vtkInformationVector* outInfoVec,
00148     vtkInformation* inInfo,
00149     vtkInformation* outInfo,
00150     vtkInformation* request,  
00151     vtkDataObject* dobj);
00152 
00153   bool ShouldIterateOverInput(int& compositePort);
00154   bool ShouldIterateTemporalData(vtkInformation *request,
00155                                  vtkInformationVector** inInfoVec, 
00156                                  vtkInformationVector *outInfoVec);
00157   virtual int InputTypeIsValid(int port, int index, 
00158                                 vtkInformationVector **inInfoVec);
00159 
00160   vtkInformation* InformationCache;
00161 
00162   vtkInformation* GenericRequest;
00163   vtkInformation* DataObjectRequest;
00164   vtkInformation* InformationRequest;
00165   vtkInformation* UpdateExtentRequest;
00166   vtkInformation* DataRequest;
00167 
00168   // Because we sometimes have to swap between "simple" data types and composite
00169   // data types, we sometimes want to skip resetting the pipeline information.
00170   int SuppressResetPipelineInformation;
00171 
00172   virtual void ResetPipelineInformation(int port, vtkInformation*);
00173 
00175 
00182   vtkCompositeDataSet* CreateOutputCompositeDataSet(
00183     vtkCompositeDataSet* input, int compositePort);
00185 
00186 
00187 private:
00188   vtkCompositeDataPipeline(const vtkCompositeDataPipeline&);  // Not implemented.
00189   void operator=(const vtkCompositeDataPipeline&);  // Not implemented.
00190 };
00191 
00192 #endif

Generated by  doxygen 1.7.1