Skip to content

Commit

Permalink
2 config options: EnableQuickViewerButton, EnableQuickReportButton
Browse files Browse the repository at this point in the history
  • Loading branch information
amazy committed Oct 9, 2024
1 parent d5cfb47 commit fdcc0aa
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Plugin/DefaultConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
"EnableSettings": true, // Enables the settings menu/interface
"EnableLinkToLegacyUi": true, // Enables a link to the legacy Orthanc UI
"EnableChangePassword": true, // Enables the 'change password' button in the side bar. Only applicable if Keycloak is enabled
"EnableQuickViewerButton": true, // Enables a button in the study list to directly open a viewer
"EnableQuickReportButton": true, // Enables a button in the study list to directly open a PDF report if available in the study

"EnableEditLabels": true, // Enables labels management (create/delete/assign/unassign)
"AvailableLabels": [], // If not empty, this list prevents the creation of new labels and only allows add/remove of the listed labels.
Expand Down
2 changes: 2 additions & 0 deletions Plugin/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ void GetOE2Configuration(OrthancPluginRestOutput* output,
LOG(INFO) << "Overriding \"Enable...\" in UiOptions with the permissions from the auth-service for this user-profile";

UpdateUiOptions(uiOptions["EnableStudyList"], permissions, "all|view");
UpdateUiOptions(uiOptions["EnableQuickViewerButton"], permissions, "all|view");
UpdateUiOptions(uiOptions["EnableQuickReportButton"], permissions, "all|view");
UpdateUiOptions(uiOptions["EnableUpload"], permissions, "all|upload");
UpdateUiOptions(uiOptions["EnableAddSeries"], permissions, "all|upload");
UpdateUiOptions(uiOptions["EnableDicomModalities"], permissions, "all|q-r-remote-modalities");
Expand Down
8 changes: 4 additions & 4 deletions WebApplication/src/components/StudyItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,16 @@ export default {
}
},
hasPdfReportIconPlaceholder() {
return this.studiesSourceType == SourceType.LOCAL_ORTHANC && !this.hasPdfReportIcon;
return this.studiesSourceType == SourceType.LOCAL_ORTHANC && this.uiOptions.EnableQuickReportButton && !this.hasPdfReportIcon;
},
hasPdfReportIcon() {
return this.study.RequestedTags.SOPClassesInStudy && this.study.RequestedTags.SOPClassesInStudy.indexOf("1.2.840.10008.5.1.4.1.1.104.1") != -1;
return this.study.RequestedTags.SOPClassesInStudy && this.study.RequestedTags.SOPClassesInStudy.indexOf("1.2.840.10008.5.1.4.1.1.104.1") != -1 && this.uiOptions.EnableQuickReportButton;
},
hasPrimaryViewerIconPlaceholder() {
return this.studiesSourceType == SourceType.LOCAL_ORTHANC && !this.hasPrimaryViewerIcon;
return this.studiesSourceType == SourceType.LOCAL_ORTHANC && this.uiOptions.EnableQuickViewerButton && !this.hasPrimaryViewerIcon;
},
hasPrimaryViewerIcon() {
return this.studiesSourceType == SourceType.LOCAL_ORTHANC && this.primaryViewerUrl;
return this.studiesSourceType == SourceType.LOCAL_ORTHANC && this.primaryViewerUrl && this.uiOptions.EnableQuickViewerButton;
},
primaryViewerUrl() {
return resourceHelpers.getPrimaryViewerUrl("study", this.study.ID, this.study.MainDicomTags.StudyInstanceUID);
Expand Down
4 changes: 2 additions & 2 deletions WebApplication/src/components/StudyList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ export default {
return this.uiOptions.DateFormat;
},
hasPrimaryViewerIcon() {
return this.sourceType == SourceType.LOCAL_ORTHANC;
return this.sourceType == SourceType.LOCAL_ORTHANC && this.uiOptions.EnableQuickViewerButton;
},
hasPdfReportIcon() {
return this.sourceType == SourceType.LOCAL_ORTHANC;
return this.sourceType == SourceType.LOCAL_ORTHANC && this.uiOptions.EnableQuickReportButton;
}
},
watch: {
Expand Down
4 changes: 3 additions & 1 deletion WebApplication/src/store/modules/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ const mutations = {
if (uiOptions.StudyListColumns.indexOf('seriesCount') != -1 || uiOptions.StudyListColumns.indexOf('seriesAndInstancesCount') != -1) {
state.requestedTagsForStudyList.push('NumberOfStudyRelatedSeries')
}
state.requestedTagsForStudyList.push('SOPClassesInStudy'); // to detect PDF files
if (uiOptions.EnableQuickReportButton) {
state.requestedTagsForStudyList.push('SOPClassesInStudy'); // to detect PDF files
}
},
setUserProfile(state, { profile }) {
state.userProfile = profile;
Expand Down
9 changes: 9 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Pending changes
===============

Changes:
- new configuration "EnableQuickViewerButton" to enable/disable a button
to open a viewer directly from the study list (default value: true).
- new configuration "EnableQuickReportButton" to enable/disable a button
to open a PDF report directly from the study list if available in the study.
(default value: false). Note that, with Orthanc version up to 1.12.4, this
option may slow down the display of the study list.


Fixes:
- When modifying studies, dates selected from the DatePicker were not always taken into account.
- Primary viewer icon was not visible when using an external OHIF viewer.
Expand Down

0 comments on commit fdcc0aa

Please sign in to comment.