Re IDC #2604: show series (with unsupported modalities) on slides panel and on tag explorer (#2621)

* Re IDC #2604: show series (with unsupported modalities) on slides panel and on tag explorer
This commit is contained in:
Davide Punzo authored and GitHub committed 2021-11-30 15:15:51 +01:00
1 parent 460fdeb534
commit 65505d9bce
8 files changed
+232 -131

No files matched your search

+10 -4
View File
@@ -1,6 +1,4 @@
import cornerstone from 'cornerstone-core';
import cornerstoneTools from 'cornerstone-tools';
import getImageId from '../utils/getImageId.js';
const noop = () => {};
@@ -94,7 +92,11 @@ export class StudyPrefetcher {
}
this.element = element;
this.enabledElement = cornerstone.getEnabledElement(element);
try {
this.enabledElement = cornerstone.getEnabledElement(element);
} catch {
throw new Error('Failed to find the enabled element');
}
this.stopPrefetching();
this.prefetchDisplaySets(displaySetInstanceUID);
@@ -114,7 +116,11 @@ export class StudyPrefetcher {
* @param {number} timeout
*/
prefetchDisplaySetsAsync(element, timeout) {
this.enabledElement = cornerstone.getEnabledElement(element);
try {
this.enabledElement = cornerstone.getEnabledElement(element);
} catch {
throw new Error('Failed to find the enabled element');
}
timeout = timeout || this.options.prefetchDisplaySetsTimeout;
clearTimeout(this.prefetchDisplaySetsHandler);
this.prefetchDisplaySetsHandler = setTimeout(() => {