当前位置:网站首页>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;
}
边栏推荐
- English grammar_ Noun possessive
- 分布式事务介绍
- Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]
- zabbix_get测试数据库失败
- The year of the tiger is coming. Come and make a wish. I heard that the wish will come true
- make makefile cmake qmake都是什么,有什么区别?
- Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
- Cve-2021-3156 vulnerability recurrence notes
- 4. 对象映射 - Mapping.Mapster
- Message queuing: how to ensure that messages are not lost
猜你喜欢
![Paper reading [semantic tag enlarged xlnv model for video captioning]](/img/e3/633f6aac7a51ad7b3dc0e45dbe1f60.png)
Paper reading [semantic tag enlarged xlnv model for video captioning]

论文阅读【Semantic Tag Augmented XlanV Model for Video Captioning】

Make web content editable

Leakage relay jd1-100

判断文件是否为DICOM文件

Unity keeps the camera behind and above the player

Digital innovation driven guide

Leakage relay llj-100fs

Zero sequence aperture of leakage relay jolx-gs62 Φ one hundred

往图片添加椒盐噪声或高斯噪声
随机推荐
Explication contextuelle du langage Go
C#可空类型
SQLSTATE[HY000][1130] Host ‘host. docker. internal‘ is not allowed to connect to this MySQL server
JVM (19) -- bytecode and class loading (4) -- talk about class loader again
C nullable type
爬虫练习题(三)
[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
nodejs获取客户端ip
数据中心为什么需要一套基础设施可视化管理系统
Mybaits multi table query (joint query, nested query)
Lombok plug-in
English grammar_ Noun possessive
Reading the paper [sensor enlarged egocentric video captioning with dynamic modal attention]
What are the common message queues?
Unity keeps the camera behind and above the player
ssm框架的简单案例
SQL query: subtract the previous row from the next row and make corresponding calculations
5阶多项式轨迹
分布式事务解决方案之2PC