Enable setting the window level (contrast and brightness) by dragging
This function allows you to adjust the window and level (contrast and brightness) of images by dragging. This is especially useful in viewing CT images.
Examples are included.
Matlab: should work on all releases (tested on R2018a, R2012b and R6.5)
Octave: tested on 4.2.1
OS: written on Windows 10 (64bit), Octave tested on a virtual (32bit) Ubuntu 16.04 LTS, should work for Mac
Rik (2020). WindowLevel (https://www.mathworks.com/matlabcentral/fileexchange/66885-windowlevel), MATLAB Central File Exchange. Retrieved .
fixed small issues with older Matlab releases and restructured code