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

Home » Public Forums » archive » Re: Best inverse of IDLanROI::ComputeMask
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: Best inverse of IDLanROI::ComputeMask [message #60672] Wed, 11 June 2008 19:05 Go to next message
Robbie is currently offline  Robbie
Messages: 165
Registered: February 2006
Senior Member
I managed to avoid the growing and shrinking by using the LEVELS=255
keyword.

The only thing that contour misses are very irregular shapes which
have holes in them or long protrusions which are 1 pixel thick.

Robbie
Re: Best inverse of IDLanROI::ComputeMask [message #60685 is a reply to message #60672] Wed, 11 June 2008 06:16 Go to previous messageGo to next message
Loren Anderson is currently offline  Loren Anderson
Messages: 22
Registered: August 2007
Junior Member
Well, contour certainly does do the trick. One problem is that
contour will draw a line through the diagonal, instead of only
horizontal and vertical lines as would be appropriate for pixels.
Therefore, when you go back to the region object after contouring, you
may notice that the region grows slightly.

One way around this would be to use David's find_boundary program:
http://www.dfanning.com/programs/find_boundary.pro. It's slower, but
for small regions you probably won't be able to tell.

Oh, and if your regions have "holes" in them, as far as I know contour
is your only option.

-Loren
Re: Best inverse of IDLanROI::ComputeMask [message #60820 is a reply to message #60672] Thu, 12 June 2008 07:00 Go to previous message
Loren Anderson is currently offline  Loren Anderson
Messages: 22
Registered: August 2007
Junior Member
On Jun 11, 10:05 pm, Robbie <ret...@iinet.net.au> wrote:
> I managed to avoid the growing and shrinking by using the LEVELS=255
> keyword.
>
I'm not convinced this would solve the problem every time. When the
contour line passes exactly through the intersection of four pixels,
as it does on the diagonal, IDL has to pick which pixels are inside
and which are outside the line. In my experience, this sometimes
leads to extra pixels being selected. Does anyone have a code that
could straigten out contour lines so they are never diagonal?

> The only thing that contour misses are very irregular shapes which
> have holes in them or long protrusions which are 1 pixel thick.
>
This is a bit surprising too. Contour should pick up the holes, and
the long protrusions. Can you post examples on your website?

-Loren
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Filling a contour
Next Topic: BANKRUPTCY ATTORNEY

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

Current Time: Wed Oct 08 15:18:05 PDT 2025

Total time taken to generate the page: 0.02695 seconds