Opacity

Opacity class.

Constructor

new Opacity(app)

Parameters:
NameTypeDescription
appApp

The associated application.

Example
// create the dwv app
const app = new dwv.App();
// initialise
const viewConfig0 = new dwv.ViewConfig('layerGroup0');
const viewConfigs = {'*': [viewConfig0]};
const options = new dwv.AppOptions(viewConfigs);
options.tools = {Opacity: new dwv.ToolConfig()};
app.init(options);
// activate tool
app.addEventListener('load', function () {
  app.setTool('Opacity');
});
// load dicom data
app.loadURLs([
  'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323851.dcm'
]);

Classes

Opacity

Members

keydown

Handle key down event.

mousedown

Handle mouse down event.

mousemove

Handle mouse move event.

mouseout

Handle mouse out event.

mouseup

Handle mouse up event.

touchend

Handle touch end event.

touchmove

Handle touch move event.

touchstart

Handle touch start event.

wheel

Handle mouse wheel event.

Methods

activate(_bool)

Activate the tool.

Parameters:
NameTypeDescription
_boolboolean

The flag to activate or not.

init()

Initialise the tool.

setFeatures(_features)

Set the tool live features: does nothing.

Parameters:
NameTypeDescription
_featuresobject

The list of features.