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

Home » Public Forums » archive » Re: Image slicing
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: Image slicing [message #16901] Wed, 25 August 1999 00:00
Tim Lamont-Smith is currently offline  Tim Lamont-Smith
Messages: 5
Registered: August 1999
Junior Member
Gwyn Fireman wrote:

> Tim Lamont-Smith (tlsmith@dera.gov.uk) wrote:
> : What I would really like to be able to have is something a
> : little bit like LIVE_IMAGE, where it is possible to draw a
> : line on the image using the cursor, but then have the data
> : values along that line returned, and possibly have the
> : indices returned as well.
>
> Tim -
>
> I did this in 1993, IDL version 2. The procedure is heavily integrated
> into the calling application, and would take some work to make current and
> modular. If nobody else offers in a couple of days, I might just whip it
> into shape or send it to you as is.
>
> Hint: I use XOR graphics for the "rubber band" line, CURSOR to get the
> endpoints in device coordinates, converted to data coords myself, and
> found the coords between endpoints myself.

I wasn't familiar with XOR graphics, but it turned out to be straight forward
once I looked at BOX_CURSOR. I pretty much followed the route you outlined.
David Fannings tips on image profiles was also useful.

Thanks,

Tim

--
*************************************
Tim Lamont-Smith
DERA, R205, St. Andrew's Road,
Malvern, Worcs., WR14 3PS
Tel.: +44 (0)1684 896753
Fax.: +44 (0)1684 894252
*************************************
Re: Image slicing [message #16917 is a reply to message #16901] Tue, 24 August 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Tim Lamont-Smith (tlsmith@dera.gov.uk) writes:

> I have a 2D image which I want to take a slice through. What
> I could do is use ROT to rotate my image so that I can then
> plot one of the columns, but this is very unsatisfactory.
>
> What I would really like to be able to have is something a
> little bit like LIVE_IMAGE, where it is possible to draw a
> line on the image using the cursor, but then have the data
> values along that line returned, and possibly have the
> indices returned as well. CURSOR could be used, but then you
> only get to guess the two endpoints and plot the line on the
> image afterwards. BOX_CURSOR could also be used, and then
> you have to imagine a line between the diagonals. I suspect
> modifying BOX_CURSOR and calling it something like
> LINE_CURSOR may be the best way.
>
> Does anyone have software to do this already ?
> Does anyone else think that this would be a useful feature
> for IDL to have ?

If you can't do this in 10 minutes after reading
these two articles, let me know. :-)

http://www.dfanning.com/tips/rubberband_widget.html
http:://www.dfanning.com/tips/image_profile.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Image slicing [message #16918 is a reply to message #16917] Tue, 24 August 1999 00:00 Go to previous message
fireman is currently offline  fireman
Messages: 49
Registered: August 1991
Member
Tim Lamont-Smith (tlsmith@dera.gov.uk) wrote:
: What I would really like to be able to have is something a
: little bit like LIVE_IMAGE, where it is possible to draw a
: line on the image using the cursor, but then have the data
: values along that line returned, and possibly have the
: indices returned as well.

Tim -

I did this in 1993, IDL version 2. The procedure is heavily integrated
into the calling application, and would take some work to make current and
modular. If nobody else offers in a couple of days, I might just whip it
into shape or send it to you as is.

Hint: I use XOR graphics for the "rubber band" line, CURSOR to get the
endpoints in device coordinates, converted to data coords myself, and
found the coords between endpoints myself.

--
-- Gwyn F. Fireman
-- General Sciences Corporation / MODIS Characterization Support Team
-- Gwyn.Fireman@gsfc.nasa.gov 301-352-2118
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Are pointers faster in structs ?
Next Topic: Re: VIP

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

Current Time: Wed Oct 08 15:06:42 PDT 2025

Total time taken to generate the page: 0.00537 seconds