J.D.
2007-03-02 00:21:00 UTC
I am making an image manipulation GUI using Matlab GUIDE. I just
learned about the image processing toolbox's "Modular tools". They
sound great and I wanted to specifically add the image contrast
adjustment tool to my little application. So I added a menu item with
the following callback function:
function imageMenuAdjustContrast_Callback(hObject, eventdata, handles)
imcontrast(handles.displayAxes);
handles.displayAxes is a axis ui object in my main application figure.
And this works great... well almost. When I click the menu item, the
image contrast dialog comes up and I can mess with the controls - and
in real-time the image in handles.displayAxes is modified. However,
when I return to the main window and do other modifications to the
image, the changes imcontrast made seem to have disappeared.
It appeared as if imcontrast was modifying the image "CData" field but
obviously not since its changes seem to vanish when I access that same
data field later in the program.. does anyone have any idea why it
behaves this way? Or am I missing something fundamental?
learned about the image processing toolbox's "Modular tools". They
sound great and I wanted to specifically add the image contrast
adjustment tool to my little application. So I added a menu item with
the following callback function:
function imageMenuAdjustContrast_Callback(hObject, eventdata, handles)
imcontrast(handles.displayAxes);
handles.displayAxes is a axis ui object in my main application figure.
And this works great... well almost. When I click the menu item, the
image contrast dialog comes up and I can mess with the controls - and
in real-time the image in handles.displayAxes is modified. However,
when I return to the main window and do other modifications to the
image, the changes imcontrast made seem to have disappeared.
It appeared as if imcontrast was modifying the image "CData" field but
obviously not since its changes seem to vanish when I access that same
data field later in the program.. does anyone have any idea why it
behaves this way? Or am I missing something fundamental?