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
Re: ROI Data Retrival [message #94517 is a reply to message #94515] Mon, 19 June 2017 01:27 Go to previous messageGo to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
On 06/17/2017 10:23 AM, moxament@gmail.com wrote:
> 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!!
As an educated guess, I'd say roi_ids is an array, but must be a
scalar or 1 element array. So you probably have to loop. --Markus
[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 13:36:09 PDT 2025

Total time taken to generate the page: 0.00403 seconds