ImFusion Web SDK

useLabelConfig

ts

Returns the reactive LabelConfigMap state of a label map.

Subscribes to onLabelConfigChanged

Parameters

ParameterTypeDescription
labelMapSharedImageSet | nullThe label map to observe

Returns

ts

The current label config state as a Map<number, LabelConfig>, a function to change the whole map and a function to change individual entries

NameType
labelConfigs| Map<number, LabelConfig> | undefined
setLabelConfigs()(labelConfigMap: Map<number, LabelConfig>) => void
setLabelConfig()(labelValue: number, labelConfig: LabelConfig) => void

Throws

If called outside of an ImFusionProvider

Throws

If called before the SDK has finished initializing

Example

tsx