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

Home » Public Forums » archive » Re: CURSOR skips a few beats :-(
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: CURSOR skips a few beats :-( [message #69623 is a reply to message #69622] Fri, 29 January 2010 09:04 Go to previous messageGo to previous message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
On Jan 28, 7:57 pm, pp <pp.pente...@gmail.com> wrote:
> On Jan 28, 8:38 pm, Gianguido Cianci <gianguido.cia...@gmail.com>
> wrote:
>
>> Right, you can join the dots... so when IDL plots the line between the
>> dots, it calculates which pixels need to turn white. How do I get the
>> coords of all those pixels?
>
> You can do it with an ROI:
>
> ;make up some x,y pixel coordinates
> dims=[200,200]
> x=randomu(seed,10)*dims[0] & x=x[sort(x)] & x=[x,reverse(x)]
> y=(1d0+([randomu(seed,10),-randomu(seed,10)]))*dims[1]/2
> ;take look at the points
> iplot,x,y
> ;define an ROI with those vertices
> oroi=obj_new('idlanroi',x,y)
> ;get the pixels that lie on the boundary
> bound=oroi->computemask(dimensions=dims,mask_rule=0)
> ;take a look at the result
> iimage,bound
> ;get the coordinates of the boundary pixels
> w=where(bound eq 255B)
> xy_bound=array_indices(bound,w)

pp - I would not want to get the bounding polygon, but rather the path
that joins the points. reading the docs right now. Thanks for pointing
me in that direction :-)

Gianguido
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Mode and variation of cells in multiple grids (3-D problem)
Next Topic: read an mp3?

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

Current Time: Fri Oct 10 11:37:36 PDT 2025

Total time taken to generate the page: 0.32142 seconds