当前位置:网站首页>Simpleitk encountered an ITK only supports orthonormal direction cosines error while reading NII
Simpleitk encountered an ITK only supports orthonormal direction cosines error while reading NII
2022-06-30 16:48:00 【Wutiande, young Xia】
Preface
There are some nii/nii.gz File in use simpleITK Encountered while reading ITK only supports orthonormal direction cosines Error of , This time it needs to be repaired
Code
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())
边栏推荐
- 19:00 p.m. tonight, knowledge empowerment phase 2 live broadcast - control panel interface design of openharmony smart home project
- ArcMap operation series: 80 plane to latitude and longitude 84
- Cesium-1.72 learning (add points, lines, cubes, etc.)
- 【微信小程序】小程序的宿主环境
- POJ Project Summer
- Mathematical modeling for war preparation 33- grey prediction model 2
- JS Es5 can also create constants?
- Symantec electronic sprint technology innovation board: Tan Jian, the actual controller, is an American who plans to raise 620million yuan
- How to get the preferential activities for stock account opening? Is online account opening safe?
- 详解Go语言中for循环,break和continue的使用
猜你喜欢

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

备战数学建模33-灰色预测模型2

Anaconda下安装Jupyter notebook

安全帽佩戴检测算法研究

RT thread heap size Setting

I implement "stack" with C I

云技能提升好伙伴,亚马逊云师兄今天正式营业
![[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..)

【机器学习】K-means聚类分析
![[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!](/img/cf/6fc5f7cafbdc5e165eb119b9b41cd9.jpg)
[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!
随机推荐
In order to make remote work unaffected, I wrote an internal chat room | community essay
IndexSearch
Good partner for cloud skill improvement, senior brother cloud of Amazon officially opened today
附加:(还没写,别看~~~)CorsFilter过滤器;
Mathematical modeling for war preparation 34-bp neural network prediction 2
赛芯电子冲刺科创板:拟募资6.2亿 实控人谭健为美国籍
Bidding announcement: Tianjin housing provident fund management center database all-in-one machine and database software project (budget: 6.45 million)
2022新消费半年盘点:行业遇冷,但这九个赛道依然吸金
Bidding announcement: remote disaster recovery project of Shenzhen Finance Bureau database
MC Instruction Decoder
Interpretation of gaussdb's innovative features: partial result cache accelerates operators by caching intermediate results
云和恩墨中标天津滨海农村商业银行2022-2023年度Oracle维保项目
Observation cloud reached in-depth cooperation with tdengine to optimize enterprise cloud experience
[Verilog basics] octal and hexadecimal representation of decimal negative numbers
go-zero微服务实战系列(八、如何处理每秒上万次的下单请求)
How to connect the Internet Reading Notes - Summary
Hundreds of lines of code to implement a JSON parser
Anaconda下安装Jupyter notebook
Etcd教程 — 第八章 Etcd之Compact、Watch和Lease API
[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!