Jason - If we follow through with what you started (in above) then
MM=get(handles.uipanelM,'Children');
is the right idea but is making certain assumptions that may be invalid. Does your uipanelM only contain an axes for the image, or does it have other widgets as well? By calling get(handles.uipanelM,'Children');, we will be returned an array of handles to all graphics objects within the uipanelM widget. This may be one, two or more objects, so we can't assume that MM is only one handle, and it definitely won't be our image.
Since the image is already displayed, it must be displayed within an axes object, named (for example) axesM, which will be a child of the uipanelM widget. Rather than doing the above line of code which we would have to modify checking for two or more children, we can get the handle to the graphics object (of type image) that stores the image within the axes as
hImg = findobj('Parent',handles.axesM,'Type','image');
To get the image data, i.e. the mxnx3 (or whatever dimension) matrix, we can now do
if ~isempty(hImg)
imgData = get(hImg,'CData');
J = imadjust(imgData,stretchlim(imgData),[0 1]);
imshow(J,'Parent',handles.axesM);
colormap(jet);
end
In the above, we retrieve the image data from the axesM widget, adjust the image, and then re-display it back in the axesM widget (and so avoid the uipanelM altogether).