Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!e6g2000vbe.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Instantiation of multiple images in a GUI
Date: Wed, 19 Nov 2008 10:48:30 -0800 (PST)
Organization: http://groups.google.com
Lines: 27
Message-ID: <6305c99d-54d2-47be-a77c-4449b57420b6@e6g2000vbe.googlegroups.com>
References: <gg1j76$88v$1@fred.mathworks.com>
NNTP-Posting-Host: 192.44.136.113
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1227120511 9072 127.0.0.1 (19 Nov 2008 18:48:31 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 19 Nov 2008 18:48:31 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: e6g2000vbe.googlegroups.com; posting-host=192.44.136.113; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
	CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 
	3.5.21022),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 bdci2px (NetCache NetApp/6.0.7)
Xref: news.mathworks.com comp.soft-sys.matlab:501802


On Nov 19, 12:43=A0pm, "Thiago Jota" <thi...@mathworks.com> wrote:
> I'm trying to instantiate an unique image within each axes object of my G=
UI. Unfortunately, this becomes problematic after the first image. I am usi=
ng imread and imshow in the callback of each axes object. Is there any alte=
rnative?
>
> Thanks

---------------------------------------------------------------------------=
---------------------------
Thiago Jota:
Don't load images into the axes in the callback of the axes.  You can
do it in the callback of your listbox or some other function.  You
click on an image filename in your listbox, or set it in your function
somehow.  Then in the call back of the listbox, or in that other
function, you can call imread and imshow.  Before you call those
however, make sure you call the axes function and pass it the handle
to the axes where you want the image displayed.

Clicking on an axes is problematic because once an image is thrown
into it, I think it essentially lies on top of the axes and you can
never click on the axes again because it's underneath the image -
you're clicking on the image which is a child of the axes and you'd
have to set up a callback for that image which is separate from the
callback of the axes that it lives in.  Really quirky, I know.
Regards,
ImageAnalyst