X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 17 Aug 2015 11:35 AM by  anon
Is there a way to batch edit header files?
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
17 Aug 2015 11:35 AM
    I have 80 Landsat scenes with each band stacked, and for each scene I want to input what the wavelengths are for each band so that ENVI can recognize it. This is straight forward to do in the GUI, but is there a way to do using IDL? I have come across ENVI_SETUP_HEAD, but I just want to edit a header file that is already present.

    Zachary Norman



    Basic Member


    Posts:173
    Basic Member


    --
    17 Aug 2015 11:52 AM
    Hi Stefano, I bet that you would be able to use the WriteMetadata Method for an ENVI Raster. Here is a link to the documentation: http://www.exelisvis.com/docs/enviras... You can use ENVIRasterMetadata::UpdateItem to update a metadata item in the header or ENVIRasterMetadata::AddItem to add a new item to the metadata. The first link shows a good example of how this is used and you could probably extend this to a batch process by opening the files, updating the metadata, and then saving the header information.

    Deleted User



    New Member


    Posts:
    New Member


    --
    17 Aug 2015 01:40 PM
    That looks like what I need, thanks for you suggestions!
    You are not authorized to post a reply.