# HG changeset patch # User Sebastien Jodogne # Date 1666936075 -7200 # Node ID 2034ae383cfda04c4ccbec490a93aea42a419487 # Parent 0661115af9392760ea6bb5f5390cd38c7d11277d# Parent 79fdc3b1f031c288d282f8593aa1863d614aad13 integration default->deep-learning diff -r 0661115af939 -r 2034ae383cfd Applications/Samples/RtViewerPlugin/CMakeLists.txt --- a/Applications/Samples/RtViewerPlugin/CMakeLists.txt Tue Aug 16 15:05:51 2022 +0200 +++ b/Applications/Samples/RtViewerPlugin/CMakeLists.txt Fri Oct 28 07:47:55 2022 +0200 @@ -28,7 +28,7 @@ set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.10.1") + set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.11.2") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif() diff -r 0661115af939 -r 2034ae383cfd Applications/Samples/WebAssembly/CMakeLists.txt --- a/Applications/Samples/WebAssembly/CMakeLists.txt Tue Aug 16 15:05:51 2022 +0200 +++ b/Applications/Samples/WebAssembly/CMakeLists.txt Fri Oct 28 07:47:55 2022 +0200 @@ -29,7 +29,7 @@ set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.10.1") + set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.11.2") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif() diff -r 0661115af939 -r 2034ae383cfd Applications/StoneWebViewer/NEWS --- a/Applications/StoneWebViewer/NEWS Tue Aug 16 15:05:51 2022 +0200 +++ b/Applications/StoneWebViewer/NEWS Fri Oct 28 07:47:55 2022 +0200 @@ -1,8 +1,15 @@ Pending changes in the mainline =============================== +* Display of orientation markers +* New configuration options: + - "ShowInfoPanelAtStartup" to control the info panel at startup + - "ShowUserPreferencesButton" to show the button for setting preferences + - "ShowNotForDiagnosticUsageDisclaimer" to show disclaimer about diagnostic usage + - "DicomWebHttpHeaders" to set HTTP headers in DICOMweb requests * More tolerance wrt. bad values of the Pixel Spacing (0028,0030) tag * Support of DICOM images without the Study Date (0008,0020) tag +* Fix handling of "token": The authorization header was not set in QIDO-RS requests Version 2.3 (2022-03-24) diff -r 0661115af939 -r 2034ae383cfd Applications/StoneWebViewer/NOTES.txt --- a/Applications/StoneWebViewer/NOTES.txt Tue Aug 16 15:05:51 2022 +0200 +++ b/Applications/StoneWebViewer/NOTES.txt Fri Oct 28 07:47:55 2022 +0200 @@ -92,6 +92,22 @@ displayed at the startup. +Minor changes +------------- + +- Option "ShowInfoPanelButtonEnabled" in the Osimis Web viewer is + named "ShowUserPreferencesButton" in the Stone Web viewer. + +- Option "AlwaysShowNotForDiagnosticUsageDisclaimer" in the Osimis Web + viewer is named "ShowNotForDiagnosticUsageDisclaimer" in the Stone + Web viewer. + +- The allowed values for option "ShowInfoPanelAtStartup" are "Always", + "Never" of "User" (note the first character in upper case). In the + Osimis Web viewer, these options were in lower case. + + + Authorization to the DICOMweb server (new in 2.0) ==================================== diff -r 0661115af939 -r 2034ae383cfd Applications/StoneWebViewer/Plugin/Plugin.cpp --- a/Applications/StoneWebViewer/Plugin/Plugin.cpp Tue Aug 16 15:05:51 2022 +0200 +++ b/Applications/StoneWebViewer/Plugin/Plugin.cpp Fri Oct 28 07:47:55 2022 +0200 @@ -65,7 +65,8 @@ { std::vector tokens; Orthanc::Toolbox::TokenizeString(tokens, version, '.'); - if (tokens.size() != 2) + if (tokens.size() != 2 && + tokens.size() != 3) { throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, "Bad version of the DICOMweb plugin: " + version); diff -r 0661115af939 -r 2034ae383cfd Applications/StoneWebViewer/Version.cmake --- a/Applications/StoneWebViewer/Version.cmake Tue Aug 16 15:05:51 2022 +0200 +++ b/Applications/StoneWebViewer/Version.cmake Fri Oct 28 07:47:55 2022 +0200 @@ -24,6 +24,6 @@ set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.10.1") + set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.11.2") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif() diff -r 0661115af939 -r 2034ae383cfd Applications/StoneWebViewer/WebApplication/app.js --- a/Applications/StoneWebViewer/WebApplication/app.js Tue Aug 16 15:05:51 2022 +0200 +++ b/Applications/StoneWebViewer/WebApplication/app.js Fri Oct 28 07:47:55 2022 +0200 @@ -1123,8 +1123,6 @@ if (localStorage.settingSoftwareRendering) { this.settingSoftwareRendering = (localStorage.settingSoftwareRendering == '1'); } - - this.modalNotDiagnostic = this.settingNotDiagnostic; var that = this; @@ -1157,6 +1155,11 @@ window.addEventListener('StoneInitialized', function() { + /** + * Do NOT modify the order of the calls to "stone.XXX()" in this + * section, otherwise the HTTP headers might not be properly set. + **/ + stone.Setup(Module); stone.SetDicomWebRoot(app.globalConfiguration.DicomWebRoot, true /* assume "/rendered" is available in DICOMweb (could be a configuration option) */); @@ -1166,17 +1169,37 @@ stone.SetDicomCacheSize(app.globalConfiguration.DicomCacheSize); } - if ('SkipSeriesFromModalities' in app.globalConfiguration) { - stone.SetSkipSeriesFromModalities(JSON.stringify(app.globalConfiguration.SkipSeriesFromModalities)); + // Calls to "stone.AddHttpHeader()" must be after "stone.SetDicomWebRoot()", + // and before "stone.SetSkipSeriesFromModalities()" + for (var header in app.globalConfiguration.DicomWebHttpHeaders) { + stone.AddHttpHeader(header, app.globalConfiguration.DicomWebHttpHeaders[header]); } // Bearer token is new in Stone Web viewer 2.0 var token = getParameterFromUrl('token'); - if (token !== undefined) - { + if (token !== undefined) { stone.AddHttpHeader('Authorization', 'Bearer ' + token); } + + + /** + * Calls to "stone.XXX()" can be reordered after this point. + **/ + if ('SkipSeriesFromModalities' in app.globalConfiguration) { + stone.SetSkipSeriesFromModalities(JSON.stringify(app.globalConfiguration.SkipSeriesFromModalities)); + } + + if (app.globalConfiguration.ShowInfoPanelAtStartup == 'Always') { + app.modalNotDiagnostic = true; + } else if (app.globalConfiguration.ShowInfoPanelAtStartup == 'Never') { + app.modalNotDiagnostic = false; + } else if (app.globalConfiguration.ShowInfoPanelAtStartup == 'User') { + app.modalNotDiagnostic = app.settingNotDiagnostic; + } else { + alert('Bad value for option "ShowInfoPanelAtStartup": ' + app.globalConfiguration.ShowInfoPanelAtStartup); + } + console.warn('Stone properly initialized'); app.stoneWebViewerVersion = stone.GetStoneWebViewerVersion(); diff -r 0661115af939 -r 2034ae383cfd Applications/StoneWebViewer/WebApplication/configuration.json --- a/Applications/StoneWebViewer/WebApplication/configuration.json Tue Aug 16 15:05:51 2022 +0200 +++ b/Applications/StoneWebViewer/WebApplication/configuration.json Fri Oct 28 07:47:55 2022 +0200 @@ -119,6 +119,35 @@ /** * Define a list of modality type that the viewer will ignore. **/ - "SkipSeriesFromModalities": ["SR", "SEG", "PR"] + "SkipSeriesFromModalities": ["SR", "SEG", "PR"], + + /** + * Whether to display the info panel at startup. Allowed values: + * "Always", "Never", "User". With "User", the user can decide to + * show or not the info panel in the user preferences panel (this + * is implemented using a cookie). (New in Stone Web viewer 2.4) + **/ + "ShowInfoPanelAtStartup": "User", + + /** + * Whether to give access to the user preferences window. (New in + * Stone Web viewer 2.4) + **/ + "ShowUserPreferencesButton" : true, + + /** + * Display a "not for diagnostic usage" disclaimer above the list + * of studies/series. (New in Stone Web viewer 2.4) + **/ + "ShowNotForDiagnosticUsageDisclaimer": true, + + /** + * HTTP headers to be set in each request to the DICOMweb server. + * Note that the value of the headers can be taken from the + * environment variables. + **/ + "DicomWebHttpHeaders" : { + /* "Authorization" : "Bearer ${USER}" */ + } } } diff -r 0661115af939 -r 2034ae383cfd Applications/StoneWebViewer/WebApplication/index.html --- a/Applications/StoneWebViewer/WebApplication/index.html Tue Aug 16 15:05:51 2022 +0200 +++ b/Applications/StoneWebViewer/WebApplication/index.html Fri Oct 28 07:47:55 2022 +0200 @@ -40,11 +40,14 @@

+
+
+ +
+

- -

- -
+
+ +
+
@@ -172,7 +177,9 @@
- +

+ For patients, researchers and quality assurance. Not for diagnostic usage. +

@@ -584,7 +591,7 @@
-
+