X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 13 Jan 2014 01:54 PM by  anon
re-sorting hyperspectral bands, layer stack
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:23
New Member


--
13 Jan 2014 01:54 PM
    Hello, What is the easiest way of re-sorting (other than manual) the bands in ENVI? I layer-stacked 242 bands, but band 1 is the last one and band 242 the first one after stacking. Manually re-sorting with the layer stack tool is way too much work. I tried to edit the header file, but that just changes the layer names but not the actual bands. Mike

    Deleted User



    Basic Member


    Posts:228
    Basic Member


    --
    14 Jan 2014 10:03 AM
    Unfortunately, at the moment the only way to resort them is to manually reorder them in the Layer Stacking tool. There is a current request to add a button to automatically reverse the order of bands imported into the Layer Stacking Tool or the New File Builder. I'm sorry that I don't have better news for you. Peg Shippert Exelis VIS

    Deleted User



    New Member


    Posts:23
    New Member


    --
    14 Jan 2014 12:45 PM
    Hi Peg, Thanks for your reply. Actually, I stumbled across the new ENVI 5.1 'New File Builder' tool and gave that a try and surprisingly it sorted my bands in the opposite order than the Layer Stacking tool, so that worked for me after all. But a sort functionality within either those tools would sure help with either of those tools, espcially when working with hyperspectral data. Maybe a 'data sort' tool where one could input a txt file with the band names in the desired order would be most flexible and possibly the best solution. Maybe something to put into the Code Library, which will hopefully be up again soon. ;) Mike

    Deleted User



    New Member


    Posts:
    New Member


    --
    15 Jan 2014 02:13 PM
    Mike, In the meantime, you can add some custom functionality using IDL. Aditya Singh has created a very useful series of hyperspectral data tools, one of which addresses your issue (i.e., flipbands.pro). You can call the procedure in ENVI+IDL, or customize further for your own purposes. The code as-is flips, stacks, and unstacks. Check the code out here: http://ecocodespace.wordp...ng-unstacking-bands/ Sean

    Deleted User



    New Member


    Posts:23
    New Member


    --
    16 Jan 2014 07:19 AM
    Hi Sean, Thanks for the links. Those scripts are great. Mike
    You are not authorized to post a reply.