fix(bugs): fix patient header for doc, track ball rotate resize observer and add segmentation button not being enabled on viewport data change (#4068)
This commit is contained in:
1 parent
b4ed80d99b
commit
c09311d3b7
10 files changed
+107
-57
No files matched your search
@@ -46,8 +46,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.70.12",
|
||||
"@cornerstonejs/core": "^1.70.12",
|
||||
"@cornerstonejs/adapters": "^1.70.13",
|
||||
"@cornerstonejs/core": "^1.70.13",
|
||||
"@kitware/vtk.js": "30.3.3",
|
||||
"react-color": "^2.19.3"
|
||||
}
|
||||
|
||||
@@ -18,8 +18,13 @@ export default function PanelSegmentation({
|
||||
extensionManager,
|
||||
configuration,
|
||||
}) {
|
||||
const { segmentationService, viewportGridService, uiDialogService, displaySetService } =
|
||||
servicesManager.services;
|
||||
const {
|
||||
segmentationService,
|
||||
viewportGridService,
|
||||
uiDialogService,
|
||||
displaySetService,
|
||||
cornerstoneViewportService,
|
||||
} = servicesManager.services;
|
||||
|
||||
const { t } = useTranslation('PanelSegmentation');
|
||||
|
||||
@@ -82,21 +87,33 @@ export default function PanelSegmentation({
|
||||
// Handle initial state
|
||||
handleActiveViewportChange();
|
||||
|
||||
const changed = viewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED;
|
||||
const changedGrid = viewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED;
|
||||
const ready = viewportGridService.EVENTS.VIEWPORTS_READY;
|
||||
|
||||
const subs = [];
|
||||
[ready, changed].forEach(evt => {
|
||||
const subsGrid = [];
|
||||
[ready, changedGrid].forEach(evt => {
|
||||
const { unsubscribe } = viewportGridService.subscribe(evt, ({ viewportId }) => {
|
||||
handleActiveViewportChange(viewportId);
|
||||
});
|
||||
|
||||
subs.push(unsubscribe);
|
||||
subsGrid.push(unsubscribe);
|
||||
});
|
||||
|
||||
const changedData = cornerstoneViewportService.EVENTS.VIEWPORT_DATA_CHANGED;
|
||||
|
||||
const subsData = [];
|
||||
[changedData].forEach(evt => {
|
||||
const { unsubscribe } = cornerstoneViewportService.subscribe(evt, () => {
|
||||
handleActiveViewportChange();
|
||||
});
|
||||
|
||||
subsData.push(unsubscribe);
|
||||
});
|
||||
|
||||
// Clean up
|
||||
return () => {
|
||||
subs.forEach(unsub => unsub());
|
||||
subsGrid.forEach(unsub => unsub());
|
||||
subsData.forEach(unsub => unsub());
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.70.12",
|
||||
"@cornerstonejs/core": "^1.70.12",
|
||||
"@cornerstonejs/tools": "^1.70.12",
|
||||
"@cornerstonejs/adapters": "^1.70.13",
|
||||
"@cornerstonejs/core": "^1.70.13",
|
||||
"@cornerstonejs/tools": "^1.70.13",
|
||||
"classnames": "^2.3.2"
|
||||
}
|
||||
}
|
||||
@@ -42,9 +42,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/core": "^1.70.12",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.70.12",
|
||||
"@cornerstonejs/tools": "^1.70.12",
|
||||
"@cornerstonejs/core": "^1.70.13",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.70.13",
|
||||
"@cornerstonejs/tools": "^1.70.13",
|
||||
"classnames": "^2.3.2"
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@
|
||||
"@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.70.12",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.70.13",
|
||||
"@icr/polyseg-wasm": "^0.4.0",
|
||||
"@ohif/core": "3.8.0-beta.91",
|
||||
"@ohif/ui": "3.8.0-beta.91",
|
||||
@@ -55,10 +55,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.70.12",
|
||||
"@cornerstonejs/core": "^1.70.12",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.70.12",
|
||||
"@cornerstonejs/tools": "^1.70.12",
|
||||
"@cornerstonejs/adapters": "^1.70.13",
|
||||
"@cornerstonejs/core": "^1.70.13",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.70.13",
|
||||
"@cornerstonejs/tools": "^1.70.13",
|
||||
"@icr/polyseg-wasm": "^0.4.0",
|
||||
"@kitware/vtk.js": "30.3.3",
|
||||
"html2canvas": "^1.4.1",
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@cornerstonejs/core": "^1.70.12",
|
||||
"@cornerstonejs/tools": "^1.70.12",
|
||||
"@cornerstonejs/core": "^1.70.13",
|
||||
"@cornerstonejs/tools": "^1.70.13",
|
||||
"@ohif/core": "3.8.0-beta.91",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.91",
|
||||
"@ohif/ui": "3.8.0-beta.91",
|
||||
|
||||
Reference in new issue
Block a user