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

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 =========================================================================*/
00035 #ifndef __vtkPushPipeline_h
00036 #define __vtkPushPipeline_h
00037 
00038 #include "vtkObject.h"
00039 #define VTK_PP_MAX_INPUTS 128
00040 
00041 class vtkProcessObject;
00042 class vtkDataObject;
00043 class vtkSource;
00044 class vtkPushPipelineConsumeCommand;
00045 class vtkRenderWindow;
00046 class vtkRenderer;
00047 class vtkPushPipelineProcessInfo;
00048 class vtkPushPipelineDataInfo;
00049 
00050 class vtkPushPipelineWindowsType;
00051 class vtkPushPipelineProcessMapType;
00052 class vtkPushPipelineDataMapType;
00053 
00054 class VTK_HYBRID_EXPORT vtkPushPipeline : public vtkObject
00055 {
00056 public:
00057   static vtkPushPipeline *New();
00058   vtkTypeRevisionMacro(vtkPushPipeline,vtkObject);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062   void AddPusher(vtkProcessObject* pusher);
00063 
00065 
00066   void SetInputToExecutionRatio(vtkProcessObject *po, int inNum, int ratio);
00067   void SetExecutionToOutputRatio(vtkProcessObject *po, int ratio);
00069                              
00071   void Push(vtkSource *pusher);
00072 
00074   void Run(vtkSource *pusher);
00075 
00077 
00079   vtkSetMacro(RunState,int);
00080   vtkGetMacro(RunState,int);
00082 
00086   void AddWindow(vtkRenderWindow *win);
00087   
00088 protected:
00089   vtkPushPipeline();
00090   ~vtkPushPipeline();
00091   
00092   //BTX
00093   friend class vtkPushPipelineProcessInfo;
00094   friend class vtkPushPipelineDataInfo;
00095   friend class vtkPushPipelineConsumeCommand;
00096   //ETX
00097   
00098   vtkPushPipelineWindowsType* Windows;
00099   vtkPushPipelineProcessMapType* ProcessMap;
00100   vtkPushPipelineDataMapType* DataMap;
00101   
00102   vtkPushPipelineDataInfo *GetPushDataInfo(vtkDataObject *);
00103   vtkPushPipelineProcessInfo *GetPushProcessInfo(vtkProcessObject *);
00104   int RunState;
00105   
00106   void AddData(vtkDataObject *);
00107   void AddProcess(vtkProcessObject *);
00108   void Trace(vtkDataObject *);
00109   void Trace(vtkProcessObject *);
00110   void ClearTraceMarkers();
00111   int  IsRendererReady(vtkRenderer *);
00112   int  IsRenderWindowReady(vtkRenderWindow *);
00113   void ConsumeRenderWindowInputs(vtkRenderWindow *);
00114   void ConsumeRendererInputs(vtkRenderer *);
00115   void RenderWindows();
00116   void SetupWindows();
00117   void SetupRenderWindow(vtkRenderWindow *);
00118   void SetupRenderer(vtkRenderer *);
00119   
00120 private:
00121   vtkPushPipeline(const vtkPushPipeline&);  // Not implemented.
00122   void operator=(const vtkPushPipeline&);  // Not implemented.
00123 };
00124 
00125 #endif
00126