A Transfer Function Editor for Browsers

How to use

Click and Drag circular controlpoints of transfer function widget to adjust position and transparency.

Double-click circular controlpoints of transfer function widget to pick or adjust a color value. The color value can be specified using either the hue slider and the saturation-/value picker or by entering RGB values in the input fields.

Click and Drag rectangular anchor of transfer function widget to move transfer function widget. Hold the Shift key while dragging to lock dragging direction to either horizontal or vertical dragging.

To add a controlpoint, either double-click or hold the Shift key and click on the line connecting the controlpoints.

Hold the Shift key and click on the handle to delete a controlpoint, or bring up the context menu with a right click.

Click and Drag the vertical edges of transfer function widget to horizontally scale the widget.

Right-click the rectangular anchor of a transfer function widget to bring up the context menu. You can delete the widget from this context menu, or change the layer ordering of the widgets.

Right-click any place in the transfer function editor to add a new transfer function widget and choose from a number of presets.

Demo and Documentation

This demo uses WebGL. Consider using Google Chrome or Mozilla Firefox if you have trouble viewing this demo.

Play around with the parameters of the volume rendering by adjusting the transfer function in the transfer function editor, picking a volume from the upper-right menu and modifying sampling rate and alpha correction. [ view fullscreen ]

Resulting transfer function

tf_panel.getTF() returns an array of [ value, { r, g, b, a } ] items.

The transfer function generated from these values looks like this:


The Transfer Function Editor's look and feel is customizable using multiple options passed when the editor is instantiated. All options are substituted by default values if not specified.

The options are passed as a JSON object and can be queried from the editor using tf_panel.getOptions()