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

Home » Public Forums » archive » Re: Filling a contour
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: Filling a contour [message #60716 is a reply to message #60675] Sun, 08 June 2008 09:59 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
> xcrossings = total(contour_image, 1, /cumulative)
> ycrossings = total(contour_image, 2, /cumulative)
> interior = where(xcrossings mod 2 and ycrossings mod 2, ninterior)
> if ninterior gt 0 then contour_image[interior]=1

Actually, that's going to fall down badly where the contour is tangent
to the x or y axis. So you probably need to resort to some sort of
iterative scheme of finding one interior point and then searching for
points around it.

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: efficient comparing 1D and 3D arrays
Next Topic: Re: Best inverse of IDLanROI::ComputeMask

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

Current Time: Sat Oct 11 07:29:18 PDT 2025

Total time taken to generate the page: 0.08220 seconds