[Paraview] ParaView + SetEyeAngle()?

Berk Geveci berk.geveci at gmail.com
Wed Mar 8 15:33:57 EST 2006


Here is brief introduction to server manager (the user's guide has
more information I believe):

ParaView works in client/server. Because of this, it is not always
possible for the client to access vtk objects directly (some of them
reside on the server). Instead of directly accessing vtk objects, the
client code accesses proxies manager by the server manager code. A
proxy is a client-side representation of a distributed object. It has
properties. These can be set (or get). Once properties are set, they
can be pushed to the server. For example:

# get the proxy from the server manager
coneProxy = proxyManager.GetProxy("sources", "myCone")
# get a property to set
res = coneProxy.GetProperty("PhiResolution")
# set the resolution (not pushed to the server yet)
res.SetElement(0, 24)
# push changes to the server
coneProxy.UpdateVTKObjects()

Proxy and properties are described in XML files that are in
Servers/ServerManager/Resources/. It is also possible to load more XML
files at run-time or compile them in. To set the eye angle, you first
have to add the appropriate property to the appropriate XML file. This
is a bit more tricky than simple sources and filters because all
global rendering parameters used in paraview is encapsulated in a
proxy call render module. This is a complicated, compound proxy (with
bunch of sub-proxies). Anyway, the following change to rendering.xml
should expose SetEyeAngle (based on current cvs):

Index: rendering.xml
===================================================================
RCS file: /cvsroot/ParaView/ParaView/Servers/ServerManager/Resources/rendering.xml,v
retrieving revision 1.72
diff -p -r1.72 rendering.xml
*** rendering.xml       6 Mar 2006 14:58:31 -0000       1.72
--- rendering.xml       8 Mar 2006 20:28:30 -0000
***************
*** 353,358 ****
--- 353,366 ----
          default_values="0">
          <BooleanDomain name="bool" />
        </IntVectorProperty>
+
+       <DoubleVectorProperty
+         name="EyeAngle"
+         command="SetEyeAngle"
+         number_of_elements="1"
+         default_values="2.0">
+         <DoubleRangeDomain name="range" min="0" />
+       </DoubleVectorProperty>
      </Proxy> <!-- end of Camera Proxy -->
    </ProxyGroup>

***************
*** 1276,1281 ****
--- 1284,1290 ----
            <Property name="CameraParallelScaleInfo" />
            <Property name="CameraParallelScale" />
            <Property name="CameraParallelProjection" />
+           <Property name="EyeAngle" />
          </ExposedProperties>
        </SubProxy>
        <SubProxy>


Once this is compile, you can do things like this on the command prompt:

(paraview-build) 10 % $Application GetRenderModuleProxy
vtkTemp1276
(paraview-build) 11 % vtkTemp1276 GetProperty EyeAngle
vtkTemp1277
(paraview-build) 12 % vtkTemp1277 GetElement 0
2
(paraview-build) 13 % vtkTemp1277 SetElement 0 5
1
(paraview-build) 14 % vtkTemp1276 UpdateVTKObjects
(paraview-build) 15 % vtkTemp1277 SetElement 0 30
1
(paraview-build) 16 % vtkTemp1276 UpdateVTKObjects

This is pretty brief :-) Let me know if you have questions.

-Berk

On 2/25/06, Paul Rajlich <paul at visbox.com> wrote:
>
> Hi ParaView people,
>
> When using ParaView with stereo, is there a way to manually set the eye
> separation? I didn't see anything in the gui. In the tcl interactor window I
> have an instance of vtkPVRenderView (e.g. $kw(vtkTempNN)) but calling
> "ListMethods" does not show the "GetRenderer" method. I was hoping to get a
> handle to the active camera through the renderer.
>
> Occasionally I want to move closer to a visualization to see detail and the
> eye separation is too much. A good example of this is the closeup flythrough
> of the blunt fin visualization in the ParaView demo. With stereo on it is
> unwatchable.
>
> Thanks!
> -Paul Rajlich
>  Visbox, Inc.
>  www.visbox.com
>  paul at visbox.com
>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list