IDL Interactive Data Language Email xiemaojinsccas cn 2010
- Slides: 65
可视化的IDL 具 Interactive Data Language 中科院计算机网络信息中心 超级计算中心 谢茂金 Email: xiemaojin@sccas. cn 2010. 9
IDL支持的文件格式 • 文本格式:Readf, Read_ascii, Printf • 二进制格式:Readu, Read_binary, Writeu • 科学数据格式: – – – CDF: begin with the prefix "CDF_" HDF 4: begin with the prefix "HDF_" HDF 5: begin with the prefix "H 5_" or "H 5*_" HDF-EOS:begin with the prefix "EOS_" Net. CDF:begin with the prefix "NCDF_".
IDL支持的图像格式 格式 描述 BMP Windows Bitmap format DICOM Digital Imaging and Communications in Medicine Geo. TIFF file with tags containing geographic data GIF Graphics Interchange Format Interfile version 3. 3 format JPEG Joint Photographic Experts Group format JPEG 2000 format Motion JPEG 2000 format
IDL支持的图像格式(续表) Format Description MPEG Moving Picture Experts Group format Mr. SID Multi-resolution Seamless Image Database format NRIF NCAR Raster Interchange Format PICT Macintosh version 2 PICT files (bitmap only) PNG Portable Network Graphics format PPM/PGM format SRF Sun Raster File format TIFF 8 -bit or 24 -bit Tagged Image File format X 11 Bitmap format used for reading bitmaps for IDL widget button labels XWD X Windows Dump format
原图 SMOOTH(image, [1, 1, 21]) SMOOTH(image, [1, 21, 1]) SMOOTH(image, [1, 5, 5]) 图像处理例子 • • • • file = FILEPATH('rose. jpg', SUBDIRECTORY = ['examples', 'data']) image = READ_IMAGE(file) image. Size = SIZE(image, /DIMENSIONS) DEVICE, DECOMPOSED = 1 ; Decomposed={0|1}伪彩色/真彩彩色 RGBRGBRGB……. RGB WINDOW, 0, XSIZE = image. Size[1], YSIZE = image. Size[2], $ TITLE = ‘Original Rose Image’ RRRRR…. RRR TV, image, TRUE = 1 ; True={1|2|3} 对应 (3, m, n), (m, 3, n), (m, n, 3) GGGGG…. GGG BBBBB…. . . BBB WINDOW, 1, XSIZE = 3*image. Size[1], YSIZE = image. Size[2], $ ……………… TITLE = 'Vertically Smoothed (left), Horizontally ' + $ RRRRR…. RRR 'Smoothed (middle), and Both (right)‘ GGGGG…. GGG BBBBB…. BBB TVScl smoothed = SMOOTH(image, [1, 1, 21]) TV, smoothed, 0, TRUE = 1 smoothed = SMOOTH(image, [1, 21, 1]) 函数、过程、参数、关键字、返回值; 函数和过程统称为例程 routines TV, smoothed, 1, TRUE = 1 smoothed = SMOOTH(image, [1, 5, 5]) TV, smoothed, 2, TRUE = 1 ; Display the results.
数据类型代码表 • 代码 名称 数据类型 • • • • 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Undefined Byte Integer Longword integer Floating point Double_precision floating Complex floating string Structure Double_precision complex Pointer Object reference Unsigned integer Unsigned Longword integer Longword 64 -bit integer Unsigned 64 -bit integer Underfined Byte Int Long Float Double Complex String Struct DComplex Pointer Obj. Ref UInt ULong 64
系统变量 带锁,表示只读不写 !DTOR 0. 017453292 !PATH D: \Program File. . . 可用Add. Path命令增加搜索路径 !PI 3. 1415927 !PROMPT IDL>
查看变量 • print[, exp 1, exp 2, …, expn][, FORMAT=format] • a=3. 0 D & b=4 L • print, a, a+b, a/2, FORMAT=(‘I 4, I 4’) • help, exp 1, exp 2, …, expn[, NAMES=“通配符”] [, OUTPUT=var] [, /SYSTEM_VARIABLES][, /STRUCTURES] • help, a, output = my. Var ; 把变量a的信息存入my. Var中 • help, NAME = ‘a*’ ; 显示所有以a开头的变量信息 • help, !D, /STRUCTURES ; 显示系统变量!D的结构信息
数组 • 按列存储,允许使用 1~8维数组 • 数组创建 1)直接创建(能创建 1~3维)数组名=[表达式表] • my. Array = [21, 10, 6, 6, 4, 9] • my. Array = [[21, 10, 6], [6, 4, 9]] ; 2行3列 • my. Array = [ [[1, 2, 3], [4, 5, 6]] , [[7, 8, 9], [10, 11, 12]] ] ; 3列 2 行2层,下标顺序为 [列, 行, 层] my. Array[0, 0, 0]=1 my. Array[1, 0, 0]=2 my. Array[2, 0, 0]=3 my. Array[0, 1, 0]=4 my. Array[1, 1, 0]=5 my. Array[2, 1, 0]=6 my. Array[0, 0, 1]=7 my. Array[1, 0, 1]=8 my. Array[2, 0, 1]=9 my. Array[0, 1, 1]=10 my. Array[1, 1, 1]=11 my. Array[2, 1, 1]=12
常用控制语句 • • Begin – End If – Then – Else For – Do While – Do Repeat – Until Case X of – else – endcase Expr? Expr 1: expr 2 (条件判断语句)
• IDL> r=findgen(100)*0. 01 IDL> t=4. 0*!Pi*r IDL> Plot, r, t, /polar p. Sym=-2 p. Sym=5
Surface, Dist(16), $ /LEGO Surface, Dist(16), $ /HORIZONTAL Surface, Dist(16), $ SKIRT=4, Line. Style=4, thick=2
A=dist(300) & shade_surf, A, $ Shades = Byt. Scl(sin(A))
体绘制 • 通过创建或初始化体绘制类IDLgr. Volume对象。注意 这里输入的数据将被转化成Byte类型。 – Obj = OBJ_NEW('IDLgr. Volume' [, vol 0 [, vol 1 [, vol 2 [, vol 3]]]] [, PROPERTY=value] [, /NO_COPY]) – Result = Obj->[IDLgr. Volume: : ]Init([vol 0 [, vol 1 [, vol 2 [, vol 3]]]] [, PROPERTY=value] [, /NO_COPY]) • IDLgr. Volume有多达 36个属性,如Data 0~4, RGB_table 0~1, Opacity_table 0~1, shader, clip_planes, ambient, X~ZRange, X~ZCoord_conv, ZBuffer等。
体绘制 • x. Volume:该过程用于交互查看和操作体数据和等值面。 • XVOLUME, Vol, [, /BLOCK] [, GROUP=widget_id] [, /INTERPOLATE] [, /MODAL] [, RENDERER={0 | 1}] [, /REPLACE] [, SCALE=value] [, /TEST] [, XSIZE=pixels] [, YSIZE=pixels] – Replace: 使用存在的x. Volume替换vol – Render: 设置渲染环境, 0为Open. GL(默认),1为IDL本身 – x. Size,y. Size: 设置绘制窗口的大小 – Interpolate: 设置差值方式 – Scale: 设置体绘制的比例因子
i. Volume例子 • file = FILEPATH('head. dat', SUBDIRECTORY = ['examples', 'data']) data 0 = READ_BINARY(file, DATA_DIMS = [80, 100, 57]) • data 1 = BYTARR(80, 100, 57, /NOZERO) + 1 B data 1[0: 39, *, 28: 56] = 0 B • rgb. Table 1 = [[BYTARR(256)], [BYTARR(256)]] rgb. Table 1[1, *] = [255, 255] opacity. Table 1 = BYTARR(256) opacity. Table 1[1] = 255 • IVOLUME, data 0, data 1, $ RGB_TABLE 1 = rgb. Table 1, $ OPACITY_TABLE 1 = opacity. Table 1, $/AUTO_RENDER ; 在i. Volume中, data 0和data 1做alpha混合 从而实现切割效果
一个简单的Task. DL • PRO 基本步骤: • o. Farm = OBJ_NEW(‘taskdl’) • 1、创建Task. DL对象 • o. Farm->open_session • o. Farm->spawn_worker • o. Farm->add_task, ‘print, “Mysimple Task. Farm”’ • o. Farm->close_session • Obj_destroy, o. Farm • END • 2、打开一个会话session • 3、生成worker • 4、添加任务 • 5、结束会话session • 6、退出Task. DL
天文学中的IDL • 天文学中的IDL – The IDL Astronomy User's Library http: //idlastro. gsfc. nasa. gov/homepage. html – The Solar. Soft. Ware (SSW) system http: //www. lmsal. com/solarsoft/
- Interactive data language
- Exchange 2010 email archiving
- Formal vs informal email example
- Royal observatory greenwich
- Idl image processing
- Corba idl
- Idl konsis
- Idl tracking
- Franca idl
- Raqueo
- Where is 180 longitude
- Robert idl
- Idl konsis handbuch
- Mwrfits
- 11122005 color
- Df=idl xb
- Idl projects
- Idl medical ent
- Paneldaten
- Decomped
- New day and date always begins in the _________ of idl.
- Mpfit
- The principles of interactive language teaching
- Principles of interactive language teaching
- It is the writable phrase of www with interactive data
- Data walls for teachers
- Introduction for informal email
- Big data email
- Mussolini death
- Multimedia becomes interactive multimedia when
- Taba's grassroots approach
- Interactive voice response system randomization
- Cogat interactive profile interpretation system
- Online and offline ups block diagram
- Understanding experience in interactive systems
- Linear communication model
- Team cohesion examples
- Clasificarea strategiilor didactice
- Nitrogen cycle interactive
- Interactive machine translation
- Montecarlo
- Advantages of shannon weaver model
- Metode interactive de predare
- Metode interactive de grup
- Medii grafice interactive de programare
- Your story interactive
- Cs 418
- Glcreatebuffer
- Interactive session poster
- Interactive model of reading examples
- Interactive notebook table of contents
- Interactive learning statistics
- Interactive input methods
- Interactive furniture placement
- Peas in ai
- Peas description for interactive english tutor
- Peas description for automated taxi driver
- Information gathering interactive methods
- Impact test demo
- Vbo1
- Game story example
- In your notebook write about where you live what is it like
- Interactive movie maker
- Types of interactive media
- Dallas interactive marketing
- What is extensive speaking