View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Adjust window level of image using mouse button

3.0 | 2 ratings Rate this file 4 Downloads (last 30 days) File Size: 1.42 KB File ID: #38491 Version: 1.2

Adjust window level of image using mouse button


Yi Sui (view profile)


04 Oct 2012 (Updated )

You can adjust the window level using mouse

| Watch this File

File Information

You can adjust the window level by mouse
1 clicking and holding the RIGHT mouse button and moving: adjust current image

2 mid-button or shift+left button: adjust all images in current figure.

Required Products MATLAB
MATLAB release MATLAB 7.12 (R2011a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
13 Jun 2013 Jan Simon

Jan Simon (view profile)

The updated version of your code is much nicer - thanks!
The local variables are now stored in the figure's UserData, wuch that it can be applied to multiple figures without confusions.

I still see a problem in the missing documentation. While the code does not contain a help section, the only specification is found here in the FEX: "adjust the window level". But what exactly is adjusted?

Now I think, that this function is probably useful. Only the lack of a documentation reduces the usability substantially. A small help sections with a H1-line, which decribes the inputs and the applied procedure clearly, would be enough.

30 Oct 2012 Yi Sui

Yi Sui (view profile)

Thank you for your long comments. Should you ever try the code, you would know it is useful, usable and does work for more than 1 figure at the same time.

Comment only
13 Oct 2012 uc3m Cristobal

Can you explain how the function works?

Comment only
06 Oct 2012 Jan Simon

Jan Simon (view profile)

This function does not contain any documentation. If a FEX user downloads it, even the short single line of the description here is not available anymore.
On the other hand the purpose of the function is not getting clear when the source code is read also. There are some deprecated large strings used as callbacks - function handles would be smarter, safer and more clear.
The code contains a magic string: "
randstr = 'oE_3rT4x_'". Magic strings are a bad programming pattern. In addition I wonder, if this function will run correctly, if it is applied to more than 1 figure at the same time.
My conclusion: Not usable. I cannot decide if it is useful. No docs or comments. Bad programming style.

Please brush up the function to make it more useful and usable. Then I will rate this again.

12 Jun 2013 1.2

rewrite the code

Contact us