当前位置:网站首页>simpleITK读取nii遇到ITK only supports orthonormal direction cosines的错误
simpleITK读取nii遇到ITK only supports orthonormal direction cosines的错误
2022-06-30 15:48:00 【吴天德少侠】
前言
有些nii/nii.gz的文件在使用simpleITK读取时会遇到ITK only supports orthonormal direction cosines的错误,这个时候就需要进行修复
代码
file_path = "001.nii.gz"
try:
image = sitk.ReadImage(file_path)
except:
print(f'cosines problem occures, try to fix it...')
img = nib.load(file_path)
qform = img.get_qform()
img.set_qform(qform)
sform = img.get_sform()
img.set_sform(sform)
nib.save(img,file_path)
image = sitk.ReadImage(file_path)
print(f'now we have fixed it!')
print(image.GetSize())
边栏推荐
- ArcMap operation series: 80 plane to latitude and longitude 84
- Arcmap操作系列:80平面转经纬度84
- 【Verilog基础】十进制负数的八进制、十六进制表示
- Bidding announcement: Taizhou Unicom Oracle all in one machine and database maintenance service project in 2022
- 云和恩墨中标天津滨海农村商业银行2022-2023年度Oracle维保项目
- Hologres共享集群助力淘宝订阅极致精细化运营
- [unity ugui] scrollrect dynamically scales the grid size and automatically locates the middle grid
- IndexSearch
- 中航无人机科创板上市:市值385亿 拳头产品是翼龙无人机
- [bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection
猜你喜欢

Hundreds of lines of code to implement a JSON parser

Etcd教程 — 第八章 Etcd之Compact、Watch和Lease API

荣盛生物冲刺科创板:拟募资12.5亿 年营收2.6亿

备战数学建模35-时间序列预测模型

2022新消费半年盘点:行业遇冷,但这九个赛道依然吸金

备战数学建模34-BP神经网络预测2

CVPR 2022 - Tesla AI proposed: generalized pedestrian re recognition based on graph sampling depth metric learning

RT thread heap size Setting

BC1.2 PD协议
![[Verilog basics] summary of some concepts about clock signals (clock setup/hold, clock tree, clock skew, clock latency, clock transition..)](/img/54/fd7541dae4aad7e4216bcaabbb146b.png)
[Verilog basics] summary of some concepts about clock signals (clock setup/hold, clock tree, clock skew, clock latency, clock transition..)
随机推荐
More dragon lizard self-developed features! Production available Anolis OS 8.6 officially released
What is the difference between real-time rendering and pre rendering
The inspiration from infant cognitive learning may be the key to the next generation of unsupervised machine learning
Home office discussion on the experience of remote assistance to quickly improve efficiency | community essay solicitation
[unity ugui] scrollrect dynamically scales the grid size and automatically locates the middle grid
招标公告:深圳市财政局数据库异地灾备项目
腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?
Tencent two sides: @bean and @component are used on the same class. What happens?
Rong Lianyun launched rphone based on Tongxin UOS to create a new ecology of localization contact center
19:00 p.m. tonight, knowledge empowerment phase 2 live broadcast - control panel interface design of openharmony smart home project
What are the reasons for the errors reported by the Flink SQL CDC synchronization sqlserver
How cloudxr promotes the future development of XR
附加:(还没写,别看~~~)CorsFilter过滤器;
24:第三章:开发通行证服务:7:自定义异常(来表征程序中出现的错误);创建GraceExceptionHandler来全局统一处理异常(根据异常信息,构建对应的API统一返回对象的,JSON数据);
How to get the preferential activities for stock account opening? Is online account opening safe?
Headhunter 50, 000, I'll go to VC
牛客网:最小花费爬楼梯
备战数学建模34-BP神经网络预测2
猎头5万挖我去VC
[machine learning] K-means clustering analysis