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 20:25:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 40
Message-ID: <ggs8ev$539$1@fred.mathworks.com>
References: <ggq8t2$mcg$1@fred.mathworks.com> <ggqa9i$679$1@fred.mathworks.com> <ggqg52$7jo$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227990303 5225 172.30.248.37 (29 Nov 2008 20:25:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 29 Nov 2008 20:25:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1598967
Xref: news.mathworks.com comp.soft-sys.matlab:503828


"Ryan Ollos" <ryano@physiosonics.com> wrote in message <ggqg52$7jo$1@fred.mathworks.com>...
> "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);


thanks to both, you solve my problem

here the solution i use 

fileName = uigetfile('*.jpg');
if(fileName ~= 0)
    I = imread(fileName);
    image(I)
    axis off;
end