diff --git a/src/store/modules/segmentationModule/getSegmentsOnPixeldata.js b/src/store/modules/segmentationModule/getSegmentsOnPixeldata.js index d468d4578..f1ece5269 100644 --- a/src/store/modules/segmentationModule/getSegmentsOnPixeldata.js +++ b/src/store/modules/segmentationModule/getSegmentsOnPixeldata.js @@ -3,21 +3,5 @@ * @param {UInt16Array|Float32Array} pixelData The pixel data array. */ export default function getSegmentsOnPixelData(pixelData) { - const segmentSet = new Set(pixelData); - const iterator = segmentSet.values(); - - const segmentsOnLabelmap = []; - let done = false; - - while (!done) { - const next = iterator.next(); - - done = next.done; - - if (!done) { - segmentsOnLabelmap.push(next.value); - } - } - - return segmentsOnLabelmap; + return [...new Set(pixelData)]; }