Open abby0127 opened 12 months ago
Your cornerstonejs
is version 1.11.1
, have update new version.
I updated the version to 1.14.4 and I get the same error!
Your
cornerstonejs
is version1.11.1
, have update new version.
It has to be like this
import * as libCornerstoneDicomImageLoader from '@cornerstonejs/dicom-image-loader';
Here is my code example
import * as libCornerstone from '@cornerstonejs/core';
import * as libCornerstoneDicomImageLoader from '@cornerstonejs/dicom-image-loader';
import libDicomParser from 'dicom-parser';
/**
* Init
* @returns {undefined}
*/
function init() {
libCornerstoneDicomImageLoader.external.cornerstone = libCornerstone;
libCornerstoneDicomImageLoader.external.dicomParser = libDicomParser;
libCornerstoneDicomImageLoader.configure({
useWebWorkers: true,
decodeConfig: {
convertFloatPixelDataToInt: false
}
});
let maxWebWorkers = 1;
if (navigator.hardwareConcurrency) {
maxWebWorkers = Math.min(navigator.hardwareConcurrency, 7);
}
libCornerstoneDicomImageLoader.webWorkerManager.initialize({
maxWebWorkers,
startWebWorkersOnDemand: false,
taskConfiguration: {
decodeTask: {
initializeCodecsOnStartup: false,
strict: false
}
}
});
}
// Export
export {
init
};
I've got a new problem. @jlopes90
This is not enough. You have to see the code where this problem "require".
Describe the Bug
I encountered issue below. Any help is appreciated.![image](https://github.com/cornerstonejs/cornerstone3D/assets/53502925/794f1643-9302-46af-9cc8-8f8f42d0cff1)
"@cornerstonejs/calculate-suv": "^1.0.3", "@cornerstonejs/core": "1.11.1", "@cornerstonejs/streaming-image-volume-loader": "1.11.1", "@cornerstonejs/tools": "1.11.1", "@cornerstonejs/dicom-image-loader": "1.11.1", " node": "14.18.0"
Steps to Reproduce
import dicomParser from 'dicom-parser' import * as cornerstone from '@cornerstonejs/core' import cornerstoneDICOMImageLoader from '@cornerstonejs/dicom-image-loader' export default function initCornerstoneDICOMImageLoader() { if (!cornerstoneDICOMImageLoader) return console.log(cornerstoneDICOMImageLoader) cornerstoneDICOMImageLoader.external.cornerstone = cornerstone cornerstoneDICOMImageLoader.external.dicomParser = dicomParser cornerstoneDICOMImageLoader.configure({ useWebWorkers: false, decodeConfig: { convertFloatPixelDataToInt: false } }) if (cornerstoneDICOMImageLoader.webWorkerManager.isInitialized) { let maxWebWorkers = 1
} }
The current behavior
The expected behavior
The development environment doesn't report this exception, but production throws it.
OS
Windows 10
Node version
14.18.0
Browser
Google Chrome 116.0.5845.142