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 #69626 is a reply to message #69624] Thu, 28 January 2010 17:57 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
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)
[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 14:01:00 PDT 2025

Total time taken to generate the page: 1.36247 seconds