博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
read selection
阅读量:4041 次
发布时间:2019-05-24

本文共 911 字,大约阅读时间需要 3 分钟。

the format of .sel file is like:

# per vertex status: 0=fixed, 1=deformable-region, 2=handle

# 5261 vertices
1
1
1
1
2
1
1
1
0
1
1
1
1

function [group0, group1, group2] = read_sel(filename)group0 = [];group1 = [];group2 = [];  fp = fopen( filename, 'r' );  type = fscanf( fp, '%s', 1 );  index = 1;  while strcmp( type, '' ) == 0      if strcmp( type, '#' ) == 1          line = fgets(fp);          %ignore line      else          fseek(fp, -length(type), 0);          line = fgets(fp);          group = sscanf(line, '%d');          switch group              case 0                  group0 = [group0 index];                  index = index + 1;              case 1                  group1 = [group1 index];                  index = index + 1;              case 2                  group2 = [group2 index];                  index = index + 1;          end                end      type = fscanf( fp, '%s', 1 );  end

转载地址:http://spxdi.baihongyu.com/

你可能感兴趣的文章
[LeetCode By Python]125. Valid Palindrome
查看>>
[LeetCode By Python]136. Single Number
查看>>
[LeetCode By MYSQL] Combine Two Tables
查看>>
Android下调用收发短信邮件等(转载)
查看>>
Android中电池信息(Battery information)的取得
查看>>
SVN客户端命令详解
查看>>
Android/Linux 内存监视
查看>>
Linux系统信息查看
查看>>
用find命令查找最近修改过的文件
查看>>
Android2.1消息应用(Messaging)源码学习笔记
查看>>
Android之TelephonyManager类的方法详解
查看>>
android raw读取超过1M文件的方法
查看>>
ubuntu下SVN服务器安装配置
查看>>
MPMoviePlayerViewController和MPMoviePlayerController的使用
查看>>
CocoaPods实践之制作篇
查看>>
[Mac]Mac 操作系统 常见技巧
查看>>
苹果Swift编程语言入门教程【中文版】
查看>>
捕鱼忍者(ninja fishing)之游戏指南+游戏攻略+游戏体验
查看>>
iphone开发基础之objective-c学习
查看>>
iphone开发之SDK研究(待续)
查看>>