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

Home » Public Forums » archive » retrieving regions from a IDLanROIGroup
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
retrieving regions from a IDLanROIGroup [message #41884] Mon, 06 December 2004 05:58
m.s.m. is currently offline  m.s.m.
Messages: 5
Registered: December 2004
Junior Member
Hi!
I select automatically ROIs(from a binary image)
and store them in a region group in the following way:

;thresHimage...bynary image
CONTOUR,thresHimage,level=1,xmargin=[0,0],$
ymargin=[0,0],/noerase,path_info=pathInfo,$
path_xy=pathXY,xstyle=5,ystyle=5, /path_data_coords
;create the oRoiGroup
oRoiGroup=OBJ_NEW('IDLanROIGroup')
;input the data of each of the contour paths
;into IDLanROI objects
FOR I=0,N_ELEMENTS(pathInfo)-1 DO BEGIN
;initialize oRoi with the contour information of
;the current region
line=[LINDGEN(pathInfo[I].N),0]
oRoi=OBJ_NEW('IDLanROI',$
(pathXY[*,pathInfo[I].OFFSET+line])[0,*],$
(pathXY[*,pathInfo[I].OFFSET+line])[1,*], /interior )
;add to oRoiGroup
oRoiGroup->Add,ORoi
;destroy the oRoi object
OBJ_DESTROY,oRoi
ENDFOR

This works quite good and typing "help,oRoiGroup", IDL prints:
OROIGROUP OBJREF = <ObjHeapVar1736(IDLANROIGROUP)>

Next, I want to grow each of these regions (with region_grow),
so I need to retrieve them from oRoiGroup. I do it in this
way:
SomeRoi=oRoiGroup->Get(position=0)

typing "help,someRoi", IDL prints:
SOMEROI OBJREF = <ObjHeapVar1737>

If now I try to use any IDLanROI method it does not work!!,for instance:
someRoi->getProperty,all=variable
IDL prints:
% Invalid object reference: SOMEROI.

I would be very grateful if someone could tell me what I am doing false.
Thanks a lot!,

Miriam
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: reading images with small # pixels but large # bands in ENVI
Next Topic: Re: Continuing a poscript plot after closing

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

Current Time: Wed Oct 08 15:21:14 PDT 2025

Total time taken to generate the page: 0.00457 seconds