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

Home » Public Forums » archive » 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
Best inverse of IDLanROI::ComputeMask [message #60688] Tue, 10 June 2008 21:18
Robbie is currently offline  Robbie
Messages: 165
Registered: February 2006
Senior Member
Hi,

I've been trying to find the best way to determine verticies from a
mask. The reason why I want to do this is because my regions are
persisted in the database as a mask, yet my users want to edit their
regions as a polygon.

I've empirically determined that the following following code is
nearly consistent:

; Compute the mask from the verticies
mask = oROI -> ComputeMask(DIMENSIONS=s[1:2])
; Compute the verticies from the mask
contour, mask, PATH_XY=xy, LEVELS=255, NLEVELS=1, /PATH_DATA_COORDS
; Re-display the new verticies
oROI -> SetProperty, DATA=xy

I re-display the verticies because I want the user to visualise any
difficulties the contour procedure may encounter. It seems to work
better than I would expect but it is certainly not infallible.

Is contour the right thing to use here or is there something better?
Any recommendations?

Snapshot and example available from
http://barnett.id.au/idl/ComputeMaskInverse.html

Thanks,

Robbie
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Redudant Wavelet transform?
Next Topic: efficient comparing 1D and 3D arrays

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

Current Time: Wed Oct 08 17:11:26 PDT 2025

Total time taken to generate the page: 0.00484 seconds