X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 29 Oct 2015 11:40 AM by  anon
Creating a new raster with ROI Tool
 7 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
29 Oct 2015 11:40 AM
    <p>I am using ENVI 5.3 in Windows 10. I need to create a new smaller raster image from an existing raster that is a tif file. I was under the impression I could do this by using the ROI Tool. I have tried this by creating an ROI from geometry, as instructed on this webpage&nbsp;http://www.exelisvis.com/...ol.html#ROIGeometry. I draw the rectangle over the raster and make its color solid, then rename it. I have tried saving it, and the only format available is xml. When I export as a shapefile, it does not show up in the folder I specified, and ENVI can't find it either. When I export it as an roi file, it does not appear when I load it in ENVI. How can I make a new smaller raster? Do I need to use another tool? Thank You!</p>

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    29 Oct 2015 12:34 PM
    You will want to use the Subset Data from ROIs&nbsp;tool from the Toolbox.&nbsp; Here you can select the ROI that you created and mask out areas that are outside of your ROI.

    Deleted User



    New Member


    Posts:
    New Member


    --
    29 Oct 2015 02:14 PM
    <p>I did that and it worked! But I need to use the subset raster in another program, so I need to know where it is saved to. Here is the locaton of the input file:&nbsp;C:\Users\dwolfinger\Documents\MATLAB\Segment_53\</p> <p>But the Resize Data dialog box does not show the path of the output file. And I don't see the output file anywhere in windows explorer and I can't find it with ENVI. I have looked in Documents\MATLAB, Documents\ENVI, C:\Program Files\Exelis and elsewhere. Where does ENVI put the output file?&nbsp;</p>

    Deleted User



    New Member


    Posts:
    New Member


    --
    30 Oct 2015 12:09 PM
    <p>I have figured out how to find the subset file; I just need to click 'Choose' then name the file. But matlab does not recognize its file type, and I need the file type to be something matlab could work with. Can I convert the new subset file to tif? Thank You</p>

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    30 Oct 2015 02:54 PM
    Yes, you can use the &nbsp;File-&gt;Save File As tool and select TIFF as the output file type.&nbsp; The default output from Subset Data is an 'ENVI' format file which is just a&nbsp;binary file with an associated text '.hdr' that describes the file format.&nbsp; I am guessing you could also read in this file&nbsp;into Matlab using the information in the .hdr file.

    Deleted User



    New Member


    Posts:
    New Member


    --
    30 Oct 2015 03:42 PM
    <p>Sorry, I don't see which Save As tool you are speaking of. File &gt; Save As in the ROI Tool saves the ROI as an xml. The only tools that save the subset save it as '.' any file type. Where can I access the Save As tool you are talking about? Also, matlab does not recognize the associated hdr file.&nbsp;</p>

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    02 Nov 2015 06:31 AM
    <p>I would not expect Matlab&nbsp; to recognize the ENVI .hdr file but it could be used to read in the data file.</p> <p>The File-&gt;Save as can be found in the main menu along the time of the application.</p>

    Deleted User



    New Member


    Posts:
    New Member


    --
    02 Nov 2015 11:51 AM
    <p><br /> </p> <p>Right, I merely&nbsp;needed to save the subset as an ENVI file, then save that&nbsp;as a tiff. Thanks!</p>
    You are not authorized to post a reply.