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

Home » Public Forums » archive » freehand ROI and mask with IDLanROI. Solution.
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
freehand ROI and mask with IDLanROI. Solution. [message #35082] Wed, 14 May 2003 13:17
Sergey Koposov is currently offline  Sergey Koposov
Messages: 7
Registered: April 2003
Junior Member
Hello,All!
Recently, I have posted the message with the question, how to create the
freehand ROI and mask , using classes IDL??ROI, but without using
superfluous programs as xroi :).The problem was in fact that IDLgrROI
does not contain freehand lines. ANd IDLanROI contain freehand line, but
the mask maked by standart functions of class can be only the boundary
of freehand line.
David (in reply to my message) have proposed one (nondirect ) method.
But I have invent a small piece of code which allow to construct the
freehand ROI , and after that compute the mask using standart fuctions
of class.
;to test this code the image must
;be loaded
oROI = OBJ_NEW('IDLanROI', TYPE=2) ;I want to point that in spite of
CURSOR, x_cur, y_cur, /UP, /DEVICE ; option "TYPE=2" the ROI will
oROI->AppendData, x_cur, y_cur ; bounded by freehand line
PLOTS, x_cur, y_cur, PSYM=1, /DEVICE
while !mouse.button ne 4 do begin
cursor,x_cur,y_cur,2, /DEVICE
plots,x_cur,y_cur,/continue,/device
oROI->AppendData, x_cur, y_cur
end
; mask can be computed using:
mask=oROI->ComputeMask(dimensions=[dimx,dimy],mask_rule=2)

I think that my idea could be useful.
Please correct me if it was evident from the very outset and if I
wrongly understand something - I'm not the big professional in IDL
programming :)
Excuse me for the BIG message
Sergey
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Why is IDLgrSrcDest::Draw so slow when calling IDLgrPolygon::SetProperty?
Next Topic: Re: freehand ROI and mask with IDLanROI. Solution.

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

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

Total time taken to generate the page: 0.00466 seconds