feat: Update to WADO Image Loader 4.0.3 to add dynamically imported WebAssembly codec support 🚀 (#2538)
* feat: update to prerelease of WADO Image Loader, add copy plugin to pull dist/dynamic-import into OHIF * fix: Set empty public path * perf: Add webpackPrefetch tags to lazy loaded components * Switch to using webpack alias to use dynamic import version of WADO Image Loader * fix lockfile * prevent polyfilling zlib * bump to wado image loader 4.0.3 with fix for public path
This commit is contained in:
1 parent
898f93e19d
commit
3c9f3cb273
19 files changed
+232
-88
No files matched your search
@@ -31,12 +31,12 @@
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "^0.50.0",
|
||||
"@ohif/ui": "^0.50.0",
|
||||
"cornerstone-core": "^2.3.0",
|
||||
"cornerstone-math": "^0.1.9",
|
||||
"cornerstone-core": "2.5.0",
|
||||
"cornerstone-math": "0.1.9",
|
||||
"cornerstone-tools": "5.1.2",
|
||||
"cornerstone-wado-image-loader": "^3.1.2",
|
||||
"cornerstone-wado-image-loader": "4.0.3",
|
||||
"dcmjs": "0.16.1",
|
||||
"dicom-parser": "^1.8.3",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^17.0.2",
|
||||
@@ -47,6 +47,6 @@
|
||||
"@babel/runtime": "7.7.6",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"lodash.debounce": "4.0.8",
|
||||
"react-cornerstone-viewport": "4.0.5"
|
||||
"react-cornerstone-viewport": "4.1.1"
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import commandsModule from './commandsModule.js';
|
||||
import CornerstoneViewportDownloadForm from './CornerstoneViewportDownloadForm';
|
||||
|
||||
const Component = React.lazy(() => {
|
||||
return import('./OHIFCornerstoneViewport');
|
||||
return import(/* webpackPrefetch: true */ './OHIFCornerstoneViewport');
|
||||
});
|
||||
|
||||
const OHIFCornerstoneViewport = props => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import cornerstone from 'cornerstone-core';
|
||||
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';
|
||||
import dicomParser from 'dicom-parser';
|
||||
import { errorHandler } from '@ohif/core'
|
||||
import { errorHandler } from '@ohif/core';
|
||||
|
||||
let initialized = false;
|
||||
|
||||
@@ -32,12 +32,24 @@ export default function initWADOImageLoader(UserAuthenticationService) {
|
||||
beforeSend: function(xhr) {
|
||||
const headers = UserAuthenticationService.getAuthorizationHeader();
|
||||
|
||||
// Request:
|
||||
// JPEG-LS Lossless (1.2.840.10008.1.2.4.80) if available, otherwise accept
|
||||
// whatever transfer-syntax the origin server provides.
|
||||
// For now we use image/jls and image/x-jls because some servers still use the old type
|
||||
// http://dicom.nema.org/medical/dicom/current/output/html/part18.html
|
||||
const xhrRequestHeaders = {
|
||||
//accept: 'multipart/related; type="image/x-jls"',
|
||||
// 'multipart/related; type="image/x-jls", multipart/related; type="image/jls"; transfer-syntax="1.2.840.10008.1.2.4.80", multipart/related; type="image/x-jls", multipart/related; type="application/octet-stream"; transfer-syntax=*',
|
||||
};
|
||||
|
||||
if (headers && headers.Authorization) {
|
||||
xhr.setRequestHeader('Authorization', headers.Authorization);
|
||||
xhrRequestHeaders.Authorization = headers.Authorization;
|
||||
}
|
||||
|
||||
return xhrRequestHeaders;
|
||||
},
|
||||
errorInterceptor: error => {
|
||||
errorHandler.getHTTPErrorHandler(error)
|
||||
errorHandler.getHTTPErrorHandler(error);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user