Constructor
new State(dataId)
Parameters:
Name | Type | Description |
---|---|---|
dataId | string | The associated data id. |
- Deprecated
- Since v0.34, please switch to DICOM SR annotations. History: - v0.5 (dwv 0.30.0, 12/2021): - store position as array, - new draw position group key. - v0.4 (dwv 0.29.0, 06/2021): - move drawing details into meta property, - remove scale center and translation, add offset. - v0.3 (dwv v0.23.0, 03/2018): - new drawing structure, drawings are now the full layer object and using toObject to avoid saving a string representation, - new details structure: simple array of objects referenced by draw ids. - v0.2 (dwv v0.17.0, 12/2016): - adds draw details: array [nslices][nframes] of detail objects. - v0.1 (dwv v0.15.0, 07/2016): - adds version, - drawings: array [nslices][nframes] with all groups. - initial release (dwv v0.10.0, 05/2015), no version number: - content: window-center, window-width, position, scale, scaleCenter, translation, drawings, - drawings: array [nslices] with all groups.
- Source
Classes
Methods
apply(app, data)
Load an application state from JSON.
Parameters:
Name | Type | Description |
---|---|---|
app | App | The app to apply the state to. |
data | object | The state data. |
- Source
fromJSON(json) → {object}
Load an application state from JSON.
Parameters:
Name | Type | Description |
---|---|---|
json | string | The state as a JSON string. |
- Source
Returns:
The state object.
- Type:
- object