WindowLevel

Window and Level also known as window width and center.

Constructor

new WindowLevel(center, width)

Parameters:
NameTypeDescription
centernumber

The window center.

widthnumber

The window width.

Classes

WindowLevel
WindowLevel

Members

center :number

The window center.

Type:
  • number

dblclick

Handle double click event.

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.

width :number

The window width.

Type:
  • number

Methods

activate(_bool)

Activate the tool.

Parameters:
NameTypeDescription
_boolboolean

The flag to activate or not.

equals(rhs) → {boolean}

Check for equality.

Parameters:
NameTypeDescription
rhsWindowLevel

The other object to compare to.

Returns:

True if both objects are equal.

Type: 
boolean

init()

Initialise the tool.

setFeatures(_features)

Set the tool live features: does nothing.

Parameters:
NameTypeDescription
_featuresobject

The list of features.

WindowLevel WindowLevel

WindowLevel tool: handle window/level related events.

Constructor

new WindowLevel(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 = {WindowLevel: new dwv.ToolConfig()};
app.init(options);
// activate tool
app.addEventListener('load', function () {
  app.setTool('WindowLevel');
});
// load dicom data
app.loadURLs([
  'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323851.dcm'
]);

Classes

WindowLevel
WindowLevel

Members

center :number

The window center.

Type:
  • number

dblclick

Handle double click event.

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.

width :number

The window width.

Type:
  • number

Methods

activate(_bool)

Activate the tool.

Parameters:
NameTypeDescription
_boolboolean

The flag to activate or not.

equals(rhs) → {boolean}

Check for equality.

Parameters:
NameTypeDescription
rhsWindowLevel

The other object to compare to.

Returns:

True if both objects are equal.

Type: 
boolean

init()

Initialise the tool.

setFeatures(_features)

Set the tool live features: does nothing.

Parameters:
NameTypeDescription
_featuresobject

The list of features.