Path: news.mathworks.com!not-for-mail
From: "Ben " <bta7905.nospam@msn.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to handle uploaded image in Gui
Date: Wed, 13 May 2009 18:09:02 +0000 (UTC)
Organization: Orbital Sciences Corp
Lines: 33
Message-ID: <guf2bu$ik7$1@fred.mathworks.com>
References: <gudb01$51g$1@fred.mathworks.com> <93a98eeb-81dc-408e-8640-3142cc4542ac@u10g2000vbd.googlegroups.com> <gue6bl$cla$1@fred.mathworks.com> <guefah$h41$1@fred.mathworks.com> <gueg93$jj1$1@fred.mathworks.com> <guejni$c08$1@fred.mathworks.com>
Reply-To: "Ben " <bta7905.nospam@msn.com>
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 1242238142 19079 172.30.248.37 (13 May 2009 18:09:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 13 May 2009 18:09:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 425457
Xref: news.mathworks.com comp.soft-sys.matlab:539676


"Steven Lord" <slord@mathworks.com> wrote in message <guejni$c08$1@fred.mathworks.com>...
> 
> "Pulkit " <pulkit.audacious1.remove1tomail@gmail.com> wrote in message 
> news:gueg93$jj1$1@fred.mathworks.com...
> > Hi Ben,
> >
> > Thnx for that.
> > I meant that, as I move my mouse pointer over the image, i want to get 
> > pixel data point by point & then I want to save these data values at 
> > certain pixels for future use.
> 
> I think from this description that you want either IMPROFILE or IMPIXEL from 
> Image Processing Toolbox.
> 
> > The problem is how do I get the handle of the image in the GUI.
> > Once I use imshow()  to display the image in the axes , the Buttondownfcn 
> > of the axes no longer works, thus i am unable to detect the current 
> > location of my mouse pointer on the image.
> 
> Take a look at these documents from the support website:
> 
> http://www.mathworks.com/support/solutions/en/data/1-3K8R2L/
> 
> http://www.mathworks.com/support/solutions/en/data/1-1B03X/
> 
> -- 
> Steve Lord
> slord@mathworks.com 
> 

I have seen something very similar to the GUI that you are describing.  It was either a demo or on the user community.  Unfortunately I could not find it but essentially you could mouse over an image and the RGB values of your current mouse position were displayed in 3 text boxes below the image.  I believe it used the window motion function with a call back that gets the current mouse position over the axis (something like "gpos" in the file exchange) then it used the current mouse position as an X, and Y index into CData returning the 3 RGB values.

Hope that helps.