| I try use "Convert Interleave" tool to convert an ENVI file from BSQ to BIL format, it works fine. But when I try to convert it with ENVI API, it doesn't work, the output is still BSQ, can you help me check? below is my code, thanks. Also you have any tutorial for FLAASH API? 
 PRO BSQ_BIL
 ; COMPILE_OPT IDL2
 
 ; Start the application
 e = ENVI(/HEADLESS)
 
 ; Select input files
 dirs = ['/media/satellite_imagery/WV3/calibration']
 filter = '*_cal'
 files = file_search(dirs, filter)
 FOREACH file, files DO BEGIN
 PRINT, file
 Raster = e.OpenRaster(file)
 in = '/media/satellite_imagery/WV3/calibration/'
 out = '/media/satellite_imagery/WV3/BIL/'
 outpath = file.Replace(in,out)
 Raster.Export, outpath, 'ENVI', INTERLEAVE=bil
 ENDFOREACH
 e.Close
 END
 |