ParaView
|
synchronizes render-windows among processes in ParaView configurations. More...
#include <vtkPVSynchronizedRenderWindows.h>
Inherits vtkObject.
Public Types | |
enum | StandardOperations { MAX_OP = vtkCommunicator::MAX_OP, MIN_OP = vtkCommunicator::MIN_OP, SUM_OP = vtkCommunicator::SUM_OP } |
enum | { SYNC_MULTI_RENDER_WINDOW_TAG = 15002, GET_ZBUFFER_VALUE_TAG = 15003, SYNC_TILE_DISPLAY_PARAMATERS = 15004 } |
enum | ModeEnum { INVALID, BUILTIN, CLIENT, RENDER_SERVER, DATA_SERVER, BATCH } |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkRenderWindow * | NewRenderWindow () |
Returns a render window for use (possibly new). More... | |
bool | GetLocalProcessIsDriver () |
This method returns true if the local process is the 'driver' process. More... | |
bool | Reduce (vtkIdType &value, StandardOperations operation) |
void | Render (unsigned int) |
void | OnGetZBufferValue (unsigned int, int, int) |
void | BeginRender (unsigned int id) |
Called before starting render. More... | |
bool | GetIsInCave () |
Returns true when in Cave mode. More... | |
bool | GetTileDisplayParameters (int tile_dims[2], int tile_mullions[2]) |
This method should only be called on RENDER_SERVER or BATCH processes. More... | |
double | GetZbufferDataAtPoint (int x, int y, unsigned int id) |
Returns the z-buffer value at the given location. More... | |
ModeEnum | GetMode () |
Streaming uses this class as a conduit for messaging. More... | |
vtkPVSession * | GetSession () |
Provides access to the session. More... | |
virtual void | AddRenderWindow (unsigned int id, vtkRenderWindow *) |
Register/UnRegister a window. More... | |
virtual void | RemoveRenderWindow (unsigned int id) |
Register/UnRegister a window. More... | |
vtkRenderWindow * | GetRenderWindow (unsigned int id) |
Register/UnRegister a window. More... | |
virtual void | AddRenderer (unsigned int id, vtkRenderer *) |
Register/UnRegister the renderers. More... | |
virtual void | RemoveAllRenderers (unsigned int id) |
Register/UnRegister the renderers. More... | |
virtual void | AddRenderer (unsigned int id, vtkRenderer *, const double viewport[4]) |
Register/UnRegister the renderers. More... | |
virtual bool | UpdateRendererViewport (unsigned int id, vtkRenderer *, const double viewport[4]) |
Register/UnRegister the renderers. More... | |
virtual void | SetWindowSize (unsigned int id, int width, int height) |
The views are not supposed to updated the render window position or size directly. More... | |
virtual void | SetWindowPosition (unsigned int id, int posx, int posy) |
The views are not supposed to updated the render window position or size directly. More... | |
virtual const int * | GetWindowSize (unsigned int id) |
The views are not supposed to updated the render window position or size directly. More... | |
virtual const int * | GetWindowPosition (unsigned int id) |
The views are not supposed to updated the render window position or size directly. More... | |
virtual void | SetEnabled (bool) |
Enable/Disable parallel rendering. More... | |
virtual bool | GetEnabled () |
Enable/Disable parallel rendering. More... | |
virtual void | EnabledOn () |
Enable/Disable parallel rendering. More... | |
virtual void | EnabledOff () |
Enable/Disable parallel rendering. More... | |
virtual void | SetRenderEventPropagation (bool) |
Enable/Disable propagation of the render event. More... | |
virtual bool | GetRenderEventPropagation () |
Enable/Disable propagation of the render event. More... | |
virtual void | RenderEventPropagationOn () |
Enable/Disable propagation of the render event. More... | |
virtual void | RenderEventPropagationOff () |
Enable/Disable propagation of the render event. More... | |
bool | SynchronizeBounds (double bounds[6]) |
vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. More... | |
bool | SynchronizeSize (double &size) |
vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. More... | |
bool | SynchronizeSize (unsigned int &size) |
vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. More... | |
bool | BroadcastToDataServer (vtkSelection *selection) |
vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. More... | |
bool | BroadcastToRenderServer (vtkDataObject *) |
vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for communication between processes. More... | |
void | TriggerRMI (vtkMultiProcessStream &stream, int tag) |
Convenience method to trigger an RMI call from the client/root node. More... | |
unsigned long | AddRMICallback (vtkRMIFunctionType, void *localArg, int tag) |
Convenience method to trigger an RMI call from the client/root node. More... | |
bool | RemoveRMICallback (unsigned long id) |
Convenience method to trigger an RMI call from the client/root node. More... | |
virtual vtkMultiProcessController * | GetParallelController () |
virtual vtkMultiProcessController * | GetClientServerController () |
virtual vtkMultiProcessController * | GetClientDataServerController () |
virtual void | SetRenderOneViewAtATime (bool) |
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. More... | |
virtual bool | GetRenderOneViewAtATime () |
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. More... | |
virtual void | RenderOneViewAtATimeOn () |
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. More... | |
virtual void | RenderOneViewAtATimeOff () |
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. More... | |
Static Public Member Functions | |
static vtkPVSynchronizedRenderWindows * | New (vtkPVSession *session=NULL) |
if session==NULL, then active session is used. More... | |
static int | IsTypeOf (const char *type) |
static vtkPVSynchronizedRenderWindows * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkPVSynchronizedRenderWindows (vtkPVSession *) | |
~vtkPVSynchronizedRenderWindows () | |
void | SetParallelController (vtkMultiProcessController *) |
Set/Get the controller used for communication among parallel processes. More... | |
void | SetClientServerController (vtkMultiProcessController *) |
Set/Get the controller used for client-server communication. More... | |
void | SetClientDataServerController (vtkMultiProcessController *) |
Set/Get the controller used for client-data-server communication. More... | |
void | UpdateWindowLayout () |
Using the meta-data saved about the render-windows and their positions and sizes, this updates the renderers/window-sizes etc. More... | |
void | UpdateRendererDrawStates (unsigned int id) |
Ensures that only the renderer assigned to the given id are enabled, all others are disabled. More... | |
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 () |
Shrinks gaps between views, rather grows the views to reduce gaps. More... | |
void | SaveWindowAndLayout (vtkRenderWindow *, vtkMultiProcessStream &stream) |
Saves the information about all the windows known to this class and how they are laid out. More... | |
void | LoadWindowAndLayout (vtkRenderWindow *, vtkMultiProcessStream &stream) |
Saves the information about all the windows known to this class and how they are laid out. More... | |
Protected Attributes | |
ModeEnum | Mode |
vtkMultiProcessController * | ParallelController |
vtkMultiProcessController * | ClientServerController |
vtkMultiProcessController * | ClientDataServerController |
unsigned long | ClientServerRMITag |
unsigned long | ClientServerGetZBufferValueRMITag |
unsigned long | ParallelRMITag |
bool | Enabled |
bool | RenderEventPropagation |
bool | RenderOneViewAtATime |
vtkWeakPointer< vtkPVSession > | Session |
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 48 of file vtkPVSynchronizedRenderWindows.h.
typedef vtkObject vtkPVSynchronizedRenderWindows::Superclass |
Definition at line 57 of file vtkPVSynchronizedRenderWindows.h.
Enumerator | |
---|---|
MAX_OP | |
MIN_OP | |
SUM_OP |
Definition at line 148 of file vtkPVSynchronizedRenderWindows.h.
anonymous enum |
Enumerator | |
---|---|
SYNC_MULTI_RENDER_WINDOW_TAG | |
GET_ZBUFFER_VALUE_TAG | |
SYNC_TILE_DISPLAY_PARAMATERS |
Definition at line 165 of file vtkPVSynchronizedRenderWindows.h.
Enumerator | |
---|---|
INVALID | |
BUILTIN | |
CLIENT | |
RENDER_SERVER | |
DATA_SERVER | |
BATCH |
Definition at line 221 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
|
protected |
|
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 |
|
static |
|
virtual |
|
static |
void vtkPVSynchronizedRenderWindows::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
virtual |
Returns a render window for use (possibly new).
|
virtual |
Register/UnRegister a window.
|
virtual |
Register/UnRegister a window.
vtkRenderWindow* vtkPVSynchronizedRenderWindows::GetRenderWindow | ( | unsigned int | id | ) |
Register/UnRegister a window.
|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Enable/Disable parallel rendering.
|
virtual |
Enable/Disable parallel rendering.
|
virtual |
Enable/Disable parallel rendering.
|
virtual |
Enable/Disable parallel rendering.
|
virtual |
Enable/Disable propagation of the render event.
This is typically true, unless the application is managing calling Render() on all processes involved.
|
virtual |
Enable/Disable propagation of the render event.
This is typically true, unless the application is managing calling Render() on all processes involved.
|
virtual |
Enable/Disable propagation of the render event.
This is typically true, unless the application is managing calling Render() on all processes involved.
|
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.
bool vtkPVSynchronizedRenderWindows::Reduce | ( | vtkIdType & | value, |
StandardOperations | operation | ||
) |
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 |
|
virtual |
|
virtual |
|
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 |
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 |
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 |
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.
|
inline |
Streaming uses this class as a conduit for messaging.
Need mode to use it correctly.
Definition at line 235 of file vtkPVSynchronizedRenderWindows.h.
vtkPVSession* vtkPVSynchronizedRenderWindows::GetSession | ( | ) |
Provides access to the session.
|
protected |
Set/Get the controller used for communication among parallel processes.
|
protected |
Set/Get the controller used for client-server communication.
|
protected |
Set/Get the controller used for client-data-server communication.
|
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.
|
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.
|
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.
|
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.
|
protectedvirtual |
|
protectedvirtual |
|
inlineprotectedvirtual |
Definition at line 291 of file vtkPVSynchronizedRenderWindows.h.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
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.
|
protected |
Definition at line 303 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 304 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 305 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 306 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 307 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 308 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 309 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 310 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 311 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 312 of file vtkPVSynchronizedRenderWindows.h.
|
protected |
Definition at line 314 of file vtkPVSynchronizedRenderWindows.h.