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

Servers/Filters/vtkPVTreeComposite.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVTreeComposite.h,v $
00005 
00006   Copyright (c) Kitware, Inc.
00007   All rights reserved.
00008   See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 #include "vtkToolkits.h" // Needed for VTK_USE_MPI
00027 #ifndef __vtkPVTreeComposite_h
00028 #define __vtkPVTreeComposite_h
00029 
00030 #ifdef VTK_USE_MPI
00031 #include "vtkMPICommunicator.h" // Needed for vtkMPICommunicator::Request
00032 class vtkMPIController;
00033 #endif
00034 
00035 #include "vtkCompositeRenderManager.h"
00036 
00037 class vtkDataArray;
00038 class vtkFloatArray;
00039 
00040 class VTK_EXPORT vtkPVTreeComposite : public vtkCompositeRenderManager
00041 {
00042 public:
00043   static vtkPVTreeComposite *New();
00044   vtkTypeRevisionMacro(vtkPVTreeComposite,vtkCompositeRenderManager);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00048 
00051   virtual void CheckForAbortRender();
00052   virtual int CheckForAbortComposite();
00054     
00056 
00059   vtkSetMacro(EnableAbort, int);
00060   vtkGetMacro(EnableAbort, int);
00061   vtkBooleanMacro(EnableAbort, int);
00063 
00064 
00066   virtual void InitializeRMIs();
00067 
00069   virtual void CheckForDataRMI();
00070   
00071   vtkGetMacro(CompositeTime, double);
00072   vtkGetMacro(GetBuffersTime, double);
00073   vtkGetMacro(SetBuffersTime, double);
00074   vtkGetMacro(MaxRenderTime, double);
00075   
00077   float GetZ(int x, int y);
00078 
00079   void SetUseChar(int useChar);
00080   vtkGetMacro(UseChar, int);
00081   vtkBooleanMacro(UseChar, int);
00082   
00083   void SetUseRGB(int useRGB);
00084   vtkGetMacro(UseRGB, int);
00085   vtkBooleanMacro(UseRGB, int);
00086 
00087   static void ResizeFloatArray(vtkFloatArray *fa, int numComp, vtkIdType size);
00088   static void ResizeUnsignedCharArray(vtkUnsignedCharArray *uca, int numComp,
00089                                       vtkIdType size);
00090   static void DeleteArray(vtkDataArray *da);
00091 
00092 protected:
00093   vtkPVTreeComposite();
00094   ~vtkPVTreeComposite();
00095 
00096   int  CheckForData();
00097   int  ShouldIComposite();
00098   void InternalStartRender();
00099   void MagnifyFullFloatImage();
00100   virtual void PreRenderProcessing();
00101   virtual void PostRenderProcessing();
00102 
00103   virtual void WriteFullImage();
00104   void WriteFullFloatImage();
00105 
00106 //BTX
00107 
00108   enum Tags {
00109     CHECK_FOR_DATA_TAG=442445
00110   };
00111 //ETX
00112 
00113   int EnableAbort;
00114 
00115   int LocalProcessId;
00116   int RenderAborted;
00117   // Flag used to indicate the first call for a render.
00118   // There is no initialize method.
00119   int Initialized;
00120 
00121   double CompositeTime;
00122   double GetBuffersTime;
00123   double SetBuffersTime;
00124   double MaxRenderTime;
00125   
00126 //BTX 
00127 #ifdef VTK_USE_MPI 
00128   void SatelliteFinalAbortCheck();
00129   void SatelliteAbortCheck();
00130   void RootAbortCheck();
00131   void RootFinalAbortCheck();
00132   void RootWaitForSatelliteToFinish(int satelliteId);
00133   void RootSendFinalCompositeDecision();
00134   
00135   // For the asynchronous receives.
00136   vtkMPIController *MPIController;
00137   vtkMPICommunicator::Request ReceiveRequest;
00138   // Only used on the satellite processes.  When on, the root is 
00139   // waiting in a blocking receive.  It expects to be pinged so
00140   // it can check for abort requests.
00141   int RootWaiting;
00142   int ReceivePending;
00143   int ReceiveMessage;
00144 #endif
00145 //ETX  
00146 
00147   void ReallocDataArrays();
00148   virtual void ReadReducedImage();
00149   virtual void MagnifyReducedFloatImage();
00150   virtual void SetRenderWindowFloatPixelData(vtkFloatArray *pixels,
00151                                              const int pixelDimensions[2]);
00152 
00153   int UseChar;
00154   int UseRGB;
00155   
00156   vtkFloatArray *ReducedFloatImage;
00157   vtkFloatArray *FullFloatImage;
00158   vtkFloatArray *TmpFloatPixelData;
00159   
00160 private:
00161   vtkPVTreeComposite(const vtkPVTreeComposite&); // Not implemented
00162   void operator=(const vtkPVTreeComposite&); // Not implemented
00163 };
00164 
00165 #endif

Generated on Tue May 30 12:31:46 2006 for ParaView by doxygen 1.3.5