- Source
Classes
Members
(static) interactionEventNames
List of interaction event names.
- Source
Methods
(static) OffsetBinder()
Offset binder.
- Source
(static) OpacityBinder()
Opacity binder. Only propagates to view layers of the same data.
- Source
(static) PositionBinder()
Position binder.
- Source
(static) WindowLevelBinder()
Window/level binder.
- Source
(static) ZoomBinder()
Zoom binder.
- Source
(static) canCreateCanvas(width, height) → {boolean}
Test if a canvas with the input size can be created.
Name | Type | Description |
---|---|---|
width | number | The canvas width. |
height | number | The canvas height. |
- Source
True is the canvas can be created.
- Type:
- boolean
(static) getElement(containerDivId, name) → {object}
Get a HTML element associated to a container div.
Name | Type | Description |
---|---|---|
containerDivId | number | The id of the container div. |
name | string | The name or id to find. |
- Deprecated
- Yes
- Source
The found element or null.
- Type:
- object
(static) getEventOffset(event) → {Array}
Get the offset of an input event.
Name | Type | Description |
---|---|---|
event | object | The event to get the offset from. |
- Source
The array of offsets.
- Type:
- Array
(static) getLayerDetailsFromEvent(event) → {object}
Get the layer details from a mouse event.
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 |
- Source
The layer details as {groupDivId, layerId}.
- Type:
- object
(static) getLayerDetailsFromLayerDivId(idString) → {object}
Get the layer details from a div id.
Name | Type | Description |
---|---|---|
idString | string | The layer div id. |
- Source
The layer details as {groupDivId, layerId}.
- Type:
- object
(static) getLayerDivId(groupDivId, layerId) → {string}
Get the layer div id.
Name | Type | Description |
---|---|---|
groupDivId | string | The layer group div id. |
layerId | number | The lyaer id. |
- Source
A string id.
- Type:
- string
(static) getScaledOffset(offset, scale, newScale, center) → {object}
Get a scaled offset to adapt to new scale and such as the input center stays at the same position.
Name | Type | Description |
---|---|---|
offset | object | The previous offset as {x,y}. |
scale | object | The previous scale as {x,y}. |
newScale | object | The new scale as {x,y}. |
center | object | The scale center as {x,y}. |
- Source
The scaled offset as {x,y}.
- Type:
- object
(static) getTargetOrientation(imageOrientation, viewOrientation) → {dwv.math.Matrix33}
Get the target orientation according to an image and view orientation. The target orientation is used to go from target to real space.
Name | Type | Description |
---|---|---|
imageOrientation | dwv. | The image geometry. |
viewOrientation | dwv. | The view orientation. |
- Source
The target orientation.
- Type:
- dwv.
math. Matrix33
(static) getTouchesPositions(touches) → {Array}
Get the positions (without the parent offset) of a list of touch events.
Name | Type | Description |
---|---|---|
touches | Array | The list of touch events. |
- Source
The list of positions of the touch events.
- Type:
- Array
(static) getViewOrientation(imageOrientation, targetOrientation) → {dwv.math.Matrix33}
Get the view orientation according to an image and target orientation. The view orientation is used to go from target to image space.
Name | Type | Description |
---|---|---|
imageOrientation | dwv. | The image geometry. |
targetOrientation | dwv. | The target orientation. |
- Source
The view orientation.
- Type:
- dwv.
math. Matrix33
(static) prompt(message, value) → {string}
Prompt the user for some text. Uses window.prompt.
Name | Type | Description |
---|---|---|
message | string | The message in front of the input field. |
value | string | The input default value. |
- Source
The new value.
- Type:
- string