Window/level not fixed when displaying a GSPS
Describe the bug. What happened?
When reviewing a series with a GSPS activated, the Window/Level set by the user is not kept and is systematically replaced by the W/L from the image when browing the series. When that same series is viewed without the GSPS activated, the W/L set by the user is properly kept while browsing.
This behavior is seen on Windows and macOS versions.
What version of Weasis are you running?
4.6.3
On which system the problem occurs?
Windows
Relevant log output
Additional contextual elements
No response
I would say this is a feature rather than a bug, because when a Presentation State (GSPS) is applied, the window/level (default values, LUT and LUT shape) can be overridden according to the DICOM standard. Preserving user-set W/L values as you mention could lead to incorrect rendering in several cases where the presentation state intends to dictate the display parameters.
Currently, Weasis applies the full presentation state (not just graphics) to keep things simple and consistent. If you want to preserve your custom W/L settings, you can deactivate the automatic application of Presentation States in the preferences, or select “None (all the series)” from the PR menu to exclude PRs and keep your chosen window/level.
Thanks for your follow-up, Nicolas. I understand the logic when the GSPS includes a W/L setting (although unlocking the W/L would be an interesting feature in that scenario).
I forgot to mention that we also have performed another test with a GSPS that does not include any W/L settings and got same result (sorry for not mentioning this test): the user can change the W/L while the GSPS is active and this W/L change is lost as soon as the user navigates in the series : Weasis applies the W/L included in the image header. This does not happen when the GSPS is inactive. Why would the application of a GSPS with only graphics and no W/L setting included prevent the user to change the W/L as when no GSPS is applied?
From: Nicolas Roduit @.> Sent: Wednesday, October 15, 2025 07:46 To: nroduit/Weasis @.> Cc: Garfagni, Herve @.>; Author @.> Subject: Re: [nroduit/Weasis] Window/level not fixed when displaying a GSPS (Issue #746)
EXTERNAL EMAIL: Check the sender's EMAIL ADDRESS / Vérifiez l'ADRESSE E-MAIL de l'expéditeur [https://avatars.githubusercontent.com/u/993975?s=20&v=4]nroduit left a comment (nroduit/Weasis#746)https://github.com/nroduit/Weasis/issues/746#issuecomment-3404610011
I would say this is a feature rather than a bug, because when a Presentation State (GSPS) is applied, the window/level (default values, LUT and LUT shape) can be overridden according to the DICOM standard. Preserving user-set W/L values as you mention could lead to incorrect rendering in several cases where the presentation state intends to dictate the display parameters.
Currently, Weasis applies the full presentation state (not just graphics) to keep things simple and consistent. If you want to preserve your custom W/L settings, you can deactivate the automatic application of Presentation States in the preferences, or select "None (all the series)" from the PR menu to exclude PRs and keep your chosen window/level.
Reply to this email directly, view it on GitHubhttps://github.com/nroduit/Weasis/issues/746#issuecomment-3404610011, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BNNB4ONN4IEPIZXSLMBOKID3XXNSDAVCNFSM6AAAAACJB2XQOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIMBUGYYTAMBRGE. You are receiving this because you authored the thread.Message ID: @.@.>>
A DICOM Presentation State (GSPS / PR) can contain more than just graphics: it may specify Window&Level, modality/VOI LUTs, image position/size, calibration, display area, zoom/rotation, and more. Weasis applies the full presentation state when a PR is active — not only the graphic annotations — so the PR’s W/L (or VOI LUT) will overwrite any W/L you set while browsing the series. To remain compliant you must reset a lot of viewer state when changing images because a PR can legitimately change position, size, calibration, modality transforms and VOI settings between images.
It would be useful to offer an option to apply only the graphic parts of a PR (annotations) and ignore the imaging parameters (VOI, transform). That would preserve user W/L while still showing annotations. However, implementing a “graphics-only” mode that is correct for all cases is hard: the PR spec is large and interdependent. A pragmatic compromise is a user-configurable check box: “Apply graphics only (all the series)”. That gives power users a choice without breaking spec-compliant behavior by default.