feat(dicomImageLoader): replace wado image loader with the new library (#3339)

* use new dicom image loader instead of cswil

new dicom image loader fails

update dicom image loader

update yarn lock

modify webpack

* update webpack

* fix webpack

* update package versions

* update package versions
This commit is contained in:
Alireza authored and GitHub committed 2023-04-26 20:55:56 -04:00
1 parent 66863281c4
commit eea0ed487b
16 files changed
+80 -93

No files matched your search

+1 -1
View File
@@ -124,7 +124,7 @@ module.exports = (env, argv) => {
patterns: [
{
from:
'../../../node_modules/cornerstone-wado-image-loader/dist/dynamic-import',
'../../../node_modules/@cornerstonejs/dicom-image-loader/dist/dynamic-import',
to: DIST_DIR,
},
],
+5 -1
View File
@@ -66,7 +66,11 @@
"config-point": "^0.4.8",
"core-js": "^3.16.1",
"cornerstone-math": "^0.1.9",
"cornerstone-wado-image-loader": "^4.13.0",
"@cornerstonejs/dicom-image-loader": "^0.4.0",
"@cornerstonejs/codec-charls": "^1.2.3",
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"dcmjs": "^0.29.5",
"detect-gpu": "^4.0.16",
"dicom-parser": "^1.8.9",
@@ -1,11 +1,11 @@
import dcmjs from 'dcmjs';
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';
import dicomImageLoader from '@cornerstonejs/dicom-image-loader';
import FileLoader from './fileLoader';
const DICOMFileLoader = new (class extends FileLoader {
fileType = 'application/dicom';
loadFile(file, imageId) {
return cornerstoneWADOImageLoader.wadouri.loadFileRequest(imageId);
return dicomImageLoader.wadouri.loadFileRequest(imageId);
}
getDataset(image, imageId) {
@@ -1,4 +1,4 @@
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';
import dicomImageLoader from '@cornerstonejs/dicom-image-loader';
import FileLoader from './fileLoader';
import PDFFileLoader from './pdfFileLoader';
@@ -15,7 +15,7 @@ class FileLoaderService extends FileLoader {
}
addFile(file) {
return cornerstoneWADOImageLoader.wadouri.fileManager.add(file);
return dicomImageLoader.wadouri.fileManager.add(file);
}
loadFile(file, imageId) {
@@ -1,10 +1,10 @@
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';
import dicomImageLoader from '@cornerstonejs/dicom-image-loader';
import FileLoader from './fileLoader';
const PDFFileLoader = new (class extends FileLoader {
fileType = 'application/pdf';
loadFile(file, imageId) {
return cornerstoneWADOImageLoader.wadouri.loadFileRequest(imageId);
return dicomImageLoader.wadouri.loadFileRequest(imageId);
}
getDataset(image, imageId) {