Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Please help with GUI
Date: Sun, 2 Nov 2008 21:47:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <gel74l$12v$1@fred.mathworks.com>
References: <71766ac3-2c54-409e-9e46-388a21b0a962@e38g2000prn.googlegroups.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 1225662421 1119 172.30.248.37 (2 Nov 2008 21:47:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 2 Nov 2008 21:47:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1338633
Xref: news.mathworks.com comp.soft-sys.matlab:498551


I suggest you use the 'Guide' GUI matlab tool. Type 'guide' in the command window and the wizard will load. Lay out the GUI as you want using the controls on the left toolbar. 

If you right click on each control once placed you can open the property inspector to change certain things about it, and also create a callback for each control. You will have to do this to achieve the 4 points you outlined. In the callback .m file you will probably use the following functions:

> 1) load images to axes

Give focus to the axes with 'axes(handles.axes1)' or whatever number it is. Use 'imshow' to show the image in that axes.

> 2) when you push down Ctrl+mouse button and move it the program draws a line on the image

Not sure why you would want to have to hold down 'control' to do this. Try 'imline'.

> 3) Zoom image , scroll it in axes

Use 'zoom'.

> 4) save this image to file

Use 'saveas'.

With all of these type 'help' before it in the command window and details about how to use them will display. It sounds like you also need to understand how to use callbacks with a GUI, and similarly there is documentation available for this from the help. 

Have a try using those functions I suggest and if you have a specific problem post again.