Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Guide, load image from folder
Date: Sat, 29 Nov 2008 04:24:02 +0000 (UTC)
Organization: PhysioSonics Inc
Lines: 27
Message-ID: <ggqg52$7jo$1@fred.mathworks.com>
References: <ggq8t2$mcg$1@fred.mathworks.com> <ggqa9i$679$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227932642 7800 172.30.248.35 (29 Nov 2008 04:24:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 29 Nov 2008 04:24:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1129061
Xref: news.mathworks.com comp.soft-sys.matlab:503750


"Rui Gomes" <rpgomes84@gmail.com> wrote in message <ggqa9i$679$1@fred.mathworks.com>...
> function button_open_Callback(hObject, eventdata, handles)
> 
> %%load image
> image_loaded=UIIMPORT('-file');
> 
> axes(handles.axes2);
> image(image_loaded); 
> axis off;
> 
> guidata(hObject, handles);
> 
> this code do not work because where:
> 
> image(image_loaded); 
> 
> is expecting this image(image_loaded.filename);
> 
> there is any way to get this filename ??
> 
>  thanks for the help.

Try:

fileName = uigetfile;
I = imread(fileName);
set(handle.axes, 'CData', I);