imageLoader
Index
Interfaces
ImageLoaderOptions
optionaladditionalDetails
priority
requestType
Functions
cancelLoadAll
Returns void
cancelLoadImage
Removes the imageId from the request pool manager and executes the
cancel
function if it exists.Parameters
imageId: string
A Cornerstone Image Object’s imageId
Returns void
cancelLoadImages
Removes the imageIds from the request pool manager and calls the
cancel
function if it exists.Parameters
imageIds: string[]
Array of Cornerstone Image Object’s imageIds
Returns void
loadAndCacheImage
Loads an image given an imageId and optional priority and returns a promise which will resolve to the loaded image object or fail if an error occurred. The image is stored in the cache.
Parameters
imageId: string
A Cornerstone Image Object’s imageId
options: ImageLoaderOptions = ...
Options to be passed to the Image Loader
Returns Promise<IImage>
Image Loader Object
loadAndCacheImages
Load and cache a list of imageIds
Parameters
imageIds: string[]
list of imageIds
options: ImageLoaderOptions = ...
options for loader
Returns Promise<IImage>[]
loadImage
Loads an image given an imageId and optional priority and returns a promise which will resolve to the loaded image object or fail if an error occurred. The loaded image is not stored in the cache.
Parameters
imageId: string
A Cornerstone Image Object’s imageId
options: ImageLoaderOptions = ...
Options to be passed to the Image Loader
Returns Promise<IImage>
An Object which can be used to act after an image is loaded or loading fails
registerImageLoader
Registers an imageLoader plugin with cornerstone for the specified scheme
Parameters
scheme: string
The scheme to use for this image loader (e.g. ‘dicomweb’, ‘wadouri’, ‘http’)
imageLoader: ImageLoaderFn
A Cornerstone Image Loader function
Returns void
registerUnknownImageLoader
Registers a new unknownImageLoader and returns the previous one
Parameters
imageLoader: ImageLoaderFn
A Cornerstone Image Loader
Returns ImageLoaderFn
The previous Unknown Image Loader
unregisterAllImageLoaders
Removes all registered and unknown image loaders. This should be called when the application is unmounted to prevent memory leaks.
Returns void
Removes all the ongoing image loads by calling the
cancel
method on each imageLoadObject. If nocancel
method is available, it will be ignored.