Mercurial > hg > orthanc-stone
comparison Applications/StoneWebViewer/WebApplication/app.js @ 1964:2034ae383cfd deep-learning
integration default->deep-learning
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 28 Oct 2022 07:47:55 +0200 |
parents | 060d61913e39 889892e51545 |
children | 963f28eb40cb |
comparison
equal
deleted
inserted
replaced
1953:0661115af939 | 1964:2034ae383cfd |
---|---|
1121 } | 1121 } |
1122 | 1122 |
1123 if (localStorage.settingSoftwareRendering) { | 1123 if (localStorage.settingSoftwareRendering) { |
1124 this.settingSoftwareRendering = (localStorage.settingSoftwareRendering == '1'); | 1124 this.settingSoftwareRendering = (localStorage.settingSoftwareRendering == '1'); |
1125 } | 1125 } |
1126 | |
1127 this.modalNotDiagnostic = this.settingNotDiagnostic; | |
1128 | 1126 |
1129 var that = this; | 1127 var that = this; |
1130 | 1128 |
1131 window.addEventListener('VirtualSeriesThumbnailLoaded', function(args) { | 1129 window.addEventListener('VirtualSeriesThumbnailLoaded', function(args) { |
1132 that.$set(that.virtualSeriesThumbnails, args.detail.virtualSeriesId, args.detail.thumbnail); | 1130 that.$set(that.virtualSeriesThumbnails, args.detail.virtualSeriesId, args.detail.thumbnail); |
1155 }); | 1153 }); |
1156 | 1154 |
1157 | 1155 |
1158 | 1156 |
1159 window.addEventListener('StoneInitialized', function() { | 1157 window.addEventListener('StoneInitialized', function() { |
1158 /** | |
1159 * Do NOT modify the order of the calls to "stone.XXX()" in this | |
1160 * section, otherwise the HTTP headers might not be properly set. | |
1161 **/ | |
1162 | |
1160 stone.Setup(Module); | 1163 stone.Setup(Module); |
1161 stone.SetDicomWebRoot(app.globalConfiguration.DicomWebRoot, | 1164 stone.SetDicomWebRoot(app.globalConfiguration.DicomWebRoot, |
1162 true /* assume "/rendered" is available in DICOMweb (could be a configuration option) */); | 1165 true /* assume "/rendered" is available in DICOMweb (could be a configuration option) */); |
1163 stone.SetSoftwareRendering(localStorage.settingSoftwareRendering == '1'); | 1166 stone.SetSoftwareRendering(localStorage.settingSoftwareRendering == '1'); |
1164 | 1167 |
1165 if ('DicomCacheSize' in app.globalConfiguration) { | 1168 if ('DicomCacheSize' in app.globalConfiguration) { |
1166 stone.SetDicomCacheSize(app.globalConfiguration.DicomCacheSize); | 1169 stone.SetDicomCacheSize(app.globalConfiguration.DicomCacheSize); |
1167 } | 1170 } |
1168 | 1171 |
1169 if ('SkipSeriesFromModalities' in app.globalConfiguration) { | 1172 // Calls to "stone.AddHttpHeader()" must be after "stone.SetDicomWebRoot()", |
1170 stone.SetSkipSeriesFromModalities(JSON.stringify(app.globalConfiguration.SkipSeriesFromModalities)); | 1173 // and before "stone.SetSkipSeriesFromModalities()" |
1174 for (var header in app.globalConfiguration.DicomWebHttpHeaders) { | |
1175 stone.AddHttpHeader(header, app.globalConfiguration.DicomWebHttpHeaders[header]); | |
1171 } | 1176 } |
1172 | 1177 |
1173 // Bearer token is new in Stone Web viewer 2.0 | 1178 // Bearer token is new in Stone Web viewer 2.0 |
1174 var token = getParameterFromUrl('token'); | 1179 var token = getParameterFromUrl('token'); |
1175 if (token !== undefined) | 1180 if (token !== undefined) { |
1176 { | |
1177 stone.AddHttpHeader('Authorization', 'Bearer ' + token); | 1181 stone.AddHttpHeader('Authorization', 'Bearer ' + token); |
1178 } | 1182 } |
1183 | |
1184 | |
1185 /** | |
1186 * Calls to "stone.XXX()" can be reordered after this point. | |
1187 **/ | |
1179 | 1188 |
1189 if ('SkipSeriesFromModalities' in app.globalConfiguration) { | |
1190 stone.SetSkipSeriesFromModalities(JSON.stringify(app.globalConfiguration.SkipSeriesFromModalities)); | |
1191 } | |
1192 | |
1193 if (app.globalConfiguration.ShowInfoPanelAtStartup == 'Always') { | |
1194 app.modalNotDiagnostic = true; | |
1195 } else if (app.globalConfiguration.ShowInfoPanelAtStartup == 'Never') { | |
1196 app.modalNotDiagnostic = false; | |
1197 } else if (app.globalConfiguration.ShowInfoPanelAtStartup == 'User') { | |
1198 app.modalNotDiagnostic = app.settingNotDiagnostic; | |
1199 } else { | |
1200 alert('Bad value for option "ShowInfoPanelAtStartup": ' + app.globalConfiguration.ShowInfoPanelAtStartup); | |
1201 } | |
1202 | |
1180 console.warn('Stone properly initialized'); | 1203 console.warn('Stone properly initialized'); |
1181 | 1204 |
1182 app.stoneWebViewerVersion = stone.GetStoneWebViewerVersion(); | 1205 app.stoneWebViewerVersion = stone.GetStoneWebViewerVersion(); |
1183 app.emscriptenVersion = stone.GetEmscriptenVersion(); | 1206 app.emscriptenVersion = stone.GetEmscriptenVersion(); |
1184 | 1207 |