comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: linetool for measuring the distance between 2 points
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: linetool for measuring the distance between 2 points [message #40775] Thu, 26 August 2004 08:43
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Tobi writes:

> i have a widget application which will display data as an image. i
> would like to draw a line and measure the distance between the start
> and end points. i can get the position from two cursor calls and then
> calculate it, but i was wondering if there is an easier way?!

Cursor calls!? In a widget program? Oh, my goodness. :-(

Have a look at how to draw an interactive rubberband line
in a draw widget:

http://www.dfanning.com/widget_tips/line_on_image.html

(Use your RIGHT button to draw the line in the Drawline
example program.)

Then, just calculate the distance between the end points
and output it someplace. :-)

Cheers,

David

P.S. Let's just say the kind of interaction you get
from CURSOR is not what widget programs are all about. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: save an IDLanROI to file? (newbie question)
Next Topic: matrix plot similar to pcolor() in matlab?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 16 21:10:46 PDT 2025

Total time taken to generate the page: 1.51917 seconds