Fix annotation handling in setUpDicomLegacy function to support multiple annotations

This commit is contained in:
Ross
2025-11-10 11:57:27 +00:00
parent 697191dae9
commit 477276c4c5
+3 -1
View File
@@ -370,7 +370,7 @@ async function setUpDicomLegacy(element) {
const images = element.dataset.url.split(",");
const annotation = element.dataset.annotations;
const annotations = element.dataset.annotations.split(",");
//console.log("Dicom - load imageId: ", imageIds);
//for (let index = 0; index < imageIds.length; index++) {
@@ -382,6 +382,8 @@ async function setUpDicomLegacy(element) {
let imageIds = [];
for (let i = 0; i < images.length; i++) {
let data_url = images[i];
let annotation = annotations[i];
// check stack type
if (data_url.startsWith("data:image")) {
let imageId = "base64://" + data_url.split(",")[1];