DWVv0.37.0

DataController

Source: dataController.js:483

DicomData controller.


Constructor

new DataController(): DataController

Instance Methods

getNextDataId(): string

Get the next data id.

Returns

  • string — The data id.

getDataIds(): Array.<string>

Get the list of ids in the data storage.

Returns

  • Array.<string> — The list of data ids.

reset()

Reset the class: empty the data storage.

get(dataId: string): DicomData | undefined

Get a data at a given index.

Parameters

  • dataId (string) — The data id.

Returns

getDataIdsFromSopUids(uids: Array.<string>): Array.<string>

Get the list of dataIds that contain the input UIDs.

Parameters

  • uids (Array.<string>) — A list of UIDs.

Returns

  • Array.<string> — The list of dataIds that contain the UIDs.

getDataIdFromSeriesUid(uid: string): string

Get the first data id with the given SeriesInstanceUID.

Parameters

  • uid (string) — The SeriesInstanceUID.

Returns

  • string — The data id.

setImage(dataId: string, image: Image)

Set the image at a given index.

Parameters

  • dataId (string) — The data id.
  • image (Image) — The image to set.

add(dataId: string, data: DicomData): boolean

Add a new data.

Parameters

  • dataId (string) — The data id.
  • data (DicomData) — The data.

Returns

  • boolean — False if the data cannot be added.

remove(dataId: string)

Remove a data from the list.

Parameters

  • dataId (string) — The data id.

stash(dataId: string)

Stash a data from the list.

Parameters

  • dataId (string) — The data id.

unstash(dataId: string)

Unstash a data from the list.

Parameters

  • dataId (string) — The data id.

getStashedDataIds(): Array.<string>

Get the list of ids in the stashed data storage.

Returns

  • Array.<string> — The list of data ids.

getStashed(dataId: string): DicomData | undefined

Get a stashed data at a given index.

Parameters

  • dataId (string) — The data id.

Returns

update(dataId: string, data: DicomData)

Update the current data.

Parameters

  • dataId (string) — The data id.
  • data (DicomData) — The data.

markDataAsComplete(dataId: string): Object

Mark a data a complete (fully loaded).

Parameters

  • dataId (string) — The data id.

Returns

  • Object — An object with an imageHasChanged property.

Events

dataimageset: CustomEvent

Data image set event.

Properties

  • detail (object) — The event detail.
    • detail.value (Array) — The event value, first element is the image.
    • detail.dataid (string) — The data id.

dataadd: CustomEvent

Data add event.

Properties

  • detail (object) — The event detail.
    • detail.dataid (string) — The data id.

dataremove: CustomEvent

Data remove event.

Properties

  • detail (object) — The event detail.
    • detail.dataid (string) — The data id.

dataupdate: CustomEvent

Data update event.

Properties

  • detail (object) — The event detail.
    • detail.dataid (string) — The data id.