Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Hybrid/vtkPushPipeline.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPushPipeline.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00046 #ifndef __vtkPushPipeline_h
00047 #define __vtkPushPipeline_h
00048 
00049 #include "vtkObject.h"
00050 #define VTK_PP_MAX_INPUTS 128
00051 
00052 class vtkProcessObject;
00053 class vtkDataObject;
00054 class vtkSource;
00055 class vtkPushPipelineConsumeCommand;
00056 class vtkRenderWindow;
00057 class vtkRenderer;
00058 class vtkPushPipelineProcessInfo;
00059 class vtkPushPipelineDataInfo;
00060 
00061 class vtkPushPipelineWindowsType;
00062 class vtkPushPipelineProcessMapType;
00063 class vtkPushPipelineDataMapType;
00064 
00065 class VTK_HYBRID_EXPORT vtkPushPipeline : public vtkObject
00066 {
00067 public:
00068   static vtkPushPipeline *New();
00069   vtkTypeRevisionMacro(vtkPushPipeline,vtkObject);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00073   void AddPusher(vtkProcessObject* pusher);
00074 
00076 
00077   void SetInputToExecutionRatio(vtkProcessObject *po, int inNum, int ratio);
00078   void SetExecutionToOutputRatio(vtkProcessObject *po, int ratio);
00080                              
00082   void Push(vtkSource *pusher);
00083 
00085   void Run(vtkSource *pusher);
00086 
00088 
00090   vtkSetMacro(RunState,int);
00091   vtkGetMacro(RunState,int);
00093 
00097   void AddWindow(vtkRenderWindow *win);
00098   
00099 protected:
00100   vtkPushPipeline();
00101   ~vtkPushPipeline();
00102   
00103   //BTX
00104   friend class vtkPushPipelineProcessInfo;
00105   friend class vtkPushPipelineDataInfo;
00106   friend class vtkPushPipelineConsumeCommand;
00107   //ETX
00108   
00109   vtkPushPipelineWindowsType* Windows;
00110   vtkPushPipelineProcessMapType* ProcessMap;
00111   vtkPushPipelineDataMapType* DataMap;
00112   
00113   vtkPushPipelineDataInfo *GetPushDataInfo(vtkDataObject *);
00114   vtkPushPipelineProcessInfo *GetPushProcessInfo(vtkProcessObject *);
00115   int RunState;
00116   
00117   void AddData(vtkDataObject *);
00118   void AddProcess(vtkProcessObject *);
00119   void Trace(vtkDataObject *);
00120   void Trace(vtkProcessObject *);
00121   void ClearTraceMarkers();
00122   int  IsRendererReady(vtkRenderer *);
00123   int  IsRenderWindowReady(vtkRenderWindow *);
00124   void ConsumeRenderWindowInputs(vtkRenderWindow *);
00125   void ConsumeRendererInputs(vtkRenderer *);
00126   void RenderWindows();
00127   void SetupWindows();
00128   void SetupRenderWindow(vtkRenderWindow *);
00129   void SetupRenderer(vtkRenderer *);
00130   
00131 private:
00132   vtkPushPipeline(const vtkPushPipeline&);  // Not implemented.
00133   void operator=(const vtkPushPipeline&);  // Not implemented.
00134 };
00135 
00136 #endif
00137