LoadController

dwv.ctrl. LoadController

new LoadController(defaultCharacterSet)

Source:

Load controller.

Parameters:
Name Type Description
defaultCharacterSet string

The default character set.

Methods

abort()

Source:

Abort the current loaders.

loadFiles(files, options)

Source:

Load a list of files. Can be image files or a state file.

Parameters:
Name Type Description
files Array

The list of files to load.

options object

The options object, can contain:

  • timepoint: an object with time information

loadImageObject(data)

Source:

Load a list of ArrayBuffers.

Parameters:
Name Type Description
data Array

The list of ArrayBuffers to load in the form of [{name: "", filename: "", data: data}].

loadURLs(urls, options)

Source:

Load a list of URLs. Can be image files or a state file.

Parameters:
Name Type Description
urls Array

The list of urls to load.

options object

The load options:

  • requestHeaders: an array of {name, value} to use as request headers.
  • withCredentials: credentials flag to pass to the request.

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 a 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.

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 load progress event. Default does nothing.

Parameters:
Name Type Description
_event object

The progress event.

(inner) augmentCallbackEvent(callback, info) → {object}

Source:

Augment a callback event: adds loadtype to the event passed to a callback.

Parameters:
Name Type Description
callback object

The callback to update.

info object

Info object to append to the event.

Returns:

A function representing the modified callback.

Type
object

(inner) getNextLoadId() → {number}

Source:

Get the next load id.

Returns:

The next id.

Type
number