Hi. I have problem loading the mask/rtstruct to the V3-stable ROI Tool.
I converted the mask file as arraybuffer and followed steps as shown in the dcmjs example but the cornerstone tools have been moved to Cornerstone3D.
const {
labelmapBufferArray,
segMetadata,
segmentsOnFrame
} = dcmjs.adapters.Cornerstone.Segmentation.generateToolState(
imageIds,
arrayBuffer,
cornerstone.metaData,
);
This line below was showing the segmentation but the same i cannot use on the v3 Cornerstone as the segmentation module is not migrated to the updated Cornerstone 3d.
const { setters, state } = cornerstoneTools.getModule(
“segmentation”
);
console.log(labelmapBufferArray[0]);
setters.labelmap3DByFirstImageId(
imageIds[0],
labelmapBufferArray[0],
0,
segMetadata,
imageIds.length,
segmentsOnFrame
);
In the viewer it utilizes a scalardata Float32Array to show the segmentation over the image.
Any help in rendering the correct mask would be highly appretiated.
Thanks : )