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

Home » Public Forums » archive » Re: Creating an ordered 'blob' ROI from a messy 'criss-crossed' ROI....
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: Creating an ordered 'blob' ROI from a messy 'criss-crossed' ROI.... [message #75929] Thu, 05 May 2011 20:49 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
James Preiss writes:

> There is no general way to solve this problem unless you put some
> constraints on allowable region shapes. For example, see the image I
> just made at http://imgur.com/NqIxG . If you only allowed convex
> ROIs, then you could take the convex hull of the points, but I doubt
> you want that restriction. I can't think of any elegant solutions -
> you'd be better of demanding that your users click in order.

I agree with this, but there are times when you have too
many points bunched up, and too few points somewhere else.
I use the Coyote Library program ArcSample to "even" the
points out, so there is approximately an equally spaced
density of points around the exterior of the ROI.
Naturally, your mileage may vary with this solution, too.
But, I have used it successfully on more than several
occasions. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Creating an ordered 'blob' ROI from a messy 'criss-crossed' ROI.... [message #75930 is a reply to message #75929] Thu, 05 May 2011 20:35 Go to previous messageGo to next message
James Preiss is currently offline  James Preiss
Messages: 2
Registered: November 2010
Junior Member
On May 5, 11:45 am, George Millward <george.millw...@noaa.gov> wrote:
> Hi there,
>
> I'm working on a project which involves creating several ROIs on a
> number of images.  The functionality is based
> on xROI.pro (but diverged from there a long time ago).
>
> Anyhow, what I want to achieve is for the program operator to be able
> to define an ROI by shift-clicking to create
> a number of points in [x,y].  Fine, I have this - but for the ROI code
> to work, the operator must click in an 'ordered manner' around the
> edge (ie, progressing either clockwise or anticlockwise around the
> ROI).  For the program to be truly 'bomb proof' I need to build it
> such that if an operator clicks around the ROI in a 'non-ordered'
> fashion - then the resulting 'criss-crossed' ROI can be re-interpreted
> as a single ordered solid ROI.
>
> Does this make sense ?  Considering that ROIs in general are such a
> big deal in IDL this issue/dilemma must have been addressed
> before........
>
> I guess simply my question can be rephrased as "How do I convert a
> messy 'criss-crossed' ROI into a consistent 'blob' ROI".
>
> Any help, as ever, much appreciated.
>
> Cheers
>
> George.

There is no general way to solve this problem unless you put some
constraints on allowable region shapes. For example, see the image I
just made at http://imgur.com/NqIxG . If you only allowed convex
ROIs, then you could take the convex hull of the points, but I doubt
you want that restriction. I can't think of any elegant solutions -
you'd be better of demanding that your users click in order.
Re: Creating an ordered 'blob' ROI from a messy 'criss-crossed' ROI.... [message #76045 is a reply to message #75929] Thu, 12 May 2011 12:21 Go to previous message
George Millward is currently offline  George Millward
Messages: 29
Registered: February 2000
Junior Member
On May 5, 9:49 pm, David Fanning <n...@idlcoyote.com> wrote:
> James Preiss writes:
>> There is no general way to solve this problem unless you put some
>> constraints on allowable region shapes.  For example, see the image I
>> just made athttp://imgur.com/NqIxG.  If you only allowed convex
>> ROIs, then you could take the convex hull of the points, but I doubt
>> you want that restriction.  I can't think of any elegant solutions -
>> you'd be better of demanding that your users click in order.
>
> I agree with this, but there are times when you have too
> many points bunched up, and too few points somewhere else.
> I use the Coyote Library program ArcSample to "even" the
> points out, so there is approximately an equally spaced
> density of points around the exterior of the ROI.
> Naturally, your mileage may vary with this solution, too.
> But, I have used it successfully on more than several
> occasions. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Hmm,

I see the problem - it's obvious that there cannot be any 'general'
solution I guess.
I'll take a look at ArcSample though - that looks useful.

Thanks guys,

George.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Coyote Down Under
Next Topic: object programming question

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

Current Time: Fri Oct 10 01:03:34 PDT 2025

Total time taken to generate the page: 0.08001 seconds