ParaViewWeb Envision

From KitwarePublic
Jump to navigationJump to search

Introduction

EnVision is a tool to remotely visualize dataset through a web browser. It allows you to transparently user remote visualization resources through a thin web based client from anywhere in the world.

Some more information can be found here: http://www.vizworld.com/2010/05/envision-scientific-visualization-web-browser/

How EnVision works

EnVision is a customizable web application developed in PHP which rely on a custom VTK engine which provides a simple but efficient API. The idea behind EnVision is to simplify post-processing data analysis by providing a Web portal that offer the required features for data analysis.

EnVision components

The rendering

 3D based on  <--- VNC TCP connection --->   X Server
 VNC Applet        

The Interaction

 JavaScript   <--- HTTP request ---> PHP server <--- XML on TCP socket ---> VTK Engine

Available RPC commands

  • getEngine()
    • Return the name of the remote engine, from which available algorithms and features will depend on.
  • getDatasetInfo()
    • Return the dataset information such as the list of Scalar data or Vector data, bounds...
  • getAlgorithmDescriptions()
    • Return the engine state with all the algorithms values in an XML format. This output is used to extract algorithm parameter value and generate the HTML form to configure any algorithm.
  • setVisibility($index, $value)
    • Show or Hide the Algorithm that is stored at the given index in the engine model array.
  • deleteAlgorithm($index)
    • Remove from engine the Algorithm that is stored at the given index in the engine model array.
  • setInteracting($index, $value)
    • Show or Hide the Widget of a given Algoritm.
  • changeBGColor($r, $g, $b)
    • Update the background color
  • loadDataset($filename)
    • Load a given dataset based on a server file path

Dynamic Form generation for Algorithm settings

The server return the state of all algorithms as an XML form. The PHP server process this response and extract only the settings for the current selected algorithm and generate an HTML form based on custom field type.

 List of available field types:

   choice, dimensionList, dimensionValue, 
   fixedRangeStep, fixedRangeValue, 
   numericString, transfer2d, 
   variableListAll, variableListScalars, variableListVectors
   variableRange, variableValue


How ParaViewWeb integration could be done

As ParaViewWeb is mostly Client based, its integration will consist as moving the Sever/PHP code into JavaScript. Basically, creating a EnVision.js file which provides all the API that the current RPC client provides. And wrap the desire ParaView algorithm into JavaScript with a common API which could look like that.

EnVision
 loadData(filePath)
 getDataInformation()    => Some data structure object
 
 addAlgorithm(name)      => Algorithm
 getNumberOfAlgorithms() => Number
 getAlgorithm(index)     => Algorithm
 deleteAlgorithm(index)  
 getAvailableAlgorithmNames() => ['iso', 'clip', ...]
 showConfigurationForm(state)
 setBgColor(red, green, blue)
Algorithm
  getName()
  setVisible(show)
  hasWidget()          => Boolean
  enableWidget(enable)
  getState()           => Some data structure object
  updateState(state)