A problem with envi_save_rois [message #66337] |
Fri, 01 May 2009 04:33 |
josea.malpica
Messages: 12 Registered: March 2008
|
Junior Member |
|
|
Hi,
Please could some one tell me why the following program does not
work?
pro veamos, event
;
; Choose the bhtmref.img file
;
ENVI_SELECT, fid=fid
;
; Get the dimensions for this
; file and create an ROI
;
ENVI_FILE_QUERY, fid, dims=dims
roi_id = ENVI_CREATE_ROI(ns=ns, nl=nl, $
color=4, name='Square')
;
; Define the square and add
; the polygon object to the ROI
;
xpts = [100, 200, 200, 100, 100]
ypts = [100, 100, 200, 200, 100]
ENVI_DEFINE_ROI, roi_id, /polygon, $
xpts=xpts, ypts=ypts
ENVI_SAVE_ROIS, 'Square.roi', roi_id
end
When executed is says:
Variable is undefined ENVI_ROIS(ENVI_ROI_COMMON) The result may be
invalid
It looks like I follow the rules in the reference guide, actually
except for the envi_save_roi is a copy and paste of the
envi_create_roi (page 191)
Thanks in advance,
Jose
|
|
|