当前位置:网站首页>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;
}
边栏推荐
- 架构设计的五个核心要素
- 拼多多新店如何获取免费流量,需要从哪些环节去优化,才能有效提升店内免费流量
- 4. Object mapping Mapster
- Preliminary practice of niuke.com (9)
- The year of the tiger is coming. Come and make a wish. I heard that the wish will come true
- 力扣102题:二叉树的层序遍历
- 往图片添加椒盐噪声或高斯噪声
- 论文阅读【MM21 Pre-training for Video Understanding Challenge:Video Captioning with Pretraining Techniqu】
- Differences and introduction of cluster, distributed and microservice
- 5阶多项式轨迹
猜你喜欢

K6el-100 leakage relay

The navigation bar changes colors according to the route

1. AVL tree: left-right rotation -bite

论文阅读【Sensor-Augmented Egocentric-Video Captioning with Dynamic Modal Attention】
![Reading the paper [sensor enlarged egocentric video captioning with dynamic modal attention]](/img/db/feb719e2715c7b9c669957995e1d83.png)
Reading the paper [sensor enlarged egocentric video captioning with dynamic modal attention]

软件测试面试技巧

《HarmonyOS实战—入门到开发,浅析原子化服务》
![[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

An example of multi module collaboration based on NCF

Lombok plug-in
随机推荐
Message queuing: how to ensure that messages are not lost
Common skills and understanding of SQL optimization
Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]
Différenciation et introduction des services groupés, distribués et microservices
Unity让摄像机一直跟随在玩家后上方
Distributed global ID generation scheme
Unity keeps the camera behind and above the player
Paper reading [open book video captioning with retrieve copy generate network]
How does mapbox switch markup languages?
Realize GDB remote debugging function between different network segments
Five core elements of architecture design
[JS component] date display.
How digitalization affects workflow automation
基于NCF的多模块协同实例
论文阅读【MM21 Pre-training for Video Understanding Challenge:Video Captioning with Pretraining Techniqu】
什么是消息队列?
“多模态”概念
[binary tree] binary tree path finding
《2022中国低/无代码市场研究及选型评估报告》发布
Jhok-zbl1 leakage relay