RawImageLoader

dwv.io. RawImageLoader

new RawImageLoader()

Source:

Raw image 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.

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? TODO...

Returns:

True if loading.

Type
boolean

load(buffer, origin, index)

Source:

Load data.

Parameters:
Name Type Description
buffer object

The read data.

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.

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 progress event.

setOptions(_opt)

Source:

Set the loader options.

Parameters:
Name Type Description
_opt object

The input options.