Skip to main content

Function: createMergedLabelmapForIndex()

createMergedLabelmapForIndex(labelmaps, segmentIndex, volumeId): Types.IImageVolume

Given a list of labelmaps (with the possibility of overlapping regions), and a segmentIndex it creates a new labelmap with the same dimensions as the input labelmaps, but merges them into a single labelmap for the segmentIndex. It wipes out all other segment Indices. This is useful for calculating statistics regarding a specific segment when there are overlapping regions between labelmap (e.g. TMTV)

Parameters​

• labelmaps: ImageVolume[]

Array of labelmaps

• segmentIndex: number = 1

The segment index to merge

• volumeId: string = 'mergedLabelmap'

Returns​

Types.IImageVolume

Merged labelmap

Defined in​

tools/src/utilities/segmentation/createMergedLabelmapForIndex.ts:15