Skip to content

RemotingViews: Expose pvx file details to client side

Support getting CAVE configuration information from pvx files read by the servers into the hands of the client. For example, consider the following pvx file:

LeftRightFloor.pvx
<?xml version="1.0" ?>
<pvx>
  <Process Type="server">
    <Machine Name="Left"
      Geometry="640x360+60+1200"
      ShowBorders="0"
      LowerLeft="-1.13 -0.635 1.04"
      LowerRight="-1.13 -0.635 -1.22"
      UpperRight="-1.13  0.635 -1.22"
    />
    <Machine Name="Right"
      Geometry="640x360+700+1200"
      ShowBorders="0"
      LowerLeft="-1.13 -0.635  -1.22"
      LowerRight="1.13 -0.635 -1.22"
      UpperRight="1.13  0.635 -1.22"
    />
    <Machine Name="Floor"
      Geometry="640x360+700+1560"
      ShowBorders="0"
      LowerLeft="-1.13 -0.635  0.05"
      LowerRight="1.13 -0.635  0/05"
      UpperRight="1.13 -0.635 -1.22"
    />
  </Process>
</pvx>

If you start a server with that file, as follows:

./bin/mpiexec -np 3 ./bin/pvserver --pvx LeftRightFloor.pvx

and then connect the client, you can query the render view proxy for the information in the pvx file as shown below:

Python 3.11.9 (main, Apr  6 2024, 17:59:24) [GCC 9.4.0] on linux
>>> from paraview.simple import *
>>> rv = GetActiveView()
>>> rv.GetIsInCAVE()
True
>>> rv.GetHasCorners(0)
True
>>> rv.GetLowerLeft(0)
vtkmodules.vtkCommonMath.vtkTuple_IdLi3EE([-1.13, -0.635, 1.04])
>>> rv.GetLowerRight(0)
vtkmodules.vtkCommonMath.vtkTuple_IdLi3EE([-1.13, -0.635, -1.22])
>>> rv.GetUpperRight(0)
vtkmodules.vtkCommonMath.vtkTuple_IdLi3EE([-1.13, 0.635, -1.22])
>>> rv.GetGeometry(0)
vtkmodules.vtkCommonMath.vtkTuple_IiLi4EE([60, 1200, 640, 360])

... and similarly for the other screens (index 1, and 2). If the system is not in CAVE mode, then asking for information about the displays prints an error.

Edited by Scott Wittenburg

Merge request reports