# HG changeset patch # User Sebastien Jodogne # Date 1732626124 -3600 # Node ID dd08f4f17a7a3604c53b5436028af5418b544ccb # Parent 94df151039f1340ad1f08422fb7a8ad4fd810cf3 allow different images from the same series to have different windowings diff -r 94df151039f1 -r dd08f4f17a7a Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp --- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Wed Nov 06 16:12:21 2024 +0100 +++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Tue Nov 26 14:02:04 2024 +0100 @@ -2395,10 +2395,16 @@ // (cf. mail from Tomas Kenda on 2021-08-17) InstancesCache::Accessor accessor(*instancesCache_, instance.GetSopInstanceUid()); OrthancStone::Windowing windowing; - if (accessor.IsValid() && - accessor.GetParameters().LookupPerFrameWindowing(windowing, frameIndex)) + if (accessor.IsValid()) { - UpdateWindowing(WindowingState_FramePreset, windowing); + if (accessor.GetParameters().LookupPerFrameWindowing(windowing, frameIndex)) + { + UpdateWindowing(WindowingState_FramePreset, windowing); + } + else if (accessor.GetParameters().GetWindowingPresetsCount() > 0) + { + UpdateWindowing(WindowingState_FramePreset, accessor.GetParameters().GetWindowingPreset(0)); + } } }