简体   繁体   English

如何运行 IDL 程序以在所有频段上执行频段数学?

[英]How to run IDL procedure to perform Band Math on all band?

I tried to work with images using IDL Band Math.我尝试使用 IDL Band Math 处理图像。 The images have 90 bands and set variable pos=[0,1...90,] ,but only get one band(band1) into last.tiff图像有 90 个波段并设置变量pos=[0,1...90,] ,但只有一个波段(band1)进入last.tiff

PRO bandmath
  compile_opt IDL2
  e = envi() 
  
  Path = FILE_DIRNAME(ROUTINE_FILEPATH())+PATH_SEP()
  print, Path
  radiance_file = FILEPATH('QUAC.dat', $
    root_dir=Path)
  raster = e.OpenRaster(radiance_file)
  print, raster
  fid = ENVIRasterToFID(raster)
  exp = '(b1 le 0)*0+(b1 gt 0)*(b1*0.0001)'
  ENVI_File_Query, fid, DIMS=dims, NB=nb
  pos = lindgen(nb)
  print, pos
  out_name = "last.tiff"
  ENVI_DOIT, 'MATH_DOIT', DIMS = dims, FID = fid, $
                          POS = pos, EXP = exp, OUT_NAME = out_name, R_FID = r_fid
END

you can find api named ' CF_DOIT ' from envi claasic help您可以从 envi claasic 帮助中找到名为“ CF_DOIT ”的 api

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM