add new viewer folder

This commit is contained in:
Erik Ziegler committed 2018-12-14 15:23:48 +01:00
1 parent d541c23117
commit fc5bd73c1e
26 files changed
+23182

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
import { OHIF } from 'ohif-core';
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';
import sha from './sha.js';
import version from './version.js';
OHIF.info = {
sha,
version
};
const maxWebWorkers = Math.max(navigator.hardwareConcurrency - 1, 1);
const config = {
maxWebWorkers,
startWebWorkersOnDemand: true,
webWorkerPath: OHIF.utils.absoluteUrl('packages/ohif_cornerstone/public/js/cornerstoneWADOImageLoaderWebWorker.es5.js'),
taskConfiguration: {
decodeTask: {
loadCodecsOnStartup: true,
initializeCodecsOnStartup: false,
codecsPath: OHIF.utils.absoluteUrl('packages/ohif_cornerstone/public/js/cornerstoneWADOImageLoaderCodecs.es5.js'),
usePDFJS: false
}
}
};
cornerstoneWADOImageLoader.webWorkerManager.initialize(config);
cornerstoneWADOImageLoader.configure({
beforeSend: function(xhr) {
const headers = OHIF.DICOMWeb.getAuthorizationHeader();
if (headers.Authorization) {
xhr.setRequestHeader("Authorization", headers.Authorization);
}
}
});