A JavaScript framework for client-side volume rendering. The WAVE Client Renderer is a subset of the WAVE framework, mainly to provide visual previews for large data sets.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
examples
res
src
.gitignore
Gruntfile.js
README.md
package.json
prepare_grunt.sh

README.md

WAVE Client Renderer

A JavaScript framework for client-side data rendering. The WAVE Client Renderer is a subset of the WAVE framework, mainly to provide visual previews for large data sets.

Workflow:

1. Clone this repo

$ git clone https://github.com/kit-ipe/WAVE-Client-Renderer.git

2. Go to the dir where you cloned repo

$ cd WAVE-Client-Renderer

3. Install npm

  • Opensuse 13.2
$ sudo zypper addrepo http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.2/ Node.js
$ sudo zypper in npm
  • Archlinux
$ sudo pacman -S npm

4. Prepare Grunt

$ ./prepare_grunt.sh

5. Compile all the source files into Javascript

$ grunt

Usage API:

You can call the API from your web developer console:

General information.

  1. Version.
$ wave.version();

Control.

  1. Start raycast.
$ wave.start();
  1. Stop raycast.
$ wave.stop();

Rendering modes

  1. Volume raycasting.
$ wave.showVolren();
  1. Surface rendering.
$ wave.showISO();
  1. Transfer function.
$ wave.setTransferFunctionByColors( [ {'color': '#ff0000', 'pos': 0.0},{'color': '#0000ff', 'pos': 0.50},{'color': '#ffffff', 'pos': 1.0}] );

Container

  1. Enable/disable cube container wireframe (val: [true | false]).
$ wave.showWireframe(val);
  1. Enable/disable showing hint container (val: [true | false]).
$ wave.showZoomBox(val);
  1. Set Zoom Box X-min (val: [0,1]).
$ wave.setZoomXMinValue(val)
  1. Set Zoom Box X-max (val: [0,1]).
$ wave.setZoomXMaxValue(val)
  1. Set Zoom Box Y-min (val: [0,1]).
$ wave.setZoomYMinValue(val)
  1. Set Zoom Box Y-max (val: [0,1]).
$ wave.setZoomYMaxValue(val)
  1. Set Zoom Box Z-min (val: [0,1]).
$ wave.setZoomZMinValue(val)
  1. Set Zoom Box Z-max (val: [0,1]).
$ wave.setZoomZMaxValue(val)
  1. Set Zoom Box Colour (val: HEX-codei, e.g., 0xff00ff).
$ wave.setZoomColor(val)

Data

  1. Set minimum gray value threshold (val: [0,1]).
$ wave.setGrayMinValue( val );
  1. Set maximum gray value threshold (val: [0,1]).
$ wave.setGrayMaxValue( val );
  1. Slice data from X-min (val: [0,1]).
$ wave.setGeometryMinX( val );
  1. Slice data from X-max (val: [0,1]).
$ wave.setGeometryMaxX( val );
  1. Slice data from Y-min (val: [0,1]).
$ wave.setGeometryMinY( val );
  1. Slice data from Y-max (val: [0,1]).
$ wave.setGeometryMaxY( val );
  1. Slice data from Z-min (val: [0,1]).
$ wave.setGeometryMinZ( val );
  1. Slice data from Z-max (val: [0,1]).
$ wave.setGeometryMaxZ( val );