GDCM: 读取选定的私有组测试程序(C/C++)

175 篇文章 ¥59.90 ¥99.00
本文介绍了如何使用GDCM库的ReadSelectedPrivateGroups函数读取DICOM文件中的私有组。提供C++代码示例,展示如何选择性地读取0x6001标识号的私有组数据,包括遍历元素、匹配标签并处理序列数据或属性值。

GDCM: 读取选定的私有组测试程序(C/C++)

在本文中,我们将介绍如何使用GDCM库的ReadSelectedPrivateGroups函数来读取DICOM文件中的选定私有组。我们将提供相应的C++源代码示例,帮助您理解和实现这一功能。

DICOM(数字图像与通信医学)是医学图像和相关信息的国际标准。GDCM(Grassroots DICOM)是一个开源的C++库,用于处理和分析DICOM文件。它提供了一组功能丰富的类和函数,使开发人员能够轻松地读取、写入和操作DICOM图像和数据。

在DICOM文件中,私有组是指由厂商或研究机构定义的非标准标签。这些标签的标识号在(0x6000, 0xFFFF)范围内。GDCM库提供了ReadSelectedPrivateGroups函数,允许我们选择性地读取DICOM文件中的私有组数据。

下面是使用GDCM库读取选定私有组的示例代码:

#include <iostream>
#include 
/usr/bin/ld: CMakeFiles/gdcmMSFF.dir/gdcmJPEGLSCodec.cxx.o: in function `gdcm::JPEGLSCodec::GetHeaderInfo(std::istream&, gdcm::TransferSyntax&)': gdcmJPEGLSCodec.cxx:(.text+0x1e0): undefined reference to `JpegLsReadHeader' /usr/bin/ld: CMakeFiles/gdcmMSFF.dir/gdcmJPEGLSCodec.cxx.o: in function `gdcm::JPEGLSCodec::DecodeByStreamsCommon(char const*, unsigned long, std::vector<unsigned char, std::allocator<unsigned char> >&)': gdcmJPEGLSCodec.cxx:(.text+0x495): undefined reference to `JpegLsReadHeader' /usr/bin/ld: gdcmJPEGLSCodec.cxx:(.text+0x539): undefined reference to `JpegLsDecode' /usr/bin/ld: CMakeFiles/gdcmMSFF.dir/gdcmJPEGLSCodec.cxx.o: in function `gdcm::JPEGLSCodec::Decode(gdcm::DataElement const&, gdcm::DataElement&)': gdcmJPEGLSCodec.cxx:(.text+0x8ce): undefined reference to `JpegLsReadHeader' /usr/bin/ld: gdcmJPEGLSCodec.cxx:(.text+0x993): undefined reference to `JpegLsDecode' /usr/bin/ld: CMakeFiles/gdcmMSFF.dir/gdcmJPEGLSCodec.cxx.o: in function `gdcm::JPEGLSCodec::CodeFrameIntoBuffer(char*, unsigned long, unsigned long&, char const*, unsigned long)': gdcmJPEGLSCodec.cxx:(.text+0xcd3): undefined reference to `JpegLsEncode' collect2: error: ld returned 1 exit status gmake[2]: *** [Source/MediaStorageAndFileFormat/CMakeFiles/gdcmMSFF.dir/build.make:1775: bin/libgdcmMSFF.so.3.0.24] Error 1 gmake[2]: Leaving directory '/tmp/tmp/build-gdcm-3.0.24' gmake[1]: *** [CMakeFiles/Makefile2:827: Source/MediaStorageAndFileFormat/CMakeFiles/gdcmMSFF.dir/all] Error 2 gmake[1]: Leaving directory '/tmp/tmp/build-gdcm-3.0.24' gmake: *** [Makefile:159: all] Error 2
11-12
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值