X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Jun 2010 01:32 PM by  anon
how to create a txt file for class statistics for each ROI
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
01 Jun 2010 01:32 PM
    Hello, I have created about 300 ROI. I would like to calculate the class statistics for each one of these ROI. When I do it through the Class statistic Tool I get one file with just one class distribution for ALL ROI put togeather. Is there a way to separate each class statistic for each of the 300 ROI? Thank you Colibri p.d I am using ENVI 4.5

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Jun 2010 04:14 PM
    Hi Colibri, I believe there is some code available that can do what you want. I'm not sure if it outputs to a text file but you could consider just cutting and pasting from your output screen. What you want to look for on the ITT code contribution site is called: stats_on_roi_widget.pro If you have some programming experience you could modify the code to output to a text file since it is a *.pro file instead of a *.sav file which you cannot. Ciao

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Jun 2010 08:00 PM
    Hello area_51 Thank you. I found the code in the library but when I download it nothing appears in IDL. I have never used IDL. Is there some specific way to download it? Yes it doesn't have to be txt I can just copy the screen. Thank you again Colibri

    Deleted User



    New Member


    Posts:
    New Member


    --
    02 Jun 2010 08:15 AM
    Hi Colibri, In order to run the *.pro file that you downloaded you need to use ENVI + IDL. I'm not sure if you already do that, but if you are on Windows try Programs > ENVI 4.5 > ENVI+IDL. You may have yours set up somewhat differently. When you have ENVI+IDL open you should see the IDL Workbench with the command line tab that shows this: ENVI > Use the File > Open to access the *.pro file. You will then need to Compile and then Run the file. The Compile and Run icons are found in the menu bar. If need help finding your way around the Workbench environment or want to know more about running programs you should look in either the ENVI or IDL Help. The information there is quite good and extensive. Here are some hints: IDL Help: IDL Programmers' Guides > Application Programming > Part I: Application Programming > Creating and Running Programs in IDL You may also want to touch base with any colleagues who have IDL/ENVI programming experience to help you out. Ciao

    Deleted User



    New Member


    Posts:
    New Member


    --
    02 Jun 2010 08:30 AM
    You're confusing me when you say that you calculate class statistics for ROIs through the Class Statistics tool. I think the class stats tool (Classification > Post Classification > Class Statistics) would calculate stats from a classification output image for different classes. So, I figure you're trying to calculate your ROI stats, instead. I think you can do this from inside the ROI Tool in ENVI. If you create multiple ROIs, and then select them all (maybe this is the step you're missing?) and then click the Stats button in the ROI Tool, you'll get a window that shows stats for all of the selected ROIs. The other thing I could think of was that maybe you've drawn a bunch of polygons (or polylines or points) using the ROI Tool, but they're not really all considered separate ROIs by ENVI. Did you click the New ROI button between drawing each ROI? Are all of your ROIs different colors? If they are all the same color, then they're probably all considered to be part of the same ROI in ENVI (unless you specifically set each new ROI back to the same color as the original).
    You are not authorized to post a reply.