MATLAB: How to substitute “getimage” function

functiongetimagegetimage functionImage Processing Toolboxno toolbox

I don't have a the Image Toolbox installed in my pc in my new company and I would like to know how to substitute the getimage function for now:
function addchippicture_button_callback(hObject, eventdata, handles)
global dataStruct
[FileName,PathName] = uigetfile('*.png');
chip_image = strcat(PathName,FileName);
chip_image = imread(chip_image);
image('Parent', handles.chip_axes, 'CData', flipdim(chip_image,1));
axis(handles.chip_axes,'tight');
dataStruct.chip_image = flipdim(getimage(handles.chip_axes),1);
end
Thank you very much!

Best Answer

The point of the previous comments is that the 'CData' property of the HG image object is what you want to query. The use of things like imshow was just to demonstrate an example. Here is a non-IPT specific example:
hFig = figure;
hIm = imagesc(rand(200,200));
im = get(hIm,'CData');
Or, if you only have an axes handle in your particular scope:
hIm = findobj(handles.chip_axes,'type','image');
im = get(hIm,'CData');