fix(volumeLoad): should not have missing slices when loading (#3287)

* fix(volumeLoad): should not have missing slices when loading

* add review comments
This commit is contained in:
Alireza authored and GitHub committed 2023-03-29 09:40:22 -04:00
1 parent 2f33e42004
commit 4734b3bac6
8 files changed
+81 -60

No files matched your search

@@ -506,19 +506,16 @@ class CornerstoneViewportService extends PubSubService
!hangingProtocolService.customImageLoadPerformed
) {
// delegate the volume loading to the hanging protocol service if it has a custom image load strategy
if (
hangingProtocolService.runImageLoadStrategy({
viewportId: viewport.id,
volumeInputArray,
})
) {
// Fallback to the default strategy if the custom one fails
return;
}
return hangingProtocolService.runImageLoadStrategy({
viewportId: viewport.id,
volumeInputArray,
});
}
volumeToLoad.forEach(volume => {
volume.load();
if (!volume.loadStatus.loaded && !volume.loadStatus.loading) {
volume.load();
}
});
// This returns the async continuation only