热度 10| |||
SVisual中最大的优点是每一个操作都有对应的代码提示在script中
我这里首先是将图片一一从Sprocess或者Topography中读出来,然后进行处理操作,依次进行大小的调整,分辨率的调整和格式转换,这里面我采用了一个循环语句进行实现,最终实现了tdr文件到tiff文件或者到png格式的转变
下面是我的代码,如果有同行能够更方便快捷实现该功能的话可以留言我们一块学习讨论
#setdep n@node|auto_250@ set filename n@node|auto_250@_vbe set image_resolution "500x500" # 初始化编号计数器 set index 1 load_file ${filename}.tdr set datasets [list_datasets] foreach dataset $datasets { create_plot -dataset $dataset name "Plot_${dataset}" set_camera_prop \ ;让图片的输出保持大小一致,设置相机拍摄位置 -position {0 0 5} \ -focal_point {0 0 0} \ -view_up {0 1 0} \ -view_angle 25.0 set_plot_prop \ ;调整了图片的输出格式 -hide_title \ -hide_cube_axes \ -color_bg #ffffff \ -bg_solid -hide_axes \ -material_colors vivid \ -color_map grayscale \ -hide_legend \ set_field_prop \ Z \ ;Z轴的顶部视图 -show_bands set_material_prop {Oxide} \ ;设置材料的颜色,不设定也行,因为上述“color_map grayscale”“set_field_prop”优先级高 -color #c0c0c0 set output_path "/home/TCAD2022/Desktop/rename_image/images/rename_images_down/n@node@_$index.tiff" export_view $output_path -format TIFF -resolution $image_resolution -plots "Plot_${dataset}" incr index } puts "exports tiff image to : $output_path"