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

Home » Public Forums » archive » Re: Cutting/Exclude ROI's based on overlapping
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: Cutting/Exclude ROI's based on overlapping [message #52302] Sun, 28 January 2007 16:52 Go to next message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Erik wrote:
> Hi Folks,
>
> I have some problems with a ROI based program. I want to cut/exclude
> some parts of the ROI's when the ROI is overlapped by another ROI in
> the same draw widget.
>
> As you will know the ROI Data is built like this [ <number of
> dimensions>, <corresponding coordinate> ]. I use the IDLgrROI object to
> draw and manage my ROI's.
>
> Is there any method to cut/exclude some parts of a ROI based on
> coordinates or other ROI's in a easy way? All info about excluding
> areas in ROI's will be appreciated!!
>
> Erik
>
Hello,

I'm not sure I get the whole picture here. Do you mean that you want to
clip parts of overlapping ROIs *only* when they are displayed? If they
are filled ROIs then you could use some Z position trickery to hide one
behind the other. Are these ROIs comprised of boundary points?

Ben
Re: Cutting/Exclude ROI's based on overlapping [message #52309 is a reply to message #52302] Sat, 27 January 2007 15:51 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Erik writes:

> I have some problems with a ROI based program. I want to cut/exclude
> some parts of the ROI's when the ROI is overlapped by another ROI in
> the same draw widget.
>
> As you will know the ROI Data is built like this [ <number of
> dimensions>, <corresponding coordinate> ]. I use the IDLgrROI object to
> draw and manage my ROI's.
>
> Is there any method to cut/exclude some parts of a ROI based on
> coordinates or other ROI's in a easy way? All info about excluding
> areas in ROI's will be appreciated!!

This is not a totally trivial problem, but it is well-known.
I don't know of any publicly available IDL solutions. But
a quick Google search of "intersecting polygons" will give
you lots of ideas. Note that you can find the convex hull
of a polygon with the TRIANGULATE procedure:

http://www.dfanning.com/tips/convex_hull.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Cutting/Exclude ROI's based on overlapping [message #52382 is a reply to message #52302] Tue, 30 January 2007 00:07 Go to previous messageGo to next message
Erik[1] is currently offline  Erik[1]
Messages: 23
Registered: December 2006
Junior Member
@Ben: I don't work with Z positions. I simply don't want the ROI's to
overlap so I want to cut a piece of one ROI like it's a puzzle piece
against the other.

@David: Thanks for the info. When I've got some time left I'll look at
it!!


Thanks!


On 29 jan, 01:52, Ben Tupper <btup...@bigelow.org> wrote:
> Erik wrote:
>> Hi Folks,
>
>> I have some problems with a ROI based program. I want to cut/exclude
>> some parts of the ROI's when the ROI is overlapped by another ROI in
>> the same draw widget.
>
>> As you will know the ROI Data is built like this [ <number of
>> dimensions>, <corresponding coordinate> ]. I use the IDLgrROI object to
>> draw and manage my ROI's.
>
>> Is there any method to cut/exclude some parts of a ROI based on
>> coordinates or other ROI's in a easy way? All info about excluding
>> areas in ROI's will be appreciated!!
>
>> ErikHello,
>
> I'm not sure I get the whole picture here. Do you mean that you want to
> clip parts of overlapping ROIs *only* when they are displayed? If they
> are filled ROIs then you could use some Z position trickery to hide one
> behind the other. Are these ROIs comprised of boundary points?
>
> Ben- Tekst uit oorspronkelijk bericht niet weergeven -- Tekst uit oorspronkelijk bericht weergeven -
Re: Cutting/Exclude ROI's based on overlapping [message #52427 is a reply to message #52382] Thu, 01 February 2007 05:10 Go to previous message
Erik[1] is currently offline  Erik[1]
Messages: 23
Registered: December 2006
Junior Member
Hi folks,

Still trying to figure out the best solution for this problem. Now
I've got an idea. I've made a mask for each ROI and try to decuct them
like this:

mask1 -= mask2

Now mask1 has the preferred mask I want to calculate with. The only
thing is I want to edit the data of mask1 so that it's exactly
displayed like it's mask. There is a way to make a mask out of a ROI,
Is it also possible to do the opposite?? (Make a ROI out of a mask?)

That would be perfect, otherwise I have to construct a ROI by looping
the mask...

Hopefully y'all can tell me there's actually a function that does this
already ;-P

Erik
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: colorbar - annotation isn't equally spaced...
Next Topic: Re: operation with array of NaNs

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

Current Time: Wed Oct 08 13:48:24 PDT 2025

Total time taken to generate the page: 0.00670 seconds