Test OHIF Viewer against Cornerstone* version 2.0.0
This commit is contained in:
1 parent
c4b43f4536
commit
44233c48d6
9 files changed
+58
-347
No files matched your search
@@ -246,18 +246,23 @@ export const toolManager = {
|
||||
},
|
||||
|
||||
configureLoadProcess() {
|
||||
// Whenever the CornerstoneImageLoadProgress is fired, identify which viewports
|
||||
// Whenever CornerstoneImageLoadProgress is fired, identify which viewports
|
||||
// the "in-progress" image is to be displayed in. Then pass the percent complete
|
||||
// via the Meteor Session to the other templates to be displayed in the relevant viewports.
|
||||
$(cornerstone.events).on('CornerstoneImageLoadProgress', (e, eventData) => {
|
||||
viewportIndices = this.getKeysByValue(window.ViewportLoading, eventData.imageId);
|
||||
|
||||
function handleLoadProgress (e) {
|
||||
const eventData = e.detail;
|
||||
const viewportIndices = toolManager.getKeysByValue(window.ViewportLoading, eventData.imageId);
|
||||
viewportIndices.forEach(viewportIndex => {
|
||||
Session.set('CornerstoneLoadProgress' + viewportIndex, eventData.percentComplete);
|
||||
});
|
||||
|
||||
const encodedId = OHIF.string.encodeId(eventData.imageId);
|
||||
Session.set('CornerstoneThumbnailLoadProgress' + encodedId, eventData.percentComplete);
|
||||
});
|
||||
}
|
||||
|
||||
cornerstone.events.removeEventListener('cornerstoneimageloadprogress', handleLoadProgress);
|
||||
cornerstone.events.addEventListener('cornerstoneimageloadprogress', handleLoadProgress);
|
||||
},
|
||||
|
||||
setGestures(newGestures) {
|
||||
|
||||
Reference in new issue
Block a user