Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IbrahimCSAE committed Apr 26, 2024
1 parent b4ed80d commit 2f4df96
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 57 deletions.
4 changes: 2 additions & 2 deletions extensions/cornerstone-dicom-seg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
31 changes: 24 additions & 7 deletions extensions/cornerstone-dicom-seg/src/panels/PanelSegmentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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());
};
}, []);

Expand Down
6 changes: 3 additions & 3 deletions extensions/cornerstone-dicom-sr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
6 changes: 3 additions & 3 deletions extensions/cornerstone-dynamic-volume/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
10 changes: 5 additions & 5 deletions extensions/cornerstone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions extensions/measurement-tracking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion platform/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^1.70.12",
"@cornerstonejs/dicom-image-loader": "^1.70.13",
"@emotion/serialize": "^1.1.3",
"@ohif/core": "3.8.0-beta.91",
"@ohif/extension-cornerstone": "3.8.0-beta.91",
Expand Down
2 changes: 1 addition & 1 deletion platform/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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",
"@ohif/ui": "3.8.0-beta.91",
"cornerstone-math": "0.1.9",
"dicom-parser": "^1.8.21"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ function usePatientInfo(servicesManager) {
return;
}
setPatientInfo({
PatientID: instance.PatientID || '',
PatientName: instance.PatientName ? formatPN(instance.PatientName.Alphabetic) : '',
PatientSex: instance.PatientSex || '',
PatientDOB: formatDate(instance.PatientBirthDate) || '',
PatientID: instance.PatientID || null,
PatientName: instance.PatientName ? formatPN(instance.PatientName.Alphabetic) : null,
PatientSex: instance.PatientSex || null,
PatientDOB: formatDate(instance.PatientBirthDate) || null,
});
checkMixedPatients(instance.PatientID || '');
checkMixedPatients(instance.PatientID || null);
};

useEffect(() => {
Expand Down
89 changes: 61 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1497,13 +1497,13 @@
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==

"@cornerstonejs/adapters@^1.70.12":
version "1.70.12"
resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.70.12.tgz#6556cb511840a6d10cc8eabbf7c408a5e07f3d33"
integrity sha512-XeBCpgW8S7WgTbFqq5oH3S4P5reVD9hXF10yPnEVpSdXygEFuFz4CG00RgVUEt7OT2gBNS18AZSLUqpZajmvlA==
"@cornerstonejs/adapters@^1.70.13":
version "1.70.13"
resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.70.13.tgz#195023f5600272f6ee70090b3c61060d13b9cec7"
integrity sha512-PSitPx/A5aP0VhVTC72trwf3CfVGAXYvcAfAvuk3WzSONhCJ6cg5Xsxpl0NtEt7prsT3u60Bgr94Ea+9VJVdog==
dependencies:
"@babel/runtime-corejs2" "^7.17.8"
"@cornerstonejs/tools" "^1.70.12"
"@cornerstonejs/tools" "^1.70.13"
buffer "^6.0.3"
dcmjs "^0.29.8"
gl-matrix "^3.4.3"
Expand Down Expand Up @@ -1550,45 +1550,45 @@
resolved "https://registry.yarnpkg.com/@cornerstonejs/codec-openjph/-/codec-openjph-2.4.5.tgz#8690b61a86fa53ef38a70eee9d665a79229517c0"
integrity sha512-MZCUy8VG0VG5Nl1l58+g+kH3LujAzLYTfJqkwpWI2gjSrGXnP6lgwyy4GmPRZWVoS40/B1LDNALK905cNWm+sg==

"@cornerstonejs/core@^1.70.12":
version "1.70.12"
resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.70.12.tgz#51bbb966603439bec84aced69a664d04b13f7071"
integrity sha512-rGnmpEuLUruc9TcHpFBlEuCJPxufb0r9I5wbhh4VUhSUcyVgRA5gyImuny2pt8W4yhN3DCLE9LpNX9dah1/O0A==
"@cornerstonejs/core@^1.70.13":
version "1.70.13"
resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.70.13.tgz#a1976588b93461e2350866ecd761660ee1b74c8d"
integrity sha512-Bi+ErK6rHNx46CVQiUiw/00ipOWdy7EdyC4U0S30oiLE1Jz1PegIniVDogleXtO1jDkTkNnuWnPCoNhpUgNNuQ==
dependencies:
"@kitware/vtk.js" "30.3.3"
comlink "^4.4.1"
detect-gpu "^5.0.22"
gl-matrix "^3.4.3"
lodash.clonedeep "4.5.0"

"@cornerstonejs/dicom-image-loader@^1.70.12":
version "1.70.12"
resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.70.12.tgz#376b2ac1d6e36f1aaf2e2acd0f90f3b5d1a510b3"
integrity sha512-OBcP+QqhBHim9LsPrhBg9w5SkkY88YYgnI1elw2PzOu2thMm7Em2CgHDf0VlrNEvStovkvaqFdo6sawP3QD5HA==
"@cornerstonejs/dicom-image-loader@^1.70.13":
version "1.70.13"
resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.70.13.tgz#cf2aea8b6e538b6f005106ef6401869abde226d2"
integrity sha512-PXe9/xmv5vq1raREL9qsD3Ci68pWwCpjVxmyIigpV7lOdtziivvMVNyNSDZCjexBpbsB5a0fKcZG4jl82Jz1HA==
dependencies:
"@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.5"
"@cornerstonejs/core" "^1.70.12"
"@cornerstonejs/core" "^1.70.13"
dicom-parser "^1.8.9"
pako "^2.0.4"
uuid "^9.0.0"

"@cornerstonejs/streaming-image-volume-loader@^1.70.12":
version "1.70.12"
resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.70.12.tgz#f3ca840ec003db4fd7b336568627a39c5462244c"
integrity sha512-U6lUOfUduZKl2VeAikcAw5sDUrZoWiCCS4c4dI67lPZLdIREdbJYHf+cG8EovsaN0nvm1gGvYfD5R47TojQUyw==
"@cornerstonejs/streaming-image-volume-loader@^1.70.13":
version "1.70.13"
resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.70.13.tgz#77a3751ddc5ab17cff050007c7e3d7e0b8c58c13"
integrity sha512-Pd90y2JFbQ4LriRkkYXXvD3mhIWyiVdGDznhrJN/8ZC+4m5XusOlvOk2Ia/85e+WAgIUlHyDCgOuzewG8of+6w==
dependencies:
"@cornerstonejs/core" "^1.70.12"
"@cornerstonejs/core" "^1.70.13"
comlink "^4.4.1"

"@cornerstonejs/tools@^1.70.12":
version "1.70.12"
resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.70.12.tgz#6f1c7c82bf5b84f10588222564d270ffb2cfca7a"
integrity sha512-UKWoA/dLvhH5F1KnR/dZ454OL6m8npubGYse0f6BEfushqvN+INNKgj9zwPLXvfgyibwaz1SC6iIduUvIQMudg==
"@cornerstonejs/tools@^1.70.13":
version "1.70.13"
resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.70.13.tgz#fca6abc331841a2ac1a4403b5522cdcc6cacc708"
integrity sha512-Eza/4A2p51YPqZbvP6HwZC0yJCkogsda39aB+Eh5VTPQSqHn+VCBmZ9U9Qi9+0cpaye53A5OhjXAOoR6pZlqRQ==
dependencies:
"@cornerstonejs/core" "^1.70.12"
"@cornerstonejs/core" "^1.70.13"
"@icr/polyseg-wasm" "0.4.0"
"@types/offscreencanvas" "2019.7.3"
comlink "^4.4.1"
Expand Down Expand Up @@ -2086,7 +2086,7 @@
"@docusaurus/theme-search-algolia" "2.4.3"
"@docusaurus/types" "2.4.3"

"@docusaurus/[email protected]", "react-loadable@npm:@docusaurus/[email protected]":
"@docusaurus/[email protected]":
version "5.5.2"
resolved "https://registry.yarnpkg.com/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz#81aae0db81ecafbdaee3651f12804580868fa6ce"
integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==
Expand Down Expand Up @@ -17743,6 +17743,14 @@ react-loadable-ssr-addon-v5-slorber@^1.0.1:
dependencies:
"@babel/runtime" "^7.10.3"

"react-loadable@npm:@docusaurus/[email protected]":
version "5.5.2"
resolved "https://registry.yarnpkg.com/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz#81aae0db81ecafbdaee3651f12804580868fa6ce"
integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==
dependencies:
"@types/react" "*"
prop-types "^15.6.2"

[email protected]:
version "3.11.2"
resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.11.2.tgz#bad911976d4add31aa30dba8a41d11e21c4ac8a4"
Expand Down Expand Up @@ -19533,7 +19541,7 @@ string-natural-compare@^3.0.1:
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==

"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand All @@ -19551,6 +19559,15 @@ string-width@^1.0.1:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^2.1.0, string-width@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
Expand Down Expand Up @@ -19646,7 +19663,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -19674,6 +19691,13 @@ strip-ansi@^5.1.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.0, strip-ansi@^7.0.1:
version "7.1.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -21717,7 +21741,7 @@ [email protected], worker-loader@^3.0.8:
loader-utils "^2.0.0"
schema-utils "^3.0.0"

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -21743,6 +21767,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.0.1, wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 2f4df96

Please sign in to comment.