Skip to main content

Function: createAndCacheDerivedLabelmapImage()

createAndCacheDerivedLabelmapImage(referencedImageId, options): IImage

Creates and caches a derived segmentation image based on the referenced image ID. this is a helper function, we don't have segmentation concept in the cornerstone core; however, this helper would make it clear that the segmentation images SHOULD be Uint8Array type always until we have a better solution.

Parameters

referencedImageId: string

The ID of the referenced image.

options: DerivedImageOptions = ...

The options for creating the derived image (default: { targetBuffer: { type: 'Uint8Array' } }).

Returns

IImage

A promise that resolves to the created derived segmentation image.

Defined in

packages/core/src/loaders/imageLoader.ts:675