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

Home » Public Forums » archive » Mask to 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
Mask to ROI [message #52405] Fri, 02 February 2007 06:28 Go to next message
Erik[1] is currently offline  Erik[1]
Messages: 23
Registered: December 2006
Junior Member
Hi Folks,

A time ago I asked if I could cut a piece out of a ROI. Now I've
created a mask of the ROI and edited the mask the way I wanted it to.
This worked good for my analysis results, but I want the user to see
the cutted ROI so I have to edit the DATA array from the ROI to modify
the displayed ROI. This leads to the following question;

Is there a way to convert a mask into a ROI Data Array??

For example:

Mask[5,5]
00000
00100
01110
00100
00000

Needs to become:
ROIData [ [2,1,0],[3,2,0],[3,3,0],[1,2,0] ]

Please note that the ROI can be drawed when the first coordinate is
connected with the second and so forth. The centered value in the mask
should not be saved in the result; I only want the boundary points to
draw my ROI.

I've tried to figure out a algorithm to trace the border when I got
the first point, but this takes much time and I wonder if there ain't
any simpler way to do it...

Help would be really appreciated!!
Re: Mask to ROI [message #52502 is a reply to message #52405] Tue, 06 February 2007 12:12 Go to previous message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
Don't forget the hint of Ben Tupper concerning Davids boundary procedure.
I am sure you will find out the problems inherent to the different
approaches.

I still hope somebody will find the time to implement real polygon (ROI)
intersections and unions etc.!

Going via a mask is in fact only a very rough way, resolution dependent
etc.!
Regards
Karsten

Am Tue, 06 Feb 2007 20:31:18 +0100 schrieb Erik <janssen.e@gmail.com>:

> On 6 feb, 18:39, "Erik" <jansse...@gmail.com> wrote:
>> On 5 feb, 23:12, "Karsten Rodenacker" <karsten.rodenac...@gsf.de>
>> wrote:
>>
>>
>>
>>> Possibly you should try to use contour procedure with keyword PATH_XY,
>>> PATH_INFO, PATH_DATA_COORDS.
>>> Regards
>>> Karsten
>>
>>> Am Fri, 02 Feb 2007 15:28:57 +0100 schrieb Erik <jansse...@gmail.com>:
>>
>>>> Hi Folks,
>>
>>>> A time ago I asked if I could cut a piece out of a ROI. Now I've
>>>> created a mask of the ROI and edited the mask the way I wanted it
>> to.
>>>> This worked good for my analysis results, but I want the user to see
>>>> the cutted ROI so I have to edit the DATA array from the ROI to
>> modify
>>>> the displayed ROI. This leads to the following question;
>>
>>>> Is there a way to convert a mask into a ROI Data Array??
>>
>>>> For example:
>>
>>>> Mask[5,5]
>>>> 00000
>>>> 00100
>>>> 01110
>>>> 00100
>>>> 00000
>>
>>>> Needs to become:
>>>> ROIData [ [2,1,0],[3,2,0],[3,3,0],[1,2,0] ]
>>
>>>> Please note that the ROI can be drawed when the first coordinate is
>>>> connected with the second and so forth. The centered value in the
>> mask
>>>> should not be saved in the result; I only want the boundary points
>> to
>>>> draw my ROI.
>>
>>>> I've tried to figure out a algorithm to trace the border when I got
>>>> the first point, but this takes much time and I wonder if there
>> ain't
>>>> any simpler way to do it...
>>
>>>> Help would be really appreciated!!
>>
>>> --
>>> Erstellt mit Operas revolutionᅵrem
>> E-Mail-Modul:http://www.opera.com/m2/
>>
>> Thanks! I will check this out and post my findings!
>
> Wow I'm amazed! The countour function totally did the trick for me!
>
> So for all future searchers; THE way to convert a MASK into a new ROI:
>
> CONTOUR, mask, /PATH_DATA_COORDS, PATH_XY=data
> newROI = obj_new('IDLgrROI', DATA = data)
>
> Big thanks!!
>



--
Erstellt mit Operas revolutionᅵrem E-Mail-Modul: http://www.opera.com/m2/
Re: Mask to ROI [message #52506 is a reply to message #52405] Tue, 06 February 2007 11:31 Go to previous message
Erik[1] is currently offline  Erik[1]
Messages: 23
Registered: December 2006
Junior Member
On 6 feb, 18:39, "Erik" <jansse...@gmail.com> wrote:
> On 5 feb, 23:12, "Karsten Rodenacker" <karsten.rodenac...@gsf.de>
> wrote:
>
>
>
>> Possibly you should try to use contour procedure with keyword PATH_XY,
>> PATH_INFO, PATH_DATA_COORDS.
>> Regards
>> Karsten
>
>> Am Fri, 02 Feb 2007 15:28:57 +0100 schrieb Erik <jansse...@gmail.com>:
>
>>> Hi Folks,
>
>>> A time ago I asked if I could cut a piece out of a ROI. Now I've
>>> created a mask of the ROI and edited the mask the way I wanted it to.
>>> This worked good for my analysis results, but I want the user to see
>>> the cutted ROI so I have to edit the DATA array from the ROI to modify
>>> the displayed ROI. This leads to the following question;
>
>>> Is there a way to convert a mask into a ROI Data Array??
>
>>> For example:
>
>>> Mask[5,5]
>>> 00000
>>> 00100
>>> 01110
>>> 00100
>>> 00000
>
>>> Needs to become:
>>> ROIData [ [2,1,0],[3,2,0],[3,3,0],[1,2,0] ]
>
>>> Please note that the ROI can be drawed when the first coordinate is
>>> connected with the second and so forth. The centered value in the mask
>>> should not be saved in the result; I only want the boundary points to
>>> draw my ROI.
>
>>> I've tried to figure out a algorithm to trace the border when I got
>>> the first point, but this takes much time and I wonder if there ain't
>>> any simpler way to do it...
>
>>> Help would be really appreciated!!
>
>> --
>> Erstellt mit Operas revolutionärem E-Mail-Modul:http://www.opera.com/m2/
>
> Thanks! I will check this out and post my findings!

Wow I'm amazed! The countour function totally did the trick for me!

So for all future searchers; THE way to convert a MASK into a new ROI:

CONTOUR, mask, /PATH_DATA_COORDS, PATH_XY=data
newROI = obj_new('IDLgrROI', DATA = data)

Big thanks!!
Re: Mask to ROI [message #52509 is a reply to message #52405] Tue, 06 February 2007 09:39 Go to previous message
Erik[1] is currently offline  Erik[1]
Messages: 23
Registered: December 2006
Junior Member
On 5 feb, 23:12, "Karsten Rodenacker" <karsten.rodenac...@gsf.de>
wrote:
> Possibly you should try to use contour procedure with keyword PATH_XY,
> PATH_INFO, PATH_DATA_COORDS.
> Regards
> Karsten
>
> Am Fri, 02 Feb 2007 15:28:57 +0100 schrieb Erik <jansse...@gmail.com>:
>
>
>
>> Hi Folks,
>
>> A time ago I asked if I could cut a piece out of a ROI. Now I've
>> created a mask of the ROI and edited the mask the way I wanted it to.
>> This worked good for my analysis results, but I want the user to see
>> the cutted ROI so I have to edit the DATA array from the ROI to modify
>> the displayed ROI. This leads to the following question;
>
>> Is there a way to convert a mask into a ROI Data Array??
>
>> For example:
>
>> Mask[5,5]
>> 00000
>> 00100
>> 01110
>> 00100
>> 00000
>
>> Needs to become:
>> ROIData [ [2,1,0],[3,2,0],[3,3,0],[1,2,0] ]
>
>> Please note that the ROI can be drawed when the first coordinate is
>> connected with the second and so forth. The centered value in the mask
>> should not be saved in the result; I only want the boundary points to
>> draw my ROI.
>
>> I've tried to figure out a algorithm to trace the border when I got
>> the first point, but this takes much time and I wonder if there ain't
>> any simpler way to do it...
>
>> Help would be really appreciated!!
>
> --
> Erstellt mit Operas revolutionärem E-Mail-Modul:http://www.opera.com/m2/

Thanks! I will check this out and post my findings!
Re: Mask to ROI [message #52528 is a reply to message #52405] Mon, 05 February 2007 14:12 Go to previous message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
Possibly you should try to use contour procedure with keyword PATH_XY,
PATH_INFO, PATH_DATA_COORDS.
Regards
Karsten

Am Fri, 02 Feb 2007 15:28:57 +0100 schrieb Erik <janssen.e@gmail.com>:

> Hi Folks,
>
> A time ago I asked if I could cut a piece out of a ROI. Now I've
> created a mask of the ROI and edited the mask the way I wanted it to.
> This worked good for my analysis results, but I want the user to see
> the cutted ROI so I have to edit the DATA array from the ROI to modify
> the displayed ROI. This leads to the following question;
>
> Is there a way to convert a mask into a ROI Data Array??
>
> For example:
>
> Mask[5,5]
> 00000
> 00100
> 01110
> 00100
> 00000
>
> Needs to become:
> ROIData [ [2,1,0],[3,2,0],[3,3,0],[1,2,0] ]
>
> Please note that the ROI can be drawed when the first coordinate is
> connected with the second and so forth. The centered value in the mask
> should not be saved in the result; I only want the boundary points to
> draw my ROI.
>
> I've tried to figure out a algorithm to trace the border when I got
> the first point, but this takes much time and I wonder if there ain't
> any simpler way to do it...
>
> Help would be really appreciated!!
>



--
Erstellt mit Operas revolutionᅵrem E-Mail-Modul: http://www.opera.com/m2/
Re: Mask to ROI [message #52533 is a reply to message #52405] Mon, 05 February 2007 06:32 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Erik wrote:
> Hi Folks,
>
> A time ago I asked if I could cut a piece out of a ROI. Now I've
> created a mask of the ROI and edited the mask the way I wanted it to.
> This worked good for my analysis results, but I want the user to see
> the cutted ROI so I have to edit the DATA array from the ROI to modify
> the displayed ROI. This leads to the following question;
>
> Is there a way to convert a mask into a ROI Data Array??
>
> For example:
>
> Mask[5,5]
> 00000
> 00100
> 01110
> 00100
> 00000
>
> Needs to become:
> ROIData [ [2,1,0],[3,2,0],[3,3,0],[1,2,0] ]
>
> Please note that the ROI can be drawed when the first coordinate is
> connected with the second and so forth. The centered value in the mask
> should not be saved in the result; I only want the boundary points to
> draw my ROI.
>
> I've tried to figure out a algorithm to trace the border when I got
> the first point, but this takes much time and I wonder if there ain't
> any simpler way to do it...
>
> Help would be really appreciated!!
>


Hi,

Here's a newsgroup thread that might help.

http://tinyurl.com/ytdt35

Ben
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Strange IDL Help probelm 6.3
Next Topic: Re: 'vectorizing functions'

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

Current Time: Wed Oct 08 11:40:08 PDT 2025

Total time taken to generate the page: 0.00699 seconds