fix: Allow the mode setup/creation to be async, and provide a few more values to extension/app config/mode setup. (#4016)
This commit is contained in:
1 parent
01e200986c
commit
88575c6c09
55 files changed
+2618
-3421
No files matched your search
@@ -37,7 +37,7 @@ module.exports = {
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
plugins: ['react-hot-loader/babel'],
|
||||
plugins: ['react-refresh/babel'],
|
||||
ignore: ['**/*.test.jsx', '**/*.test.js', '__snapshots__', '__tests__'],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-i18next": "^10.11.0",
|
||||
"react-router": "^6.3.0",
|
||||
"react-router-dom": "^6.3.0"
|
||||
"react-router": "^6.23.1",
|
||||
"react-router-dom": "^6.23.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = {
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
plugins: ['react-hot-loader/babel'],
|
||||
plugins: ['react-refresh/babel'],
|
||||
ignore: ['**/*.test.jsx', '**/*.test.js', '__snapshots__', '__tests__'],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -41,14 +41,14 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-i18next": "^12.2.2",
|
||||
"react-router": "^6.8.1",
|
||||
"react-router-dom": "^6.8.1"
|
||||
"react-router": "^6.23.1",
|
||||
"react-router-dom": "^6.23.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.77.6",
|
||||
"@cornerstonejs/core": "^1.77.6",
|
||||
"@kitware/vtk.js": "30.4.1",
|
||||
"@cornerstonejs/adapters": "^1.78.1",
|
||||
"@cornerstonejs/core": "^1.78.1",
|
||||
"@kitware/vtk.js": "*",
|
||||
"react-color": "^2.19.3"
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@
|
||||
"@ohif/extension-cornerstone": "3.9.0-beta.46",
|
||||
"@ohif/extension-measurement-tracking": "3.9.0-beta.46",
|
||||
"@ohif/ui": "3.9.0-beta.46",
|
||||
"dcmjs": "^0.29.12",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
@@ -46,9 +46,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.77.6",
|
||||
"@cornerstonejs/core": "^1.77.6",
|
||||
"@cornerstonejs/tools": "^1.77.6",
|
||||
"@cornerstonejs/adapters": "^1.78.1",
|
||||
"@cornerstonejs/core": "^1.78.1",
|
||||
"@cornerstonejs/tools": "^1.78.1",
|
||||
"classnames": "^2.3.2"
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@
|
||||
"@ohif/extension-default": "3.9.0-beta.46",
|
||||
"@ohif/i18n": "3.9.0-beta.46",
|
||||
"@ohif/ui": "3.9.0-beta.46",
|
||||
"dcmjs": "^0.29.5",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.21",
|
||||
"hammerjs": "^2.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
@@ -42,9 +42,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/core": "^1.77.6",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.77.6",
|
||||
"@cornerstonejs/tools": "^1.77.6",
|
||||
"@cornerstonejs/core": "^1.78.1",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.78.1",
|
||||
"@cornerstonejs/tools": "^1.78.1",
|
||||
"classnames": "^2.3.2"
|
||||
}
|
||||
}
|
||||
@@ -38,11 +38,11 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.77.6",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.78.1",
|
||||
"@icr/polyseg-wasm": "^0.4.0",
|
||||
"@ohif/core": "3.9.0-beta.46",
|
||||
"@ohif/ui": "3.9.0-beta.46",
|
||||
"dcmjs": "^0.29.12",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.21",
|
||||
"hammerjs": "^2.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
@@ -55,12 +55,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.77.6",
|
||||
"@cornerstonejs/core": "^1.77.6",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.77.6",
|
||||
"@cornerstonejs/tools": "^1.77.6",
|
||||
"@cornerstonejs/adapters": "^1.78.1",
|
||||
"@cornerstonejs/core": "^1.78.1",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.78.1",
|
||||
"@cornerstonejs/tools": "^1.78.1",
|
||||
"@icr/polyseg-wasm": "^0.4.0",
|
||||
"@kitware/vtk.js": "30.4.1",
|
||||
"@kitware/vtk.js": "*",
|
||||
"html2canvas": "^1.4.1",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.merge": "^4.6.2",
|
||||
|
||||
@@ -250,7 +250,7 @@ export default function getToolbarModule({ commandsManager, servicesManager }: w
|
||||
const displaySets = displaySetUIDs.map(displaySetService.getDisplaySetByUID);
|
||||
|
||||
const areReconstructable = displaySets.every(displaySet => {
|
||||
return displaySet.isReconstructable;
|
||||
return displaySet?.isReconstructable;
|
||||
});
|
||||
|
||||
if (!areReconstructable) {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.9.0-beta.46",
|
||||
"@ohif/i18n": "3.9.0-beta.46",
|
||||
"dcmjs": "^0.29.12",
|
||||
"dcmjs": "*",
|
||||
"dicomweb-client": "^0.10.4",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^18.3.1",
|
||||
|
||||
@@ -43,7 +43,6 @@ module.exports = (env, argv) => {
|
||||
externals: [
|
||||
/\b(vtk.js)/,
|
||||
/\b(dcmjs)/,
|
||||
/\b(dicom-microscopy-viewer)/,
|
||||
/\b(gl-matrix)/,
|
||||
/^@ohif/,
|
||||
/^@cornerstonejs/,
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = {
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
plugins: ['react-hot-loader/babel'],
|
||||
plugins: ['react-refresh/babel'],
|
||||
ignore: ['**/*.test.jsx', '**/*.test.js', '__snapshots__', '__tests__'],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-i18next": "^10.11.0",
|
||||
"react-router": "^6.8.1",
|
||||
"react-router-dom": "^6.8.1"
|
||||
"react-router": "^6.23.1",
|
||||
"react-router-dom": "^6.23.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
@@ -47,7 +47,6 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"colormap": "^2.3",
|
||||
"dicom-microscopy-viewer": "^0.44.0",
|
||||
"dicomicc": "^0.1"
|
||||
"mathjs": "^12.4.2"
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,14 @@ class DicomMicroscopyViewport extends Component {
|
||||
resizeRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),
|
||||
};
|
||||
|
||||
/**
|
||||
* Need to return this as a function to prevent webpack from munging it.
|
||||
*/
|
||||
public static getImportPath() {
|
||||
return '/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the nearest ROI from the mouse click point
|
||||
*
|
||||
@@ -86,9 +94,10 @@ class DicomMicroscopyViewport extends Component {
|
||||
// you should only do this once.
|
||||
async installOpenLayersRenderer(container, displaySet) {
|
||||
const loadViewer = async metadata => {
|
||||
const { viewer: DicomMicroscopyViewer, metadata: metadataUtils } = await import(
|
||||
/* webpackChunkName: "dicom-microscopy-viewer" */ 'dicom-microscopy-viewer'
|
||||
);
|
||||
await import(
|
||||
/* webpackIgnore: true */ DicomMicroscopyViewport.getImportPath());
|
||||
const { viewer: DicomMicroscopyViewer, metadata: metadataUtils } = (window as any).dicomMicroscopyViewer;
|
||||
|
||||
const microscopyViewer = DicomMicroscopyViewer.VolumeImageViewer;
|
||||
|
||||
const client = getDicomWebClient({
|
||||
|
||||
+4
-4
@@ -2,6 +2,7 @@ import dcmjs from 'dcmjs';
|
||||
|
||||
import DCM_CODE_VALUES from './dcmCodeValues';
|
||||
import toArray from './toArray';
|
||||
import DicomMicroscopyViewport from '../DicomMicroscopyViewport';
|
||||
|
||||
const MeasurementReport = dcmjs.adapters.DICOMMicroscopyViewer.MeasurementReport;
|
||||
|
||||
@@ -47,10 +48,9 @@ export default async function loadSR(
|
||||
async function _getROIsFromToolState(naturalizedDataset, FrameOfReferenceUID) {
|
||||
const toolState = MeasurementReport.generateToolState(naturalizedDataset);
|
||||
const tools = Object.getOwnPropertyNames(toolState);
|
||||
|
||||
const DICOMMicroscopyViewer = await import(
|
||||
/* webpackChunkName: "dicom-microscopy-viewer" */ 'dicom-microscopy-viewer'
|
||||
);
|
||||
// Does a dynamic import to prevent webpack from rebuilding the library
|
||||
await import(/* webpackIgnore: true */ DicomMicroscopyViewport.getImportPath());
|
||||
const DICOMMicroscopyViewer = (window as any).dicomMicroscopyViewer;
|
||||
|
||||
const measurementGroupContentItems = _getMeasurementGroups(naturalizedDataset);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.9.0-beta.46",
|
||||
"@ohif/ui": "3.9.0-beta.46",
|
||||
"dcmjs": "^0.29.12",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
|
||||
@@ -12,7 +12,7 @@ const sopClassUids = Object.values(SOP_CLASS_UIDS);
|
||||
const _getDisplaySetsFromSeries = (instances, servicesManager, extensionManager) => {
|
||||
const dataSource = extensionManager.getActiveDataSource()[0];
|
||||
return instances.map(instance => {
|
||||
const { Modality, SOPInstanceUID, EncapsulatedDocument } = instance;
|
||||
const { Modality, SOPInstanceUID } = instance;
|
||||
const { SeriesDescription = 'PDF', MIMETypeOfEncapsulatedDocument } = instance;
|
||||
const { SeriesNumber, SeriesDate, SeriesInstanceUID, StudyInstanceUID, SOPClassUID } = instance;
|
||||
const pdfUrl = dataSource.retrieve.directURL({
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.9.0-beta.46",
|
||||
"@ohif/ui": "3.9.0-beta.46",
|
||||
"dcmjs": "^0.29.12",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@cornerstonejs/core": "^1.77.6",
|
||||
"@cornerstonejs/tools": "^1.77.6",
|
||||
"@cornerstonejs/core": "^1.78.1",
|
||||
"@cornerstonejs/tools": "^1.78.1",
|
||||
"@ohif/core": "3.9.0-beta.46",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.9.0-beta.46",
|
||||
"@ohif/ui": "3.9.0-beta.46",
|
||||
"classnames": "^2.3.2",
|
||||
"dcmjs": "^0.29.12",
|
||||
"dcmjs": "*",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^18.3.1",
|
||||
|
||||
@@ -6,5 +6,9 @@ export default function getCustomizationModule() {
|
||||
name: 'custom-context-menu',
|
||||
value: [codingValues, contextMenuCodeItem, findingsContextMenu],
|
||||
},
|
||||
{
|
||||
name: 'contextMenuCodeItem',
|
||||
value: [contextMenuCodeItem],
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.9.0-beta.46",
|
||||
"@ohif/ui": "3.9.0-beta.46",
|
||||
"dcmjs": "^0.29.12",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
|
||||
Reference in new issue
Block a user