GDCM:测试程序 C/C++ 中的 gdcm::VL

254 篇文章 ¥59.90 ¥99.00
本文介绍了如何在C/C++中使用GDCM库的gdcm::VL类来处理DICOM数据元素的值长度。通过编写测试程序,展示了设置、获取、验证值长度的操作,并提供了代码示例。

GDCM:测试程序 C/C++ 中的 gdcm::VL

GDCM(Grassroots DICOM)是一个开源的跨平台DICOM(数字图像与通信医学)库,它提供了处理和分析医学图像数据的功能。其中,gdcm::VL(Value Length)是GDCM库中的一个重要类,用于表示DICOM数据元素的值长度。在本文中,我们将编写一个简单的C/C++测试程序,以探索gdcm::VL的用法和功能。

首先,我们需要在计算机上安装GDCM库。可以从GDCM的官方网站(gdcm.sourceforge.net)下载最新版本的库,并按照官方的安装指南进行安装。安装完成后,我们可以开始编写测试程序。

#include <iostream>
#include <gdcmVL.h>

int 
/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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值