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
|