Add WebWorker configuration to StandaloneViewer. Fix issue with displaySet sorting
This commit is contained in:
parent
4783d1634b
commit
f0fe96fb19
@ -52,6 +52,8 @@ Template.viewer.onCreated(() => {
|
|||||||
ViewerData[contentId].studyInstanceUids = [];
|
ViewerData[contentId].studyInstanceUids = [];
|
||||||
instance.data.studies.forEach(study => {
|
instance.data.studies.forEach(study => {
|
||||||
study.selected = true;
|
study.selected = true;
|
||||||
|
const studyMetadata = new OHIF.metadata.StudyMetadata(study);
|
||||||
|
study.displaySets = OHIF.viewerbase.sortingManager.getDisplaySets(studyMetadata);
|
||||||
OHIF.viewer.Studies.insert(study);
|
OHIF.viewer.Studies.insert(study);
|
||||||
ViewerData[contentId].studyInstanceUids.push(study.studyInstanceUid);
|
ViewerData[contentId].studyInstanceUids.push(study.studyInstanceUid);
|
||||||
});
|
});
|
||||||
|
|||||||
21
StandaloneViewer/StandaloneViewer/client/config.js
Normal file
21
StandaloneViewer/StandaloneViewer/client/config.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { Meteor } from 'meteor/meteor';
|
||||||
|
import { cornerstoneWADOImageLoader } from 'meteor/ohif:cornerstone';
|
||||||
|
|
||||||
|
Meteor.startup(function() {
|
||||||
|
const maxWebWorkers = Math.max(navigator.hardwareConcurrency - 1, 1);
|
||||||
|
const config = {
|
||||||
|
maxWebWorkers: maxWebWorkers,
|
||||||
|
startWebWorkersOnDemand: true,
|
||||||
|
webWorkerPath : Meteor.absoluteUrl('packages/ohif_cornerstone/public/js/cornerstoneWADOImageLoaderWebWorker.es5.js'),
|
||||||
|
taskConfiguration: {
|
||||||
|
'decodeTask' : {
|
||||||
|
loadCodecsOnStartup : true,
|
||||||
|
initializeCodecsOnStartup: false,
|
||||||
|
codecsPath: Meteor.absoluteUrl('packages/ohif_cornerstone/public/js/cornerstoneWADOImageLoaderCodecs.es5.js'),
|
||||||
|
usePDFJS: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
cornerstoneWADOImageLoader.webWorkerManager.initialize(config);
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue
Block a user