# HG changeset patch # User Sebastien Jodogne # Date 1667328063 -3600 # Node ID 6e4ef6e3b2bf2e97561d1de0f85e93949f8334b7 # Parent f2a094fa8c332e704792e98897e0724e7f97fa61 linear interpolation of images can be turned off in the user preferences diff -r f2a094fa8c33 -r 6e4ef6e3b2bf Applications/StoneWebViewer/NEWS --- a/Applications/StoneWebViewer/NEWS Tue Nov 01 19:04:34 2022 +0100 +++ b/Applications/StoneWebViewer/NEWS Tue Nov 01 19:41:03 2022 +0100 @@ -10,6 +10,7 @@ * Added vertical slider showing position of the current frame inside the series * Display of orientation markers * The text field with the instance number is editable to go to a specific instance +* Linear interpolation of images can be turned off in the user preferences * New configuration options: - "ShowInfoPanelAtStartup" to control the info panel at startup - "ShowUserPreferencesButton" to show the button for setting preferences diff -r f2a094fa8c33 -r 6e4ef6e3b2bf Applications/StoneWebViewer/WebApplication/app.js --- a/Applications/StoneWebViewer/WebApplication/app.js Tue Nov 01 19:04:34 2022 +0100 +++ b/Applications/StoneWebViewer/WebApplication/app.js Tue Nov 01 19:41:03 2022 +0100 @@ -445,6 +445,7 @@ // User preferences (stored in the local storage) settingNotDiagnostic: true, settingSoftwareRendering: false, + settingLinearInterpolation: true, layoutCountX: 1, layoutCountY: 1, @@ -523,6 +524,9 @@ }, settingSoftwareRendering: function(newVal, oldVal) { localStorage.settingSoftwareRendering = (newVal ? '1' : '0'); + }, + settingLinearInterpolation: function(newVal, oldVal) { + localStorage.settingLinearInterpolation = (newVal ? '1' : '0'); } }, methods: { @@ -920,6 +924,8 @@ ApplyPreferences: function() { this.modalPreferences = false; + stone.SetLinearInterpolation(localStorage.settingLinearInterpolation); + if ((stone.IsSoftwareRendering() != 0) != this.settingSoftwareRendering) { document.location.reload(); } @@ -1141,6 +1147,8 @@ }, mounted: function() { + // Warning: In this function, the "stone" global object is not initialized yet! + this.SetViewportLayout('1x1'); if (localStorage.settingNotDiagnostic) { @@ -1151,6 +1159,10 @@ this.settingSoftwareRendering = (localStorage.settingSoftwareRendering == '1'); } + if (localStorage.settingLinearInterpolation) { + this.settingLinearInterpolation = (localStorage.settingLinearInterpolation == '1'); + } + var that = this; window.addEventListener('VirtualSeriesThumbnailLoaded', function(args) { @@ -1190,7 +1202,8 @@ stone.Setup(Module); stone.SetDicomWebRoot(app.globalConfiguration.DicomWebRoot, true /* assume "/rendered" is available in DICOMweb (could be a configuration option) */); - stone.SetSoftwareRendering(localStorage.settingSoftwareRendering == '1'); + stone.SetSoftwareRendering(app.settingSoftwareRendering); + stone.SetLinearInterpolation(app.settingLinearInterpolation); if ('DicomCacheSize' in app.globalConfiguration) { stone.SetDicomCacheSize(app.globalConfiguration.DicomCacheSize); diff -r f2a094fa8c33 -r 6e4ef6e3b2bf Applications/StoneWebViewer/WebApplication/index.html --- a/Applications/StoneWebViewer/WebApplication/index.html Tue Nov 01 19:04:34 2022 +0100 +++ b/Applications/StoneWebViewer/WebApplication/index.html Tue Nov 01 19:41:03 2022 +0100 @@ -85,7 +85,11 @@
-