Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: GUI Current pointer location on displayed image
Date: Thu, 5 Nov 2009 20:35:03 +0000 (UTC)
Organization: Greeneridge Sciences Inc
Lines: 13
Message-ID: <hcvctn$4qa$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 1257453303 4938 172.30.248.37 (5 Nov 2009 20:35:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 5 Nov 2009 20:35:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2056547
Xref: news.mathworks.com comp.soft-sys.matlab:582859


Ran into a little problem with my GUI program today.  I would like eventually to create lines and boxes on top of a displayed image.  Any help or reference to websites or functions would be much appreciated.

Here's what I did if you are trying to recreate the problem.  Using guide create an axes tagged as Picture.  Then in the m-editor under the function that executes before figure is made visible, display a jpeg on the axes...

axes(handles.Picture)
image(imread('Picture.jpg'))  %loads and displays Picture.jpg

Now I want to set up a click-able box using ButtonDownFcn or WindowButtonDownFcn(preferably the previous ButtonDownFcn) , WindowMotionFcn and WindowButtonUpFcn.

I run into a problem with getting my mouse position on the image, 
"There is no 'CurrentPoint' property in the 'image' class"
Seems like there should be a way of getting mouse location without ginput for an image because you can do it for a normal plot...
I'm using 2007b btw