ParaViewWeb Manta setting

From KitwarePublic
Revision as of 20:08, 26 May 2010 by Sebastien.jourdain (talk | contribs) (Created page with 'ParaViewWeb ---- == Introduction == Manta is a plugin that can be used in Paraview to use the Manta Ray Tracer engine for the rendering. To make Manta available for ParaView…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

ParaViewWeb


Introduction

Manta is a plugin that can be used in Paraview to use the Manta Ray Tracer engine for the rendering. To make Manta available for ParaViewWeb, you will have to customize the setting of the PWServer executable to start a pvserver at the same time as the PWServer.

Configure the Web server

To do so, you will need to edit your pw-config.property file and replace the default one or create a new one like we did with the manta keyword.

 pw.executable.path.manta=.../ParaViewWeb-work/exec/manta.sh
 pw.plugins.manta=.../ParaViewWeb-work/plugins

So to use this configuration, the web developer will need to create the Paraview object as follow.

 var paraview = new Paraview("manta session", "sample code to start a manta session", "manta")

Starting scripts

As you will need to encapsulate in a single call the start of the pvserver and PWServer which act as a client against the pvserver, you will need to write a script like the following one. The limitation with the following one, is that only one server can run at a time since the default 11111 port will be used by the pvserver.

 #!/bin/bash
 .../ParaView-build/bin/pvserver &
 .../ParaViewWeb-build/ParaViewAdapter/PWServer --server-hostname=localhost --server-port=11111 --batch-file=.../manta-init.py $1 $2 $3 $4 $5 $6 $7

Moreover, in order to create a manta view, we have to load the plugin and create it from a server side python script which can also be inside a plugin. But what we provide here, is an automatic setting with no plugin involved.

 import paraview
 
 buildDir = '.../ParaView-build/bin'
 
 paraview.simple.LoadPlugin(buildDir+"/libMantaView.so", False)
 paraview.simple.LoadPlugin(buildDir+"/libMantaView.so", True)
 
 paraview.simple.active_objects.view = paraview.simple._create_view("MantaIceTDesktopRenderView")
 paraview.simple.active_objects.view.Threads = 8
 paraview.simple.active_objects.view.ViewSize = [300,300]