Shift oidc and initWebworkers to own files
This commit is contained in:
1 parent
70f83f131a
commit
69fb4d7947
6 files changed
+113
-65
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} baseDirectory
|
||||
* @param {String} webWorkScriptsPath
|
||||
*/
|
||||
export default function(baseDirectory, webWorkScriptsPath) {
|
||||
const scriptsPath = `${baseDirectory}/${webWorkScriptsPath}`
|
||||
const config = {
|
||||
maxWebWorkers: Math.max(navigator.hardwareConcurrency - 1, 1),
|
||||
startWebWorkersOnDemand: true,
|
||||
webWorkerPath: `${scriptsPath}/cornerstoneWADOImageLoaderWebWorker.min.js`,
|
||||
taskConfiguration: {
|
||||
decodeTask: {
|
||||
loadCodecsOnStartup: true,
|
||||
initializeCodecsOnStartup: false,
|
||||
codecsPath: `${scriptsPath}/cornerstoneWADOImageLoaderCodecs.min.js`,
|
||||
usePDFJS: false,
|
||||
strict: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
cornerstoneWADOImageLoader.webWorkerManager.initialize(config)
|
||||
}
|
||||
Reference in new issue
Block a user