ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPVSynchronizedRenderWindows Class Reference

synchronizes render-windows among processes in ParaView configurations. More...

#include <vtkPVSynchronizedRenderWindows.h>

Inheritance diagram for vtkPVSynchronizedRenderWindows:
Inheritance graph
[legend]
Collaboration diagram for vtkPVSynchronizedRenderWindows:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { SYNC_MULTI_RENDER_WINDOW_TAG = 15002, GET_ZBUFFER_VALUE_TAG = 15003 }
enum  ModeEnum {
  INVALID, BUILTIN, CLIENT, RENDER_SERVER,
  DATA_SERVER, BATCH
}

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkRenderWindowNewRenderWindow ()
bool GetLocalProcessIsDriver ()
void Render (unsigned int)
void OnGetZBufferValue (unsigned int, int, int)
void BeginRender (unsigned int id)
bool GetIsInCave ()
bool GetTileDisplayParameters (int tile_dims[2], int tile_mullions[2])
double GetZbufferDataAtPoint (int x, int y, unsigned int id)
ModeEnum GetMode ()
vtkPVSessionGetSession ()
virtual void AddRenderWindow (unsigned int id, vtkRenderWindow *)
virtual void RemoveRenderWindow (unsigned int id)
vtkRenderWindowGetRenderWindow (unsigned int id)
virtual void AddRenderer (unsigned int id, vtkRenderer *)
virtual void RemoveAllRenderers (unsigned int id)
virtual void SetWindowSize (unsigned int id, int width, int height)
virtual void SetWindowPosition (unsigned int id, int posx, int posy)
virtual const intGetWindowSize (unsigned int id)
virtual const intGetWindowPosition (unsigned int id)
virtual void SetEnabled (bool)
virtual bool GetEnabled ()
virtual void EnabledOn ()
virtual void EnabledOff ()
virtual void SetRenderEventPropagation (bool)
virtual bool GetRenderEventPropagation ()
virtual void RenderEventPropagationOn ()
virtual void RenderEventPropagationOff ()
bool SynchronizeBounds (double bounds[6])
bool SynchronizeSize (double &size)
bool SynchronizeSize (unsigned int &size)
bool BroadcastToDataServer (vtkSelection *selection)
bool BroadcastToRenderServer (vtkDataObject *)
void TriggerRMI (vtkMultiProcessStream &stream, int tag)
unsigned long AddRMICallback (vtkRMIFunctionType, void *localArg, int tag)
bool RemoveRMICallback (unsigned long id)
virtual vtkMultiProcessControllerGetParallelController ()
virtual vtkMultiProcessControllerGetClientServerController ()
virtual vtkMultiProcessControllerGetClientDataServerController ()
virtual void SetRenderOneViewAtATime (bool)
virtual bool GetRenderOneViewAtATime ()
virtual void RenderOneViewAtATimeOn ()
virtual void RenderOneViewAtATimeOff ()

Static Public Member Functions

static
vtkPVSynchronizedRenderWindows
New (vtkPVSession *session=NULL)
static int IsTypeOf (const char *type)
static
vtkPVSynchronizedRenderWindows
SafeDownCast (vtkObject *o)

Protected Member Functions

 vtkPVSynchronizedRenderWindows (vtkPVSession *)
 ~vtkPVSynchronizedRenderWindows ()
void SetParallelController (vtkMultiProcessController *)
void SetClientServerController (vtkMultiProcessController *)
void SetClientDataServerController (vtkMultiProcessController *)
void UpdateWindowLayout ()
void UpdateRendererDrawStates (unsigned int id)
virtual void HandleStartRender (vtkRenderWindow *)
virtual void HandleEndRender (vtkRenderWindow *)
virtual void HandleAbortRender (vtkRenderWindow *)
virtual void ClientStartRender (vtkRenderWindow *)
virtual void RootStartRender (vtkRenderWindow *)
virtual void SatelliteStartRender (vtkRenderWindow *)
void ShinkGaps ()
void SaveWindowAndLayout (vtkRenderWindow *, vtkMultiProcessStream &stream)
void LoadWindowAndLayout (vtkRenderWindow *, vtkMultiProcessStream &stream)

Protected Attributes

ModeEnum Mode
vtkMultiProcessControllerParallelController
vtkMultiProcessControllerClientServerController
vtkMultiProcessControllerClientDataServerController
unsigned long ClientServerRMITag
unsigned long ClientServerGetZBufferValueRMITag
unsigned long ParallelRMITag
bool Enabled
bool RenderEventPropagation
bool RenderOneViewAtATime
vtkWeakPointer< vtkPVSessionSession

Detailed Description

synchronizes render-windows among processes in ParaView configurations.

vtkPVSynchronizedRenderWindows is the class used to synchronize render windows in ParaView. This class can be instantiated on all processes in all modes, it automatically discovers the configuration and adapts its behavior accordingly. The role of this class is to set up the render windows on all processes and then synchronize renders. It does not manage compositing or image delivery. All it does is synchronize render windows and their layouts among processes.

If the application is managing calling of vtkRenderWindow::Render() on all processes, then one should disable RenderEventPropagation flag.

Definition at line 46 of file vtkPVSynchronizedRenderWindows.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
SYNC_MULTI_RENDER_WINDOW_TAG 
GET_ZBUFFER_VALUE_TAG 

Definition at line 135 of file vtkPVSynchronizedRenderWindows.h.

Enumerator:
INVALID 
BUILTIN 
CLIENT 
RENDER_SERVER 
DATA_SERVER 
BATCH 

Definition at line 179 of file vtkPVSynchronizedRenderWindows.h.


Constructor & Destructor Documentation

vtkPVSynchronizedRenderWindows::vtkPVSynchronizedRenderWindows ( vtkPVSession ) [protected]
vtkPVSynchronizedRenderWindows::~vtkPVSynchronizedRenderWindows ( ) [protected]

Member Function Documentation

static vtkPVSynchronizedRenderWindows* vtkPVSynchronizedRenderWindows::New ( vtkPVSession session = NULL) [static]

if session==NULL, then active session is used. If no active session is present, then it's a critical error and this method will return NULL.

virtual const char* vtkPVSynchronizedRenderWindows::GetClassName ( ) [virtual]

Reimplemented from vtkObject.

static int vtkPVSynchronizedRenderWindows::IsTypeOf ( const char *  type) [static]

Reimplemented from vtkObject.

virtual int vtkPVSynchronizedRenderWindows::IsA ( const char *  type) [virtual]

Reimplemented from vtkObject.

static vtkPVSynchronizedRenderWindows* vtkPVSynchronizedRenderWindows::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkObject.

void vtkPVSynchronizedRenderWindows::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkObject.

virtual vtkRenderWindow* vtkPVSynchronizedRenderWindows::NewRenderWindow ( ) [virtual]

Returns a render window for use (possibly new).

virtual void vtkPVSynchronizedRenderWindows::AddRenderWindow ( unsigned int  id,
vtkRenderWindow  
) [virtual]

Register/UnRegister a window.

virtual void vtkPVSynchronizedRenderWindows::RemoveRenderWindow ( unsigned int  id) [virtual]

Register/UnRegister a window.

vtkRenderWindow* vtkPVSynchronizedRenderWindows::GetRenderWindow ( unsigned int  id)

Register/UnRegister a window.

virtual void vtkPVSynchronizedRenderWindows::AddRenderer ( unsigned int  id,
vtkRenderer  
) [virtual]

Register/UnRegister the renderers. One can add multiple renderers for the same id. The id must be same as that specified when adding the corresponding render window.

virtual void vtkPVSynchronizedRenderWindows::RemoveAllRenderers ( unsigned int  id) [virtual]

Register/UnRegister the renderers. One can add multiple renderers for the same id. The id must be same as that specified when adding the corresponding render window.

virtual void vtkPVSynchronizedRenderWindows::SetWindowSize ( unsigned int  id,
int  width,
int  height 
) [virtual]

The views are not supposed to updated the render window position or size directly. They should always go through this API to update the window sizes and positions. This makes it possible to provide a consistent API irrespective of the mode ParaView is running in. These methods only need to be called on the "driver" node. (No harm in calling on all nodes). By driver node, we mean the CLIENT in client-server mode and the root node in batch mode.

virtual void vtkPVSynchronizedRenderWindows::SetWindowPosition ( unsigned int  id,
int  posx,
int  posy 
) [virtual]

The views are not supposed to updated the render window position or size directly. They should always go through this API to update the window sizes and positions. This makes it possible to provide a consistent API irrespective of the mode ParaView is running in. These methods only need to be called on the "driver" node. (No harm in calling on all nodes). By driver node, we mean the CLIENT in client-server mode and the root node in batch mode.

virtual const int* vtkPVSynchronizedRenderWindows::GetWindowSize ( unsigned int  id) [virtual]

The views are not supposed to updated the render window position or size directly. They should always go through this API to update the window sizes and positions. This makes it possible to provide a consistent API irrespective of the mode ParaView is running in. These methods only need to be called on the "driver" node. (No harm in calling on all nodes). By driver node, we mean the CLIENT in client-server mode and the root node in batch mode.

virtual const int* vtkPVSynchronizedRenderWindows::GetWindowPosition ( unsigned int  id) [virtual]

The views are not supposed to updated the render window position or size directly. They should always go through this API to update the window sizes and positions. This makes it possible to provide a consistent API irrespective of the mode ParaView is running in. These methods only need to be called on the "driver" node. (No harm in calling on all nodes). By driver node, we mean the CLIENT in client-server mode and the root node in batch mode.

virtual void vtkPVSynchronizedRenderWindows::SetEnabled ( bool  ) [virtual]

Enable/Disable parallel rendering.

virtual bool vtkPVSynchronizedRenderWindows::GetEnabled ( ) [virtual]

Enable/Disable parallel rendering.

virtual void vtkPVSynchronizedRenderWindows::EnabledOn ( ) [virtual]

Enable/Disable parallel rendering.

virtual void vtkPVSynchronizedRenderWindows::EnabledOff ( ) [virtual]

Enable/Disable parallel rendering.

virtual void vtkPVSynchronizedRenderWindows::SetRenderEventPropagation ( bool  ) [virtual]

Enable/Disable propagation of the render event. This is typically true, unless the application is managing calling Render() on all processes involved.

virtual bool vtkPVSynchronizedRenderWindows::GetRenderEventPropagation ( ) [virtual]

Enable/Disable propagation of the render event. This is typically true, unless the application is managing calling Render() on all processes involved.

virtual void vtkPVSynchronizedRenderWindows::RenderEventPropagationOn ( ) [virtual]

Enable/Disable propagation of the render event. This is typically true, unless the application is managing calling Render() on all processes involved.

virtual void vtkPVSynchronizedRenderWindows::RenderEventPropagationOff ( ) [virtual]

Enable/Disable propagation of the render event. This is typically true, unless the application is managing calling Render() on all processes involved.

bool vtkPVSynchronizedRenderWindows::GetLocalProcessIsDriver ( )

This method returns true if the local process is the 'driver' process. In client-server configurations, client is the driver. In batch configurations, root-node is the driver. In built-in mode, this always returns true.

bool vtkPVSynchronizedRenderWindows::SynchronizeBounds ( double  bounds[6])

vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. Given the ton of information this class keeps, it can easily aid vtkViews to synchronize information such as bounds/ data-size among all processes efficiently. This can be achieved by using these methods. Note that these methods should be called on all processes at the same time otherwise we will have deadlocks. We may make this API generic in future, for now this works.

bool vtkPVSynchronizedRenderWindows::SynchronizeSize ( double size)

vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. Given the ton of information this class keeps, it can easily aid vtkViews to synchronize information such as bounds/ data-size among all processes efficiently. This can be achieved by using these methods. Note that these methods should be called on all processes at the same time otherwise we will have deadlocks. We may make this API generic in future, for now this works.

bool vtkPVSynchronizedRenderWindows::SynchronizeSize ( unsigned int size)

vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. Given the ton of information this class keeps, it can easily aid vtkViews to synchronize information such as bounds/ data-size among all processes efficiently. This can be achieved by using these methods. Note that these methods should be called on all processes at the same time otherwise we will have deadlocks. We may make this API generic in future, for now this works.

bool vtkPVSynchronizedRenderWindows::BroadcastToDataServer ( vtkSelection selection)

vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. Given the ton of information this class keeps, it can easily aid vtkViews to synchronize information such as bounds/ data-size among all processes efficiently. This can be achieved by using these methods. Note that these methods should be called on all processes at the same time otherwise we will have deadlocks. We may make this API generic in future, for now this works.

bool vtkPVSynchronizedRenderWindows::BroadcastToRenderServer ( vtkDataObject )

vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. Given the ton of information this class keeps, it can easily aid vtkViews to synchronize information such as bounds/ data-size among all processes efficiently. This can be achieved by using these methods. Note that these methods should be called on all processes at the same time otherwise we will have deadlocks. We may make this API generic in future, for now this works.

void vtkPVSynchronizedRenderWindows::TriggerRMI ( vtkMultiProcessStream stream,
int  tag 
)

Convenience method to trigger an RMI call from the client/root node.

unsigned long vtkPVSynchronizedRenderWindows::AddRMICallback ( vtkRMIFunctionType  ,
void *  localArg,
int  tag 
)

Convenience method to trigger an RMI call from the client/root node.

bool vtkPVSynchronizedRenderWindows::RemoveRMICallback ( unsigned long  id)

Convenience method to trigger an RMI call from the client/root node.

void vtkPVSynchronizedRenderWindows::Render ( unsigned  int)
void vtkPVSynchronizedRenderWindows::OnGetZBufferValue ( unsigned  int,
int  ,
int   
)
virtual vtkMultiProcessController* vtkPVSynchronizedRenderWindows::GetParallelController ( ) [virtual]
virtual vtkMultiProcessController* vtkPVSynchronizedRenderWindows::GetClientServerController ( ) [virtual]
virtual vtkMultiProcessController* vtkPVSynchronizedRenderWindows::GetClientDataServerController ( ) [virtual]
virtual void vtkPVSynchronizedRenderWindows::SetRenderOneViewAtATime ( bool  ) [virtual]

By default, this class uses the same render window for all views on the server processes and then arranges the renderers by adjusting their viewports. However, this does not work well when doing image capture with magnification. In those cases, you can force this class to simply render the active view as the sole view in the window on the server side by setting this flag to true.

virtual bool vtkPVSynchronizedRenderWindows::GetRenderOneViewAtATime ( ) [virtual]

By default, this class uses the same render window for all views on the server processes and then arranges the renderers by adjusting their viewports. However, this does not work well when doing image capture with magnification. In those cases, you can force this class to simply render the active view as the sole view in the window on the server side by setting this flag to true.

virtual void vtkPVSynchronizedRenderWindows::RenderOneViewAtATimeOn ( ) [virtual]

By default, this class uses the same render window for all views on the server processes and then arranges the renderers by adjusting their viewports. However, this does not work well when doing image capture with magnification. In those cases, you can force this class to simply render the active view as the sole view in the window on the server side by setting this flag to true.

virtual void vtkPVSynchronizedRenderWindows::RenderOneViewAtATimeOff ( ) [virtual]

By default, this class uses the same render window for all views on the server processes and then arranges the renderers by adjusting their viewports. However, this does not work well when doing image capture with magnification. In those cases, you can force this class to simply render the active view as the sole view in the window on the server side by setting this flag to true.

void vtkPVSynchronizedRenderWindows::BeginRender ( unsigned int  id)

Called before starting render. This is needed in batch mode since all views share the same render window.

bool vtkPVSynchronizedRenderWindows::GetIsInCave ( )

Returns true when in Cave mode.

bool vtkPVSynchronizedRenderWindows::GetTileDisplayParameters ( int  tile_dims[2],
int  tile_mullions[2] 
)

This method should only be called on RENDER_SERVER or BATCH processes. Returns true if in tile display mode and fills up tile_dims with the tile dimensions.

double vtkPVSynchronizedRenderWindows::GetZbufferDataAtPoint ( int  x,
int  y,
unsigned int  id 
)

Returns the z-buffer value at the given location. id is the view id used in AddRenderWindow()/AddRenderer() etc.

ModeEnum vtkPVSynchronizedRenderWindows::GetMode ( ) [inline]

Streaming uses this class as a conduit for messaging. Need mode to use it correctly.

Definition at line 191 of file vtkPVSynchronizedRenderWindows.h.

vtkPVSession* vtkPVSynchronizedRenderWindows::GetSession ( )

Provides access to the session.

void vtkPVSynchronizedRenderWindows::SetParallelController ( vtkMultiProcessController ) [protected]

Set/Get the controller used for communication among parallel processes.

void vtkPVSynchronizedRenderWindows::SetClientServerController ( vtkMultiProcessController ) [protected]

Set/Get the controller used for client-server communication.

void vtkPVSynchronizedRenderWindows::SetClientDataServerController ( vtkMultiProcessController ) [protected]

Set/Get the controller used for client-data-server communication.

void vtkPVSynchronizedRenderWindows::SaveWindowAndLayout ( vtkRenderWindow ,
vtkMultiProcessStream stream 
) [protected]

Saves the information about all the windows known to this class and how they are laid out. For this to work as expected, it is essential that the client sets the WindowSize and WindowPosition correctly for all the render windows using the API on this class. It also saves some information about the active render window.

void vtkPVSynchronizedRenderWindows::LoadWindowAndLayout ( vtkRenderWindow ,
vtkMultiProcessStream stream 
) [protected]

Saves the information about all the windows known to this class and how they are laid out. For this to work as expected, it is essential that the client sets the WindowSize and WindowPosition correctly for all the render windows using the API on this class. It also saves some information about the active render window.

void vtkPVSynchronizedRenderWindows::UpdateWindowLayout ( ) [protected]

Using the meta-data saved about the render-windows and their positions and sizes, this updates the renderers/window-sizes etc. This have different response on different processes types.

void vtkPVSynchronizedRenderWindows::UpdateRendererDrawStates ( unsigned int  id) [protected]

Ensures that only the renderer assigned to the given id are enabled, all others are disabled. This is especially necessary on processes where the render window is shared.

virtual void vtkPVSynchronizedRenderWindows::HandleStartRender ( vtkRenderWindow ) [protected, virtual]
virtual void vtkPVSynchronizedRenderWindows::HandleEndRender ( vtkRenderWindow ) [protected, virtual]
virtual void vtkPVSynchronizedRenderWindows::HandleAbortRender ( vtkRenderWindow ) [inline, protected, virtual]

Definition at line 234 of file vtkPVSynchronizedRenderWindows.h.

virtual void vtkPVSynchronizedRenderWindows::ClientStartRender ( vtkRenderWindow ) [protected, virtual]
virtual void vtkPVSynchronizedRenderWindows::RootStartRender ( vtkRenderWindow ) [protected, virtual]
virtual void vtkPVSynchronizedRenderWindows::SatelliteStartRender ( vtkRenderWindow ) [protected, virtual]
void vtkPVSynchronizedRenderWindows::ShinkGaps ( ) [protected]

Shrinks gaps between views, rather grows the views to reduce gaps. Only used in tile-display mode to avoid gaps on the server side.


Member Data Documentation

Definition at line 245 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 246 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 247 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 248 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 249 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 250 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 251 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 252 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 253 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 254 of file vtkPVSynchronizedRenderWindows.h.

Definition at line 256 of file vtkPVSynchronizedRenderWindows.h.


The documentation for this class was generated from the following file: