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

Home » Public Forums » archive » ROI Data Retrival
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
ROI Data Retrival [message #94515] Sat, 17 June 2017 01:23 Go to previous message
moxament is currently offline  moxament
Messages: 26
Registered: April 2008
Junior Member
Dear all,

I am trying to write a code in which an ENVI format image with multi-bands is opened and the associated ROI file is restored. I want to get the data of each class from the image. I have three classes and for each class I want to create an array with number of columns equal to the number of bands and number of lines equal to the number of selected pixels of the ROI (class). My code looks like:

;Open and read the all-band file
ENVI_OPEN_FILE, Inputbands, R_FID = FID, NO_REALIZE = 1

;Read the header of the data image file
ENVI_FILE_QUERY, fid, ns = ns, nl = nl, nb = nb

; Restore the pre saved regions of interest.
envi_restore_rois, InputROI
roi_ids = envi_get_roi_ids(fid=fid, roi_colors=roi_colors, roi_names=class_names)

Result = ENVI_GET_ROI_DATA(roi_ids, FID=FID)

However, when I run the code I get the following error:

% Expression must be a scalar or 1 element array in this context: <BYTE Array[3]>.
% Execution halted at: ENVI_ROI_ID_VALID 247
% ENVI_GET_ROI_DATA 908
% $MAIN$

Can you please help? Your efforts are appreciated!!
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: joining images into a colored one
Next Topic: Re: Principle Componets Analysis

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

Current Time: Wed Oct 08 15:48:17 PDT 2025

Total time taken to generate the page: 0.00423 seconds