ParaViewWeb Manta setting: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(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…')
 
Line 3: Line 3:
== Introduction ==
== Introduction ==


Manta is a plugin that can be used in Paraview to use the Manta Ray Tracer engine for the rendering.
[http://mantawiki.sci.utah.edu/manta/index.php/Main_Page Manta] is a RayTracer engine which has been integrated as a plugin in Paraview.  
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.
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.



Revision as of 12:44, 27 May 2010

ParaViewWeb


Introduction

Manta is a RayTracer engine which has been integrated as a plugin in Paraview. 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]