当前位置:网站首页>判断文件是否为DICOM文件
判断文件是否为DICOM文件
2022-07-06 23:54:00 【甩你十万八千里】
判断依据:根据DICOM前缀,长度为4个字节的字符串是否等于“DICM”来判断该文件是否属于DICOM文件
/判断目标文件是否为DICOM文件/
bool IsDicomFile(QString path)
{
// 判断是否为dicom文件
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;
}
边栏推荐
- 集群、分布式、微服务的区别和介绍
- 消息队列:消息积压如何处理?
- Leakage relay jd1-100
- Jhok-zbl1 leakage relay
- When deleting a file, the prompt "the length of the source file name is greater than the length supported by the system" cannot be deleted. Solution
- [paper reading] semi supervised left atrium segmentation with mutual consistency training
- Getting started with DES encryption
- 《HarmonyOS实战—入门到开发,浅析原子化服务》
- Design, configuration and points for attention of network arbitrary source multicast (ASM) simulation using OPNET
- 淘宝商品详情页API接口、淘宝商品列表API接口,淘宝商品销量API接口,淘宝APP详情API接口,淘宝详情API接口
猜你喜欢
Design, configuration and points for attention of network specified source multicast (SSM) simulation using OPNET
CVE-2021-3156 漏洞复现笔记
JVM (19) -- bytecode and class loading (4) -- talk about class loader again
English语法_名词 - 所有格
K6el-100 leakage relay
高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏
分布式全局ID生成方案
The year of the tiger is coming. Come and make a wish. I heard that the wish will come true
JVM(二十) -- 性能监控与调优(一) -- 概述
集群、分布式、微服務的區別和介紹
随机推荐
Flink SQL 实现读写redis,并动态生成Hset key
The year of the tiger is coming. Come and make a wish. I heard that the wish will come true
5. Data access - entityframework integration
Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]
Leakage relay jelr-250fg
不同网段之间实现GDB远程调试功能
京东商品详情页API接口、京东商品销量API接口、京东商品列表API接口、京东APP详情API接口、京东详情API接口,京东SKU信息接口
4. Object mapping Mapster
WEB架构设计过程
5. 数据访问 - EntityFramework集成
Batch size setting skills
Paper reading [semantic tag enlarged xlnv model for video captioning]
[reading of the paper] a multi branch hybrid transformer network for channel terminal cell segmentation
How to get free traffic in pinduoduo new store and what links need to be optimized in order to effectively improve the free traffic in the store
LabVIEW is opening a new reference, indicating that the memory is full
利用OPNET进行网络仿真时网络层协议(以QoS为例)的使用、配置及注意点
Getting started with DES encryption
4. 对象映射 - Mapping.Mapster
什么是消息队列?
JVM (XX) -- performance monitoring and tuning (I) -- Overview