当前位置:网站首页>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文件三维信息
边栏推荐
- Using PyQt5 to add an interface to YoloV5 (1)
- 十八、Kotlin进阶学习:1、挂起函数执行的顺序;2、使用 async 和 await 异步执行挂起函数;3、协程的调度器;4、父子协程;
- 使用kotlin扩展插件/依赖项简化代码(在最新版本4.0以后,此插件已被弃用,故请选择性学习,以了解为主。)
- Mysql client common exception analysis
- SQL Server database generation and execution of SQL scripts
- 十七、Kotlin进阶学习:1、守护线程;2、线程和协程之间的效率对比;3、取消协程;
- 八、Kotlin基础学习:1、数据类;2、单例;3、伴生对象;4、密封类;
- C语言学习经验
- The number of warehouse 】 data quality
- 建造者模式(Swift 实现)
猜你喜欢
Nacos配置中心用法详细介绍
【数仓】数据仓库高频面试题题英文版(1)
Use kotlin to extend plugins/dependencies to simplify code (after the latest version 4.0, this plugin has been deprecated, so please choose to learn, mainly to understand.)
二叉树(一):深度优先遍历与广度优先遍历
【Spark】Spark 高频面试题英语版(1)
"MySQL Advanced Chapter" four, the storage structure of the index
sqli-labs shooting range SQL injection learning Less-1
八、Kotlin基础学习:1、数据类;2、单例;3、伴生对象;4、密封类;
Redis publish/subscribe
C#预定义数据类型简介
随机推荐
JVM Learning (2) Garbage Collector
Oracle数据库SQL优化详解
Redis publish/subscribe
生产力工具分享——简洁而不简单
Briefly describe SSRF
冒泡排序、选择排序、插入排序、快速排序
[Getting C language from zero basis - navigation summary]
Mycat2.0搭建教程
抽象工厂模式(Swift 实现)
【SQL】SQL 高频面试题英语版(1)
八、Kotlin基础学习:1、数据类;2、单例;3、伴生对象;4、密封类;
JVM学习(二) 垃圾收集器
SQL Server database generation and execution of SQL scripts
原型模式(Prototype):Swift 实现
学生成绩管理系统(C语言版)
【数仓】数据仓库高频面试题题英文版(1)
ClickHouse查询语句详解
Mysql client common exception analysis
Detailed explanation of regular expression syntax and practical examples
【MySQL功法】第5话 · SQL单表查询