dcmtk读取dcm文件中Tag值

编程入门 行业动态 更新时间:2024-10-12 18:23:33

dcmtk读取dcm<a href=https://www.elefans.com/category/jswz/34/1771438.html style=文件中Tag值"/>

dcmtk读取dcm文件中Tag值

读取病人信息等,可根据宏定义自由设置读取其他信息,代码如下:

{  DcmFileFormat fileformat;OFCondition dcmFile = fileformat.loadFile("G:/DXL/DXL_CCTA/1.2.392.200036.9116.2.1220972159.1406529370.671878.1.1_anon.dcm"); //读取Dicom图像if (!dcmFile.good()) //判断Dicom文件是否读取成功{std::cout << "file Load error" << std::endl;return;}DcmDataset *dataset = fileformat.getDataset(); //得到Dicom的数据集OFString patientname;dataset->findAndGetOFString(DCM_PatientName, patientname); //获取病人姓名qDebug() << "patientname:" << QString::fromStdString(patientname) << endl;OFString isRGB;dataset->findAndGetOFString(DCM_PhotometricInterpretation, isRGB); // DCM图片的图像模式unsigned short bit_count(0);dataset->findAndGetUint16(DCM_BitsStored, bit_count); //获取像素的位数 bit
} 

更多推荐

dcmtk读取dcm文件中Tag值

本文发布于:2023-06-26 04:19:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/889186.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   dcmtk   dcm   Tag

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!