DWVv0.37.0

MultipartLoader

Source: multipartLoader.js:15

Multipart data loader.

Accumulates parsed parts from every load() call (one per URL) and hands them all to a single MemoryLoader once the last expected URL has arrived. This lets N multipart URLs – each containing M DICOM slices – be assembled correctly with numberOfItems = N × M.


Constructor

new MultipartLoader(): MultipartLoader

Instance Methods

load(buffer: object, origin: string, index: number)

Load data.

Parameters

  • buffer (object) — The DICOM buffer.
  • origin (string) — The data origin.
  • index (number) — The data index.

abort()

Abort load: pass to listeners.

isLoaderName(value: string): boolean

Check if the input is the loader name.

Parameters

  • value (string) — The test name.

Returns

  • boolean — True if input is the loader name.

canLoadMediaType(value: string): boolean

Check if the loader supports the input media type.

Parameters

  • value (string) — The media type.

Returns

  • boolean — True if it can be loaded.

loadFileAs(): number

Get the file content type needed by the loader.

Returns

  • number — One of the 'fileContentTypes'.

loadUrlAs(): number

Get the url content type needed by the loader.

Returns

  • number — One of the 'urlContentTypes'.