Open hichenoe opened 3 years ago
I just had the same issue. The problem is that the configuration object was missing "decodeTasks". See https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/4bfa04759412d58647cc5d6bd0204aa37e4542e3/docs/WebWorkers.md#advanced-configuration
I'm now setting the configuration as follows:
var config = {
maxWebWorkers: navigator.hardwareConcurrency || 1,
startWebWorkersOnDemand : true,
webWorkerTaskPaths: [
'../examples/customWebWorkerTask/sleepTask.js',
'../examples/customWebWorkerTask/sharpenTask.js'
],
taskConfiguration: {
'decodeTask' : {
initializeCodecsOnStartup: false,
usePDFJS: false
}
}
};
cornerstoneWADOImageLoader.webWorkerManager.initialize(config);
I am attempting to open a DICOM image from my local machine (similar to the 'dicomfile' link in the live demo) and am getting the error "Cannot read property 'decodeTask' of undefined" which points to anonymous source map files that change every time I try to load an image in.
I am using the code from the 'dicomfile' index.html to grab a file and load the image.
Versions: cornerstone-core - 2.3.0 cornerstone-math - 0.1.9 cornerstone-tools - 5.1.3 cornerstone-wado-image-loader - 3.3.1 dicom-parser - 1.8.7 hammerjs - 2.0.8