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

Home » Public Forums » archive » confused about usage of IDLanROI in Itools
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
confused about usage of IDLanROI in Itools [message #88563] Mon, 12 May 2014 13:49 Go to previous message
TonyLanz is currently offline  TonyLanz
Messages: 4
Registered: January 2012
Junior Member
OK folks, I admit I'm a little confused about my implementation of IDLanROi within an Iimage window. Something silly on my part I'm sure.

What I have done is display an image in Iimage, draw a freehand ROI and then I'm grabbing the vertices of this roi to compute a mask and grab coordinates. This seems to work fine, something like this:

oSys = _IDLitSys_GetSystem()
oVertices = oSys -> GetByIdentifier('/DATA MANAGER/VERTICES')
fSuccess = oVertices -> GetData(Vertices)
roi = obj_new('IDLanROI', Vertices)
mask = roi-> computemask(dimensions=size(picture,/dimensions),mask_rule=2 )
index_points = where(mask gt 0)
coords=array_indices(picture,index_points)

That works, but if I now want to go to the open Iimage window, delete that roi by selecting it and hitting delete, then draw a new freehand roi and repeat the process on a new area, I have the coordinates of the first Vertex drawn , not the new one. I think I understand this...Iimage gives the 1st OI drawn a variable name of "Vertices" and each subsequent roi drawn (in the session) becomes Vertices_1, Vertices_2, etc.

I hope I'm not being confusing. So I'm looking for suggestions to work around this issue programmatically. Ideas?

Tony
[Message index]
 
Read Message
Read Message
Previous Topic: "Unable to allocate memory" when using H5_parse iteratively
Next Topic: Using VERT_COLORS=RGBA in PLOT()?

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

Current Time: Wed Oct 08 14:09:55 PDT 2025

Total time taken to generate the page: 0.00211 seconds