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

Home » Public Forums » archive » Re: pixel coordinates of a line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: pixel coordinates of a line [message #25619 is a reply to message #25544] Fri, 29 June 2001 06:53 Go to previous messageGo to previous message
david[2] is currently offline  david[2]
Messages: 100
Registered: June 2001
Senior Member
Alex Schuster writes:

> Another method would be drawing a real line via PLOTS (preferably in the
> Z buffer), use TVRD() to get this screen part, use WHERE() to get the
> indices of this line, and again image[index] is the information you
> seek.

Oddly, I've had occasion to use this method in the past
week or so and I want to mention one little caveat.
I was trying to quantitate the length of a "contact"
between two adjoining "blobs". The "contact" shows
up (more or less) as a line on an image.

But since I wanted to measure the length of this
line, I needed the pixels in order, from one end
to the other. WHERE doesn't give you this. Nor
does the very useful routine THIN, which has the
wonderful property of identifying the endpoints
of the line for you. (Nor does SEARCH2D return
ordered pixels, which was another non-productive
thought I had.)

So, if you want a line segment, you will have
to write a little routine to sort the pixels
out for yourself. My routine starts at one of
the endpoints and finds the next closest pixel,
etc. It may not be the fastest algorithm, but
it worked well for me.

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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: volume slicing
Next Topic: Re: Intersecting geometric shapes

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

Current Time: Sat Oct 11 03:38:21 PDT 2025

Total time taken to generate the page: 1.59703 seconds