From 5c42af7fe6cac7a0b1ec861583c68ff6ce8f2efd Mon Sep 17 00:00:00 2001 From: Alain Mazy Date: Fri, 8 Nov 2024 12:41:10 +0100 Subject: [PATCH] Fixed the criteria to display the OHIF Segmentation viewer --- .../src/components/ResourceButtonGroup.vue | 33 ++++++++----------- release-notes.md | 2 +- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/WebApplication/src/components/ResourceButtonGroup.vue b/WebApplication/src/components/ResourceButtonGroup.vue index 8f930e7..490a6c4 100644 --- a/WebApplication/src/components/ResourceButtonGroup.vue +++ b/WebApplication/src/components/ResourceButtonGroup.vue @@ -420,26 +420,21 @@ export default { return false; } - // // from isValidMode() in OHIF code - // // disable if it only contains modalities that are not supported by this mode: - // let modalities = this.modalitiesList; - // modalities = modalities.filter(x => !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(x)); // since Set.difference is not supported on Firefox as of March 2024 - // if (modalities.length == 0) { - // return false; - // } - - // disable if it is not reconstructible - if (!(this.modalitiesList.includes("CT") && this.modalitiesList.includes("PT") && !this.modalitiesList.includes("SM")) - && this.resourceLevel != "bulk") // we can not check the modalities list for bulk mode) - { - return false; - } - - if (this.uiOptions.EnableOpenInOhifViewer3) { - return this.hasOhifViewer && (this.resourceLevel == 'study' || (this.resourceLevel == 'bulk' && this.ohifDataSource == 'dicom-web')); - } else { - return false; + if (this.uiOptions.EnableOpenInOhifViewer3 && this.hasOhifViewer) { + if (this.resourceLevel == "bulk" && this.ohifDataSource == 'dicom-web') { + return true; // unable to check the list of modalities in this case -> allow it + } else if (this.resourceLevel == "study") { + // // from isValidMode() in OHIF code + // Don't show the mode if the selected studies have only one modality that is not supported by the mode + if (this.modalitiesList.length == 1 && ['SM', 'ECG', 'OT', 'DOC'].includes(this.modalitiesList[0])) { + return false; + } else { + return true; + } + } } + + return false; }, hasOhifViewerButtonMicroscopy() { if (!this.uiOptions.ViewersOrdering.includes("ohif-micro") || this.studiesSourceType != SourceType.LOCAL_ORTHANC) { diff --git a/release-notes.md b/release-notes.md index eff127d..cdac2b5 100644 --- a/release-notes.md +++ b/release-notes.md @@ -9,7 +9,7 @@ Changes: Fixes: - When modifying studies, dates selected from the DatePicker were not always taken into account. - + - Fixed the criteria to display the OHIF Segmentation viewer. 1.6.4 (2024-10-10) ==================