Re IDC #2765: fix loading of segmentations at first startup (#2768)

Re IDC #2761: fix loading of segmentations

update dcmjs to 0.19.9
This commit is contained in:
Davide Punzo authored and GitHub committed 2022-04-05 09:39:22 +02:00
1 parent b94d4782d1
commit 32828d9a6e
15 files changed
+173 -177

No files matched your search

@@ -47,14 +47,23 @@ export default async function setActiveLabelmap(
return labelmapIndex;
}
if (!displaySet.isLoaded) {
if (!displaySet.isLoaded && !displaySet.loadError) {
try {
await displaySet.load(referencedDisplaySet, studies);
} catch (error) {
displaySet.isLoaded = false;
displaySet.loadError = true;
displaySet.segLoadErrorMessagge = error.message;
onDisplaySetLoadFailure(error);
/*
* TODO: Improve the way we notify parts of the app
* that depends on derived display sets to be loaded.
* (Implement pubsub for better tracking of derived display sets)
*/
const event = new CustomEvent('segmentationLoadingError');
document.dispatchEvent(event);
return -1;
}
}