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

Home » Public Forums » archive » XROI & Regions_out question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
XROI & Regions_out question [message #37539] Sun, 04 January 2004 15:19
Karthik is currently offline  Karthik
Messages: 10
Registered: December 2003
Junior Member
Hello All,
Another question! I want the user to draw a roi on an image
*(*pstate).image and the roi is returned to array *(*pstate).pri_region
and this is what I did:


In my main code I have these two lines:
;;Get the primary activation region
*(*pstate).pri_region = roi_draw(bytscl(*(*pstate).image))

And the function roi_draw is as given below:
FUNCTION roi_draw, inarray
;;inarray= Array to display in xroi programme

xroi, inarray, Regions_out = rois, /block
lastroi = rois[N_Elements(rois)-1]
lastroi -> GetProperty, Data = polygon
rois[N_Elements(rois)-1] -> GetProperty, Data = polygon
indices = polyfillv(polygon[0, *], polygon[1, *], 128, 128)

return, indices
END

When I run the main programme I get the following error:

% XMANAGER: Caught unexpected error from client application. Message
follows...
% Expression must be a structure in this context: EVENT.
% Execution halted at: ROI_DRAW 5
/home/karthik/test_simset/PRO/test.pro
% START_SIMSET 167
/home/karthik/test_simset/PRO/simset_front_end.pro
% XMANAGER_EVLOOP_STANDARD 478
/usr/local/rsi/idl_5.5/lib/xmanager.pro
% XMANAGER 708
/usr/local/rsi/idl_5.5/lib/xmanager.pro
% SIMSET_FRONT_END 556
/home/karthik/test_simset/PRO/simset_front_end.pro

Any ideas why I get this error and how I solve it?
Thanks.

Karthik.
[Message index]
 
Read Message
Previous Topic: Widgets: group leader and procedures
Next Topic: Re: Why does IDL get this wrong?

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

Current Time: Fri Oct 10 22:35:51 PDT 2025

Total time taken to generate the page: 1.20035 seconds