Recent improvements in window/level management

This is a quick summary of image window/level (brightness/contrast) adjustment changes introduced in recent Slicer Preview (formerly known as “Nightly”) releases.

  1. Improved automatic window/level algorithm

Images that do not contain preferred window/level information are displayed with automatically computed values. The complex automatic computation algorithm that had been used in Slicer worked marginally better for some images, but sometimes generated too bright images and overall the results were somewhat unpredictable.

The algorithm is replaced by a simpler one, which adjust the window to display intensity values between 0.1 and 99.9 percentiles.

  1. Improved manual window/level adjustment

New mouse mode is added for window/level adjustment. This prevents accidental modification of window/level when interacting in slice views and allows new window/level adjustment methods. Click on the corresponding icon on the toolbar to activate the new mode. The icon consists of color and grayscale gradients and a mouse pointer:


Window/level setting options:

  • Click-and-drag adjusts window/level (same as before)
  • Ctrl + left-click-and-drag sets optimal window/level for the selected region. Pressing Escape or right-click during the drag cancels the operation.
  • Double-click resets window/level (using automatic window/level algorithm, for the entire image)

Region-based auto window/level example:

Demo video:


Could there be an option in settings to enable windowing using the normal mouse cursor as well? working with multiple series and needing to change windows on the go is awkward, i guess for people who are familiar with slicer this will be a bigger bother than of the window accidentally changing, unless there is a planned better use of the regular left click.

If you find that you need to modify window/level of multiple volumes then you can keep the mouse mode in window/level mode. You can still pan, zoom, browse slices, etc. and adjust window/level with left-click-and-drag the same way as before.

Also, we plan to make it easier to switch between mouse modes (using right-click context menu and keyboard shortcuts).

1 Like

Thanks, keyboard shortcuts would be fine, the issue was more prominent when using segment editor as clicking “none” tool or Esc key disables the windowing mouse, and there is a need to switch back and forth when tweaking the window multiple times

A post was split to a new topic: How to change window/level programmatically