当前位置:网站首页>MATLAB怎么在图像中显示nii文件切片信息?
MATLAB怎么在图像中显示nii文件切片信息?
2022-07-30 05:44:00 【enen狂】
MATLAB版本:R2017a
step1:在MATLAB附加功能中下载包 Tools for NIfTI and ANALYZE image


点击下载并加载到MATLAB安装路径
也可以直接点击链接下载,但是需要自己选择路径
| http://www.mathworks.com/matlabc ... i-and-analyze-image |
step2:在命令行窗口中输入代码段
help load_nii_img
nii = load_nii('filename.nii'); % 选择路径中的.nii文件
img = nii.img; % 读取文件
[n1,n2,n3] = size(img); % 获取文件的大小
imshow(img(:,:,10),[]); % 预览一下第10张切片
for i = 1:n3
figure(i);
ti = imshow(img(:,:,i),[]); % 依次显示切片
end
% close all这就可以啦
参考https://blog.csdn.net/DoReAGON/article/details/82835057
若想显示nii文件的三维信息,可使用以下代码
nii = load_nii('xxxxx.nii') % 文件名
view_nii(nii) % view_nii 函数--查看nii文件三维信息边栏推荐
- 在不同的服务器上基于docker部署redis主从同步
- The most powerful and most commonly used SQL statements in history
- TDengineGUI cannot connect to TDengine
- C#中使用OleDb操作access数据库
- mysql delete duplicate data in the table, (retain only one row)
- MySQL - Multi-table query and case detailed explanation
- Mysql 客户端常见异常分析
- 冒泡排序、选择排序、插入排序、快速排序
- Shardingsphere depots table and configuration example
- ClickHouse查询语句详解
猜你喜欢
随机推荐
Invalid bound statement (not found)出现的原因和解决方法
Mysql 客户端常见异常分析
Go简单实现协程池
Kotlin协程的简单用法:1、GlobalScope(不建议使用);2、lifecycleScope、viewModelScope(建议使用);
Student achievement management system (C language version)
Thread state of five
nodejs PM2监控及报警邮件发送(二)
c#下Web3合约空投、转账调用代码
C语言实战小项目(传统卡牌游戏)
史上超强最常用SQL语句大全
Flink CDC 实现Postgres到MySQL流式加工传输案例
Nodejs PM2 monitoring and alarm email (2)
php vulnerability full solution
oracle行转列、列转行总结
mysql不是内部或外部命令,也不是可运行的程序或批处理文件解决
MySQL window function
十六、Kotlin进阶学习:协程详细学习。
The number of warehouse 】 data quality
Jackson serialization failure problem - oracle data return type can't find the corresponding Serializer
Xcode 绑定按钮点击事件








