DWVv0.37.0

WindowLevel

Source: windowLevel.js:6

Window and Level also known as window width and center.


Constructor

new WindowLevel(center: number, width: number): WindowLevel

Parameters

  • center (number) — The window center.
  • width (number) — The window width.

Instance Methods

activate(bool: boolean)

Activate the tool.

Parameters

  • bool (boolean) — The flag to activate or not.

init()

Initialise the tool.

setFeatures(features: object)

Set the tool live features.

Parameters

  • features (object) — The list of features.
    • features.strictViewLayer (boolean, optional) — Deprecated active view layer only for W/L drag and double-click (see WindowLevelDragBehavior).
    • features.activeViewLayerOnly (boolean, optional) — Active view layer only for W/L drag and double-click (see WindowLevelDragBehavior).

Instance Fields

center: number

The window center.

width: number

The window width.

keydown

Handle key down event.

Parameters

  • event (object) — The key down event.