Constructor
new Opacity(app)
Parameters:
Name | Type | Description |
---|---|---|
app | App | The associated application. |
- Source
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
Members
keydown
Handle key down event.
- Source
mousedown
Handle mouse down event.
- Source
mousemove
Handle mouse move event.
- Source
mouseout
Handle mouse out event.
- Source
mouseup
Handle mouse up event.
- Source
touchend
Handle touch end event.
- Source
touchmove
Handle touch move event.
- Source
touchstart
Handle touch start event.
- Source
wheel
Handle mouse wheel event.
- Source
Methods
activate(_bool)
Activate the tool.
Parameters:
Name | Type | Description |
---|---|---|
_bool | boolean | The flag to activate or not. |
- Source
init()
Initialise the tool.
- Source
setFeatures(_features)
Set the tool live features: does nothing.
Parameters:
Name | Type | Description |
---|---|---|
_features | object | The list of features. |
- Source