当前位置:网站首页>Determine whether the file is a DICOM file
Determine whether the file is a DICOM file
2022-07-07 05:44:00 【Dump you for thousands of miles】
The basis of judgment : according to DICOM Prefix , The length is 4 Whether a string of bytes is equal to “DICM” To determine whether the file belongs to DICOM file

/ Determine whether the target file is DICOM file /
bool IsDicomFile(QString path)
{
// Judge whether it is dicom file
char buffer[0x85];
std::string s = path.toStdString();
std::ifstream in(path.toStdString().c_str());
in.getline(buffer, 0x85);
if (!((buffer[0x80] == 0x44) && (buffer[0x81] == 0x49) &&
(buffer[0x82] == 0x43) && (buffer[0x83] == 0x4D)))
{
std::cout << path.toStdString() << std::endl;
std::cout << “It’s not a DICOM File!” << std::endl;
return false;
}
return true;
}
边栏推荐
- 消息队列:如何确保消息不会丢失
- 淘宝店铺发布API接口(新),淘宝oAuth2.0店铺商品API接口,淘宝商品发布API接口,淘宝商品上架API接口,一整套发布上架店铺接口对接分享
- 论文阅读【MM21 Pre-training for Video Understanding Challenge:Video Captioning with Pretraining Techniqu】
- Web architecture design process
- MySQL-CentOS7通过YUM安装MySQL
- AI人脸编辑让Lena微笑
- 论文阅读【Sensor-Augmented Egocentric-Video Captioning with Dynamic Modal Attention】
- 三级菜单数据实现,实现嵌套三级菜单数据
- Hcip eighth operation
- Leetcode 1189 maximum number of "balloons" [map] the leetcode road of heroding
猜你喜欢

Pinduoduo product details interface, pinduoduo product basic information, pinduoduo product attribute interface
![Paper reading [semantic tag enlarged xlnv model for video captioning]](/img/e3/633f6aac7a51ad7b3dc0e45dbe1f60.png)
Paper reading [semantic tag enlarged xlnv model for video captioning]

Differences and introduction of cluster, distributed and microservice

Leakage relay jd1-100
![[PM products] what is cognitive load? How to adjust cognitive load reasonably?](/img/75/2277e0c413be561ec963b44679eb75.jpg)
[PM products] what is cognitive load? How to adjust cognitive load reasonably?

SQL query: subtract the previous row from the next row and make corresponding calculations
![[paper reading] semi supervised left atrium segmentation with mutual consistency training](/img/d6/e6db0d76e81e49a83a30f8c1832f09.png)
[paper reading] semi supervised left atrium segmentation with mutual consistency training

集群、分布式、微服务的区别和介绍

三级菜单数据实现,实现嵌套三级菜单数据

English grammar_ Noun possessive
随机推荐
Make web content editable
论文阅读【MM21 Pre-training for Video Understanding Challenge:Video Captioning with Pretraining Techniqu】
《HarmonyOS实战—入门到开发,浅析原子化服务》
Preliminary practice of niuke.com (9)
Paper reading [open book video captioning with retrieve copy generate network]
[PM products] what is cognitive load? How to adjust cognitive load reasonably?
什么是消息队列?
Jhok-zbg2 leakage relay
1.AVL树:左右旋-bite
【已解决】记一次EasyExcel的报错【读取xls文件时全表读不报错,指定sheet名读取报错】
Use, configuration and points for attention of network layer protocol (taking QoS as an example) when using OPNET for network simulation
Pinduoduo product details interface, pinduoduo product basic information, pinduoduo product attribute interface
How Alibaba cloud's DPCA architecture works | popular science diagram
什么是依赖注入(DI)
Web Authentication API兼容版本信息
Cve-2021-3156 vulnerability recurrence notes
Mysql database learning (7) -- a brief introduction to pymysql
Go 语言的 Context 详解
[JS component] custom select
Taobao Commodity details page API interface, Taobao Commodity List API interface, Taobao Commodity sales API interface, Taobao app details API interface, Taobao details API interface