Files
ohif-viewer/platform/viewer/src/utils/initWebWorkers.js
T

17 lines
464 B
JavaScript
Raw Normal View History

2019-05-29 08:39:54 -04:00
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';
2019-04-29 15:39:09 -04:00
export default function initWebWorkers() {
2019-04-29 15:39:09 -04:00
const config = {
maxWebWorkers: Math.max(navigator.hardwareConcurrency - 1, 1),
startWebWorkersOnDemand: true,
taskConfiguration: {
decodeTask: {
initializeCodecsOnStartup: false,
usePDFJS: false,
strict: false,
},
},
2019-05-29 08:39:54 -04:00
};
2019-04-29 15:39:09 -04:00
2019-05-29 08:39:54 -04:00
cornerstoneWADOImageLoader.webWorkerManager.initialize(config);
2019-04-29 15:39:09 -04:00
}