Constructor
new LayerGroup(containerDiv)
Name | Type | Description |
---|---|---|
containerDiv | HTMLElement | The associated HTML div. |
- Source
Classes
Methods
addDrawLayer() → {DrawLayer}
Add a draw layer.
- Source
The created layer.
- Type:
- DrawLayer
addEventListener(type, callback)
Add an event listener to this class.
Name | Type | Description |
---|---|---|
type | string | The event type. |
callback | function | The function associated with the provided event type, will be called with the fired event. |
- Source
addScale(scaleStep, center)
Add scale to the layers. Scale cannot go lower than 0.1.
Name | Type | Description |
---|---|---|
scaleStep | number | The scale to add. |
center | Point3D | The scale center Point3D. |
- Source
addTranslation(translation)
Add translation to the layers.
Name | Type | Description |
---|---|---|
translation | object | The translation as {x,y,z}. |
- Source
addViewLayer() → {ViewLayer}
Add a view layer.
- Source
The created layer.
- Type:
- ViewLayer
calculateFitScale() → {number|undefined}
Calculate the fit scale: the scale that fits the largest data.
- Source
The fit scale.
- Type:
- number |
undefined
display(flag)
Display the layer.
Name | Type | Description |
---|---|---|
flag | boolean | Whether to display the layer or not. |
- Source
draw()
Draw the layer.
- Source
empty()
Empty the layer list.
- Source
flipScaleZ()
Flip all layers along the Z axis without offset compensation.
- Source
getActiveDrawLayer() → {DrawLayer}
Get the active draw layer.
- Source
The layer.
- Type:
- DrawLayer
getActiveViewLayer() → {ViewLayer}
Get the active image layer.
- Source
The layer.
- Type:
- ViewLayer
getAddedScale() → {object}
Get the added scale: the scale added to the base scale
- Source
The scale as {x,y,z}.
- Type:
- object
getBaseScale() → {object}
Get the base scale.
- Source
The scale as {x,y,z}.
- Type:
- object
getDivId() → {string}
Get the Id of the container div.
- Source
The id of the div.
- Type:
- string
getDrawLayersByDataIndex(index) → {Array.<DrawLayer>}
Get the draw layers associated to a data index.
Name | Type | Description |
---|---|---|
index | number | The data index. |
- Source
The layers.
- Type:
- Array.<DrawLayer>
getMaxSize() → {object|undefined}
Get the largest data size.
- Source
The largest size as {x,y}.
- Type:
- object |
undefined
getNumberOfLayers() → {number}
Get the number of layers handled by this class.
- Source
The number of layers.
- Type:
- number
getOffset() → {object}
Get the layer offset.
- Source
The offset as {x,y,z}.
- Type:
- object
getScale() → {object}
Get the layer scale.
- Source
The scale as {x,y,z}.
- Type:
- object
getShowCrosshair() → {boolean}
Get the showCrosshair flag.
- Source
True to display the crosshair.
- Type:
- boolean
getTargetOrientation() → {Matrix33}
Get the target orientation.
- Source
The orientation matrix.
- Type:
- Matrix33
getViewDataIndices() → {Array}
Get the view layers data indices.
- Source
The list of indices.
- Type:
- Array
getViewLayersByDataIndex(index) → {Array.<ViewLayer>}
Get the view layers associated to a data index.
Name | Type | Description |
---|---|---|
index | number | The data index. |
- Source
The layers.
- Type:
- Array.<ViewLayer>
removeEventListener(type, callback)
Remove an event listener from this class.
Name | Type | Description |
---|---|---|
type | string | The event type. |
callback | function | The function associated with the provided event type. |
- Source
reset()
Reset the stage to its initial scale and no offset.
- Source
searchViewLayers(meta) → {Array.<ViewLayer>}
Search view layers for equal imae meta data.
Name | Type | Description |
---|---|---|
meta | object | The meta data to find. |
- Source
The list of view layers that contain matched data.
- Type:
- Array.<ViewLayer>
setActiveDrawLayer(index)
Set the active draw layer.
Name | Type | Description |
---|---|---|
index | number | The index of the layer to set as active. |
- Source
setActiveDrawLayerByDataIndex(index)
Set the active draw layer with a data index.
Name | Type | Description |
---|---|---|
index | number | The data index. |
- Source
setActiveViewLayer(index)
Set the active view layer.
Name | Type | Description |
---|---|---|
index | number | The index of the layer to set as active. |
- Source
setActiveViewLayerByDataIndex(index)
Set the active view layer with a data index.
Name | Type | Description |
---|---|---|
index | number | The data index. |
- Source
setFitScale(scaleIn)
Set the layer group fit scale.
Name | Type | Description |
---|---|---|
scaleIn | number | The fit scale. |
- Source
setOffset(newOffset)
Set the layers' offset.
Name | Type | Description |
---|---|---|
newOffset | object | The offset as {x,y,z}. |
- Source
setScale(newScale, centeropt)
Set the layers' scale.
Name | Type | Attributes | Description |
---|---|---|---|
newScale | object | The scale to apply as {x,y,z}. | |
center | Point3D | <optional> | The scale center Point3D. |
- Source
setShowCrosshair(flag)
Set the showCrosshair flag.
Name | Type | Description |
---|---|---|
flag | boolean | True to display the crosshair. |
- Source
setTargetOrientation(orientation)
Set the target orientation.
Name | Type | Description |
---|---|---|
orientation | Matrix33 | The orientation matrix. |
- Source
updateLayersToPositionChange(event)
Update layers (but not the active view layer) to a position change.
Name | Type | Description |
---|---|---|
event | object | The position change event. |
- Source
Events
offsetchange
Offset change event.
- object
Name | Type | Description |
---|---|---|
value | Array | The changed value. |
- Source
zoomchange
Zoom change event.
- object
Name | Type | Description |
---|---|---|
value | Array | The changed value. |
- Source