X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Oct 2010 06:08 AM by  anon
a
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
01 Oct 2010 06:08 AM
    a

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Oct 2010 11:26 AM
    You didn't mention exactly how your code uses ENVI_GET_ROI_DATA, or exactly what happens when you run that code. That information would be helpful in tracking down the problem. In general, ENVI_GET_ROI_DATA is used to retrieve the pixel values for all of the pixels inside a specified ROI. That may or may not be what you want. If you really want statistics for the ROI, like the mean, standard deviation, etc., then you could use ENVI_GET_ROI_DATA to retrieve the data, and then use IDL routines like MEAN, STDEV, etc. to calculate statistics from them. Maybe the problem is that you aren't setting up ENIV_GET_ROI_DATA correctly? You will need to call ENVI_GET_ROI_IDS first, to retrieve the ROI IDs that you need to pass in to ENVI_GET_ROI_DATA. - Peg

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Oct 2010 11:28 AM
    Oops, I meant STDDEV, instead of STDEV.

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Oct 2010 03:15 PM
    a

    Deleted User



    New Member


    Posts:
    New Member


    --
    04 Oct 2010 08:30 AM
    This seems like a pretty complicated request, which could probably be better answered if you would send it to ITT VIS Tech Support at support@ittvis.com or (303) 413-3920. Here are a few tips, though: Getting your ROI IDs is the first step, which might look something like this: roi_ids = envi_get_roi_ids(fid=fid, roi_names=roi_names) This will return the ROI IDs (and the names of the ROIS) associated with the file referenced by FID. Next, you will want to pick one of the ROI IDs, probably based on its name, and get the data from that ROI. So, say you've written some code that finds which ROI ID is the one you want (maybe by looping through the names, and looking for the one you want). You could then get it's data like this: Now you have the pixel values from the ROI called "my_roi" in an array called "data". IDL has routines to write data to ASCII files. For example, PRINTF writes ASCII. - Peg
    You are not authorized to post a reply.