gui

dwv. gui

Classes

DrawLayer
LayerGroup
Stage
Style
ViewLayer

Members

(static) interactionEventNames

Source:

List of interaction event names.

Methods

(static) canCreateCanvas(width, height) → {boolean}

Source:
See:

Test if a canvas with the input size can be created.

Parameters:
Name Type Description
width number

The canvas width.

height number

The canvas height.

Returns:

True is the canvas can be created.

Type
boolean

(static) getElement(containerDivId, name) → {object}

Source:
Deprecated:
  • Yes

Get a HTML element associated to a container div.

Parameters:
Name Type Description
containerDivId number

The id of the container div.

name string

The name or id to find.

Returns:

The found element or null.

Type
object

(static) getEventOffset(event) → {Array}

Source:

Get the offset of an input event.

Parameters:
Name Type Description
event object

The event to get the offset from.

Returns:

The array of offsets.

Type
Array

(static) getLayerDetailsFromEvent(event) → {object}

Source:

Get the layer details from a mouse event.

Parameters:
Name Type Description
event object

The event to get the layer div id from. Expecting an event origininating from a canvas inside a layer HTML div with the 'layer' class and id generated with dwv.gui.getLayerGroupDivId.

Returns:

The layer details as {groupId, layerId}.

Type
object

(static) getLayerDetailsFromLayerDivId(idString) → {object}

Source:

Get the layer details from a div id.

Parameters:
Name Type Description
idString string

The layer group id.

Returns:

The layer details as {groupId, layerId}.

Type
object

(static) getLayerGroupDivId(groupId, layerId) → {string}

Source:

Get the layer group div id.

Parameters:
Name Type Description
groupId number

The layer group id.

layerId number

The lyaer id.

Returns:

A string id.

Type
string

(static) getTouchesPositions(touches) → {Array}

Source:

Get the positions (without the parent offset) of a list of touch events.

Parameters:
Name Type Description
touches Array

The list of touch events.

Returns:

The list of positions of the touch events.

Type
Array

(static) getViewOrientation(imageGeometry, targetOrientation) → {dwv.math.Matrix33}

Source:

Get a view orientation according to an image geometry (with its orientation) and target orientation.

Parameters:
Name Type Description
imageGeometry dwv.image.Geometry

The image geometry.

targetOrientation dwv.math.Matrix33

The target orientation.

Returns:

The view orientation.

Type
dwv.math.Matrix33

(static) OffsetBinder()

Source:

Offset binder.

(static) OpacityBinder()

Source:

Opacity binder. Only propagates to view layers of the same data.

(static) PositionBinder()

Source:

Position binder.

(static) prompt(message, value) → {string}

Source:

Prompt the user for some text. Uses window.prompt.

Parameters:
Name Type Description
message string

The message in front of the input field.

value string

The input default value.

Returns:

The new value.

Type
string

(static) WindowLevelBinder()

Source:

Window/level binder.

(static) ZoomBinder()

Source:

Zoom binder.