DicomDataLoader

DICOM data loader.

Constructor

new DicomDataLoader()

Methods

abort()

Abort load.

canLoadFile(file) → {boolean}

Check if the loader can load the provided file.

Parameters:
NameTypeDescription
fileobject

The file to check.

Returns:

True if the file can be loaded.

Type: 
boolean

canLoadMemory(mem) → {boolean}

Check if the loader can load the provided memory object.

Parameters:
NameTypeDescription
memobject

The memory object.

Returns:

True if the object can be loaded.

Type: 
boolean

canLoadUrl(url, optionsopt) → {boolean}

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:
NameTypeAttributesDescription
urlstring

The url to check.

optionsobject<optional>

Optional url request options.

Returns:

True if the url can be loaded.

Type: 
boolean

isLoading() → {boolean}

Is the load ongoing?

Returns:

True if loading.

Type: 
boolean

load(buffer, origin, index)

Load data.

Parameters:
NameTypeDescription
bufferobject

The DICOM buffer.

originstring

The data origin.

indexnumber

The data index.

loadFileAs() → {number}

Get the file content type needed by the loader.

Returns:

One of the 'fileContentTypes'.

Type: 
number

loadUrlAs() → {number}

Get the url content type needed by the loader.

Returns:

One of the 'urlContentTypes'.

Type: 
number

onabort(_event)

Handle an abort event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The abort event.

onerror(_event)

Handle an error event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The error event.

onload(_event)

Handle a load event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

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

onloadend(_event)

Handle an load end event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

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

onloaditem(_event)

Handle a load item event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

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

onloadstart(_event)

Handle a load start event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The load start event.

onprogress(_event)

Handle a progress event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The load progress event.

setOptions(opt)

Set the loader options.

Parameters:
NameTypeDescription
optobject

The input options.