DicomDataLoader

dwv.io. DicomDataLoader

new DicomDataLoader()

Source:

DICOM data loader.

Methods

abort()

Source:

Abort load.

canLoadFile(file) → {boolean}

Source:

Check if the loader can load the provided file.

Parameters:
Name Type Description
file object

The file to check.

Returns:

True if the file can be loaded.

Type
boolean

canLoadUrl(url) → {boolean}

Source:

Check if the loader can load the provided url. True if:

  • the url has a 'contentType' and it is 'application/dicom' (as in wado urls)
  • the url has no 'contentType' and no extension or the extension is 'dcm'
Parameters:
Name Type Description
url string

The url to check.

Returns:

True if the url can be loaded.

Type
boolean

isLoading() → {boolean}

Source:

Is the load ongoing?

Returns:

True if loading.

Type
boolean

load(buffer, origin, index)

Source:

Load data.

Parameters:
Name Type Description
buffer object

The DICOM buffer.

origin string

The data origin.

index number

The data index.

loadFileAs() → {number}

Source:

Get the file content type needed by the loader.

Returns:

One of the 'dwv.io.fileContentTypes'.

Type
number

loadUrlAs() → {number}

Source:

Get the url content type needed by the loader.

Returns:

One of the 'dwv.io.urlContentTypes'.

Type
number

onabort(_event)

Source:

Handle an abort event. Default does nothing.

Parameters:
Name Type Description
_event object

The abort event.

onerror(_event)

Source:

Handle an error event. Default does nothing.

Parameters:
Name Type Description
_event object

The error event.

onload(_event)

Source:

Handle a load event. Default does nothing.

Parameters:
Name Type Description
_event object

The load event fired when a file has been loaded successfully.

onloadend(_event)

Source:

Handle an load end event. Default does nothing.

Parameters:
Name Type Description
_event object

The load end event fired when a file load has completed, successfully or not.

onloaditem(_event)

Source:

Handle a load item event. Default does nothing.

Parameters:
Name Type Description
_event object

The load item event fired when a file item has been loaded successfully.

onloadstart(_event)

Source:

Handle a load start event. Default does nothing.

Parameters:
Name Type Description
_event object

The load start event.

onprogress(_event)

Source:

Handle a progress event. Default does nothing.

Parameters:
Name Type Description
_event object

The load progress event.

setOptions(opt)

Source:

Set the loader options.

Parameters:
Name Type Description
opt object

The input options.