COMPILE_OPTIDL2 ;首先读取txt文件 file=dialog_pickfile() files1=file_search('*',count=k) openr,lun,file,/get_lun ifluneq-1thenreturn tmp = '' data=fltarr(860,1119) fori=0,1118dobegin tdata=fltarr(860) readf,lun,tdata data[*,i]=tdata endfor end...
oPalette =IDLGRPALETTE(lookup[0,*],lookup[1,*],lookup[2,*]) oImage.SetProperty, PALETTE=oPalette ;显示图像 oViewImage.Add, oModel oModel.Add, oImage oWin.Erase ;初始化颜色条 oColorbar =IDLgrColorbar(lookup[0,*],lookup[1,*],lookup[2,*], $ MAJOR=6, SHOW_AXIS=2, TICKLEN=0,...
PROmaskimg_byevf COMPILE_OPTidl2 ENVI,/RESTORE_BASE_SAVE_FILES ;initialize ENVI in batch mode: ENVI_BATCH_INIT fileextension='img' ;选择数据文件夹 folder=ENVI_PICKFILE(TITLE='Select image Data Folder',/DIRECTORY) ;选择evf evfname=DIALOG_PICKFILE(title='Select Evf ') IF(folderEQ'')THENRETURN...
FUNCTION RpcOrthFile, iFile, oFile, res, dem_file, del_if_existing COMPILE_OPT IDL2 ; Load ENVI and initialize it PRINT, 'input is:', iFile PRINT, 'output is:', oFile oFile_existing = FILE_TEST(oFile) IF NOT oFile_existing OR del_if_existing THEN BEGIN;如果输出文件不存在,或者 ...
compile_opt idl2 e = envi(/CURRENT) starttime = systime(1) PAN_RASTER = e.openRaster('D:\\project\\envi-auto\\wntest\\GF1_PMS1_E117.8_N24.1_20230930_L1A13109541001_20231109112351765\\GF1_PMS1_E117.8_N24.1_20230930_L1A13109541001-PAN1.tiff') ...
标准的输入输出时可以进行格式的自由控制,格式化控制的格式为:[n]FC[+][-][width],各个字段代表的含义见表1-2 ScreenShot00101.png ScreenShot00102.png 如下面的 例子 PRO Test_format COMPILE_OPT idl2 ; PRINT, FORMAT = '(A6)', '123456789' ...
2. 主线程函数如下,通过新建分线程调用相加函数,如果线程运行结束,则输出结果 pro thread_test compile_opt idl2 file_dirname(routine_filepath()) '\add.pro' 2,3,4] 20,30,40] objarr(3) n_elements(thread_arr) for i = 0, thread_count - 1 do begin ...
compile_opt idl2 ;设置阈值的默认值 IF (N_ELEMENTS(threshold) EQ 0) THEN threshold=2 a=inputdata b1=a[sort(a)] ;排序, b2=uniq(b1) ;找唯一值下标 b3=b1[b2] ;找唯一值 n=n_elements(b3) ;我唯一值的个数 countx=intarr(n) ;初始化 用于记录每个唯一值的个数 ...
添加compile_opt idl2,强制让IDL认为()格式就是函数。PRO TEST_ENVI_SYNTAX_ERROR compile_opt idl2 ENVI_OPEN_FILE, dialog_pickfile(), r_fid=fid ENVI_FILE_QUERY, fid, dims=dims data = ENVI_GET_DATA(fid=fid, dims=dims, pos=0) data = ENVI_GET_SLICE(fid=fid, line=20, pos=[1,3],...
COMPILE_OPT IDL2 ;Get the number of input files. file_nums = N_ELEMENTS(in_filenamelist) IF (file_nums GT 0) AND ~STRCMP(in_filenamelist[0], '') THENBEGINFORi =0, file_nums -1DOBEGINimg = READ_IMAGE(in_filenamelist[i], red, green, blue) ...