From 4fd81b5cd24be9bcd9a5189548c1ae38d202f90d Mon Sep 17 00:00:00 2001 From: Alireza Date: Fri, 12 May 2023 15:04:19 -0400 Subject: [PATCH] fix(local): fix modalities not showing in local (#3388) * fix various bugs * revert back docusaurus for styling issues --- DATACITATION.md | 5 + .../src/getSopClassHandlerModule.ts | 10 +- .../SegmentationService.ts | 8 +- .../default/src/DicomLocalDataSource/index.js | 2 +- .../segmentationEditHandler.tsx | 3 +- platform/docs/package.json | 16 +- .../SegmentationTable/SegmentationItem.tsx | 4 +- yarn.lock | 495 +++++++++--------- 8 files changed, 279 insertions(+), 264 deletions(-) diff --git a/DATACITATION.md b/DATACITATION.md index 48b63514889..aefa27d8f24 100644 --- a/DATACITATION.md +++ b/DATACITATION.md @@ -142,3 +142,8 @@ National Lung Screening Trial Stony Brook University COVID-19 Positive Cases (COVID-19-NY-SBU) - Saltz, J., Saltz, M., Prasanna, P., Moffitt, R., Hajagos, J., Bremer, E., Balsamo, J., & Kurc, T. (2021). Stony Brook University COVID-19 Positive Cases [Data set]. The Cancer Imaging Archive. https://doi.org/10.7937/TCIA.BBAG-2923 + + +### 2.16.840.1.114362.1.11972228.22789312658.616067305.306.2 + +https://data.kitware.com/ diff --git a/extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts b/extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts index a5223418230..775da7e8abc 100644 --- a/extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts +++ b/extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts @@ -133,9 +133,13 @@ function _getDisplaySetsFromSeries( ConceptNameCodeSequence.CodeValue !== CodeNameCodeSequenceValues.ImagingMeasurementReport ) { - console.log( - 'Only support Imaging Measurement Report SRs (TID1500) for this renderer.' - ); + servicesManager.services.uiNotificationService.show({ + title: 'DICOM SR', + message: + 'OHIF only supports TID1500 Imaging Measurement Report Structured Reports. The SR you’re trying to view is not supported.', + type: 'warning', + duration: 6000, + }); return []; } diff --git a/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts b/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts index b9882e3edd4..5e5642727c9 100644 --- a/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts +++ b/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts @@ -996,10 +996,16 @@ class SegmentationService extends PubSubService { label: string; } ): Promise => { + const { displaySetService } = this.servicesManager.services; + + const displaySet = displaySetService.getDisplaySetByUID( + displaySetInstanceUID + ); + // Todo: we currently only support labelmap for segmentation for a displaySet const representationType = LABELMAP; - const volumeId = this._getVolumeIdForDisplaySet(displaySetInstanceUID); + const volumeId = this._getVolumeIdForDisplaySet(displaySet); const segmentationId = options?.segmentationId ?? `${csUtils.uuidv4()}`; diff --git a/extensions/default/src/DicomLocalDataSource/index.js b/extensions/default/src/DicomLocalDataSource/index.js index c788bb4625f..2724cca38c2 100644 --- a/extensions/default/src/DicomLocalDataSource/index.js +++ b/extensions/default/src/DicomLocalDataSource/index.js @@ -75,7 +75,7 @@ function createDicomLocalApi(dicomLocalConfig) { const study = DicomMetadataStore.getStudy(StudyInstanceUID); study.series.forEach(aSeries => { numInstances += aSeries.instances.length; - modalities.add(aSeries.Modality); + modalities.add(aSeries.instances[0].Modality); }); // first instance in the first series diff --git a/extensions/tmtv/src/Panels/PanelROIThresholdSegmentation/segmentationEditHandler.tsx b/extensions/tmtv/src/Panels/PanelROIThresholdSegmentation/segmentationEditHandler.tsx index 433a9a704c0..bfa4d01779e 100644 --- a/extensions/tmtv/src/Panels/PanelROIThresholdSegmentation/segmentationEditHandler.tsx +++ b/extensions/tmtv/src/Panels/PanelROIThresholdSegmentation/segmentationEditHandler.tsx @@ -14,7 +14,8 @@ function segmentationItemEditHandler({ id, servicesManager }) { ...segmentation, ...value, }, - true + false, // don't suppress event + true // it should update cornerstone ); } } diff --git a/platform/docs/package.json b/platform/docs/package.json index e61fe6683d3..97f24ddb4e0 100644 --- a/platform/docs/package.json +++ b/platform/docs/package.json @@ -27,14 +27,14 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "2.4.0", - "@docusaurus/plugin-client-redirects": "2.4.0", - "@docusaurus/plugin-ideal-image": "2.4.0", - "@docusaurus/plugin-pwa": "2.4.0", - "@docusaurus/preset-classic": "2.4.0", - "@docusaurus/remark-plugin-npm2yarn": "2.4.0", - "@docusaurus/theme-live-codeblock": "2.4.0", - "@docusaurus/plugin-google-gtag": "2.4.0", + "@docusaurus/core": "2.3.0", + "@docusaurus/plugin-client-redirects": "2.3.0", + "@docusaurus/plugin-ideal-image": "2.3.0", + "@docusaurus/plugin-pwa": "2.3.0", + "@docusaurus/preset-classic": "2.3.0", + "@docusaurus/remark-plugin-npm2yarn": "2.3.0", + "@docusaurus/theme-live-codeblock": "2.3.0", + "@docusaurus/plugin-google-gtag": "2.3.0", "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^5.5.0", "classnames": "^2.3.2", diff --git a/platform/ui/src/components/SegmentationTable/SegmentationItem.tsx b/platform/ui/src/components/SegmentationTable/SegmentationItem.tsx index 1c1020ae5a3..4fbe6dff8e2 100644 --- a/platform/ui/src/components/SegmentationTable/SegmentationItem.tsx +++ b/platform/ui/src/components/SegmentationTable/SegmentationItem.tsx @@ -71,8 +71,8 @@ const SegmentationItem = ({ )}
-
-
+
+