Skip to content

Commit

Permalink
Fixed the criteria to display the OHIF Segmentation viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
amazy committed Nov 8, 2024
1 parent 4141d0d commit c7d39e0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
33 changes: 14 additions & 19 deletions WebApplication/src/components/ResourceButtonGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pending 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)
==================
Expand Down

0 comments on commit c7d39e0

Please sign in to comment.