编译64位dcmtk库

首先下载dcmtk源码,目前最新版本3.6.1,下载地址:ftp://ftp.dcmtk.org/pub/dicom/offis/software/dcmtk/snapshot/

用最新版的CMake生成源码项目,此处开发环境为win7x64的VS2012,注意在编译选项中选择”Visual Studio 11 2012 win64”,必须选择带有”win 64”的一项!切勿选择第三方库,即“dcmtk-3.6.0-win32-i386-support_MD”里的png、xml、openssl、tiff、zlib五个库,因为这些库官方只给出了x86的lib
3.6.1支持生成dll,这就方便很多了,编译自己的程序时只需要引用lib和头文件,运行程序时在同一目录下方dll

最后VS中依次编译ALL_BUILD和INSTALL


调用dcmtk库的时候,即编译自己的项目时,可能会报以下错误:
错误 3 error C2665: “dcmtk::log4cplus::Logger::getInstance”: 2 个重载中没有一个可以转换所有参数类型 xxxxxx\include\dcmtk\oflog\logmacro.h 106
错误 1 error C2678: 二进制“+”: 没有找到接受“const wchar_t [8]”类型的左操作数的运算符(或没有可接受的转换) xxxxxx\include\dcmtk\oflog\tracelog.h 59
需要设置项目属性的“字符集”为“多字节字符集”


3.6.1与3.6.0的区别:
E_TransferSyntax的定义不同了,3.6.0的定义如下:

typedef enum {
/// unknown transfer syntax or dataset created in-memory
EXS_Unknown = -1,
/// Implicit VR Little Endian
EXS_LittleEndianImplicit = 0,
/// Implicit VR Big Endian (pseudo transfer syntax that does not really exist)
EXS_BigEndianImplicit = 1,
/// Explicit VR Little Endian
EXS_LittleEndianExplicit = 2,
/// Explicit VR Big Endian
EXS_BigEndianExplicit = 3,
/// JPEG Baseline (lossy)
EXS_JPEGProcess1TransferSyntax = 4,
/// JPEG Extended Sequential (lossy, 8/12 bit)
EXS_JPEGProcess2_4TransferSyntax = 5,
/// JPEG Extended Sequential (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess3_5TransferSyntax = 6,
/// JPEG Spectral Selection, Non-Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess6_8TransferSyntax = 7,
/// JPEG Spectral Selection, Non-Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess7_9TransferSyntax = 8,
/// JPEG Full Progression, Non-Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess10_12TransferSyntax = 9,
/// JPEG Full Progression, Non-Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess11_13TransferSyntax = 10,
/// JPEG Lossless with any selection value
EXS_JPEGProcess14TransferSyntax = 11,
/// JPEG Lossless with any selection value, arithmetic coding
EXS_JPEGProcess15TransferSyntax = 12,
/// JPEG Extended Sequential, Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess16_18TransferSyntax = 13,
/// JPEG Extended Sequential, Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess17_19TransferSyntax = 14,
/// JPEG Spectral Selection, Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess20_22TransferSyntax = 15,
/// JPEG Spectral Selection, Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess21_23TransferSyntax = 16,
/// JPEG Full Progression, Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess24_26TransferSyntax = 17,
/// JPEG Full Progression, Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess25_27TransferSyntax = 18,
/// JPEG Lossless, Hierarchical
EXS_JPEGProcess28TransferSyntax = 19,
/// JPEG Lossless, Hierarchical, arithmetic coding
EXS_JPEGProcess29TransferSyntax = 20,
/// JPEG Lossless, Selection Value 1
EXS_JPEGProcess14SV1TransferSyntax = 21,
/// Run Length Encoding (lossless)
EXS_RLELossless = 22,
/// JPEG-LS (lossless)
EXS_JPEGLSLossless = 23,
/// JPEG-LS (lossless or near-lossless mode)
EXS_JPEGLSLossy = 24,
/// Deflated Explicit VR Little Endian
EXS_DeflatedLittleEndianExplicit = 25,
/// JPEG 2000 (lossless)
EXS_JPEG2000LosslessOnly = 26,
/// JPEG 2000 (lossless or lossy)
EXS_JPEG2000 = 27,
/// MPEG2 Main Profile at Main Level
EXS_MPEG2MainProfileAtMainLevel = 28,
/// MPEG2 Main Profile at High Level
EXS_MPEG2MainProfileAtHighLevel = 29,
/// JPEG 2000 part 2 multi-component extensions (lossless)
EXS_JPEG2000MulticomponentLosslessOnly = 30,
/// JPEG 2000 part 2 multi-component extensions (lossless or lossy)
EXS_JPEG2000Multicomponent = 31,
/// JPIP Referenced
EXS_JPIPReferenced = 32,
/// JPIP Referenced Deflate
EXS_JPIPReferencedDeflate = 33
} E_TransferSyntax;

3.6.1定义如下:

typedef enum {
/// unknown transfer syntax or dataset created in-memory
EXS_Unknown = -1,
/// Implicit VR Little Endian
EXS_LittleEndianImplicit = 0,
/// Implicit VR Big Endian (pseudo transfer syntax that does not really exist)
EXS_BigEndianImplicit = 1,
/// Explicit VR Little Endian
EXS_LittleEndianExplicit = 2,
/// Explicit VR Big Endian
EXS_BigEndianExplicit = 3,
/// JPEG Baseline (lossy)
EXS_JPEGProcess1 = 4,
/// JPEG Extended Sequential (lossy, 8/12 bit)
EXS_JPEGProcess2_4 = 5,
/// JPEG Extended Sequential (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess3_5 = 6,
/// JPEG Spectral Selection, Non-Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess6_8 = 7,
/// JPEG Spectral Selection, Non-Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess7_9 = 8,
/// JPEG Full Progression, Non-Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess10_12 = 9,
/// JPEG Full Progression, Non-Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess11_13 = 10,
/// JPEG Lossless with any selection value
EXS_JPEGProcess14 = 11,
/// JPEG Lossless with any selection value, arithmetic coding
EXS_JPEGProcess15 = 12,
/// JPEG Extended Sequential, Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess16_18 = 13,
/// JPEG Extended Sequential, Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess17_19 = 14,
/// JPEG Spectral Selection, Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess20_22 = 15,
/// JPEG Spectral Selection, Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess21_23 = 16,
/// JPEG Full Progression, Hierarchical (lossy, 8/12 bit)
EXS_JPEGProcess24_26 = 17,
/// JPEG Full Progression, Hierarchical (lossy, 8/12 bit), arithmetic coding
EXS_JPEGProcess25_27 = 18,
/// JPEG Lossless, Hierarchical
EXS_JPEGProcess28 = 19,
/// JPEG Lossless, Hierarchical, arithmetic coding
EXS_JPEGProcess29 = 20,
/// JPEG Lossless, Selection Value 1
EXS_JPEGProcess14SV1 = 21,
/// Run Length Encoding (lossless)
EXS_RLELossless = 22,
/// JPEG-LS (lossless)
EXS_JPEGLSLossless = 23,
/// JPEG-LS (lossless or near-lossless mode)
EXS_JPEGLSLossy = 24,
/// Deflated Explicit VR Little Endian
EXS_DeflatedLittleEndianExplicit = 25,
/// JPEG 2000 (lossless)
EXS_JPEG2000LosslessOnly = 26,
/// JPEG 2000 (lossless or lossy)
EXS_JPEG2000 = 27,
/// MPEG2 Main Profile at Main Level
EXS_MPEG2MainProfileAtMainLevel = 28,
/// MPEG2 Main Profile at High Level
EXS_MPEG2MainProfileAtHighLevel = 29,
/// MPEG4 High Profile / Level 4.1
EXS_MPEG4HighProfileLevel4_1 = 30,
/// MPEG4 BD-compatible High Profile / Level 4.1
EXS_MPEG4BDcompatibleHighProfileLevel4_1 = 31,
/// MPEG4 High Profile / Level 4.2 For 2D Video
EXS_MPEG4HighProfileLevel4_2_For2DVideo = 32,
/// MPEG4 High Profile / Level 4.2 For 3D Video
EXS_MPEG4HighProfileLevel4_2_For3DVideo = 33,
/// MPEG4 Stereo High Profile / Level 4.2
EXS_MPEG4StereoHighProfileLevel4_2 = 34,
/// JPEG 2000 part 2 multi-component extensions (lossless)
EXS_JPEG2000MulticomponentLosslessOnly = 35,
/// JPEG 2000 part 2 multi-component extensions (lossless or lossy)
EXS_JPEG2000Multicomponent = 36,
/// JPIP Referenced
EXS_JPIPReferenced = 37,
/// JPIP Referenced Deflate
EXS_JPIPReferencedDeflate = 38
} E_TransferSyntax;

  • 7
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
win64 dcmtk 3.6.2的编译需要以下步骤: 1. 下载DCMTK源代码:可以从DCMTK的官方网站下载最新版本的源代码压缩包。 2. 解压缩源代码:将下载的压缩包解压缩到您选择的目录中。 3. 安装CMake:DCMTK编译过程需要使用CMake。您需要在官方网站上下载并安装适合您的操作系统的最新版本的CMake。 4. 创建一个新的构建目录:在DCMTK源代码目录外创建一个新的目录,用于构建DCMTK。 5. 打开CMake GUI:运行CMake GUI并在"Where is the source code"中指定DCMTK源代码的路径,然后在"What is the build location"中指定您创建的构建目录的路径。 6. 配置和生成项目:点击"Configure"按钮,然后选择您想要的生成器(例如Visual Studio 2019),然后点击"Generate"按钮。 7. 打开生成的项目文件:在上一步中生成的目录中找到生成的项目文件(例如.sln文件),用Visual Studio(或其他适用的IDE)打开。 8. 配置项目:在Visual Studio中,选择适合您的配置(例如Release或Debug),然后配置项目以选择要包含的DCMTK功能和选项。 9. 构建项目:点击Visual Studio中的"Build"按钮,开始构建DCMTK编译过程可能需要一段时间,具体时间取决于您的计算机性能和配置。 10. 完成编译编译完成后,您将在构建目录中获得生成的DCMTK文件和可执行文件。 注意:编译过程可能因为配置,环境和的依赖关系而有所不同。为了正确配置和构建DCMTK,您可能需要参考DCMTK的官方文档,并根据您的需求进行适当的调整。
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值