XROI & Regions_out question [message #37539] |
Sun, 04 January 2004 15:19 |
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.
|
|
|