How do I refresh the image shown on gui, after a selection is made in the colormap popup menu by the user?

1 Ansicht (letzte 30 Tage)
I am creating a gui with PET images and I have done a popup menu for the color look up table. Please help me on how to refresh the image after a choice is made from the pop up menu by the user. For example, When I choose 'bone' in the pop up menu from gui, the image should change to 'bone' color. But it doesn't as i have not refreshed the image yet and i need help with that syntax.

Akzeptierte Antwort

Ced
Ced am 17 Mär. 2016
Bearbeitet: Ced am 17 Mär. 2016
try calling
drawnow()
after having set the new color.

Weitere Antworten (1)

Image Analyst
Image Analyst am 17 Mär. 2016
I can't read your code. Format it after you read this http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup or else just attach it with the paper clip icon. Like Ced says, try drawnow - sometimes the screen doesn't update immediately if you're in an intensive loop.
Otherwise, make sure you're not displaying a color image. If you have a full color, true RGB image, then colormaps do not apply.

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by