- 浏览: 3448670 次
- 性别:
- 来自: 苏州
文章分类
最新评论
-
sonichy:
Qt5改动很多,要改改了。
基于QItemDelegate的例子1 SpinBoxDelegate -
我的主页6:
楼主,2.2子查询的分页方式:SELECT * FROM ar ...
Mysql 分页语句Limit用法 -
liguoqi:
非常感谢楼主的用心指导,工具以及图片例子都提供了 赞!
两款免费DCIOM 图像浏览软件介绍和DICOM图像例子供下载 -
liguoqi:
问下这个图片怎么解压损坏呀
两款免费DCIOM 图像浏览软件介绍和DICOM图像例子供下载 -
liguoqi:
楼主讲解的非常详细,还附带工具和图片例子,非常感谢
两款免费DCIOM 图像浏览软件介绍和DICOM图像例子供下载
DcmSCU example program
This is example code how to program an actual DICOM client with the DcmSCU class. In particular, it demonstrates
-
how to send an ECHO to the server (usually a PACS),
-
receive a list of studies the PACS has (Query)
-
and downloads them (Retrieve). For this last step, a separate Storage SCP like storescp is needed which actually receives the study images.
The code uses the public DICOM server at www.dicomserver.co.uk which is offered by Dave Harvey (MedicalObjects). There are also logs you can check at the server in order to debug your application.
/* * * Copyright (C) 2011-2012, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by * * OFFIS e.V. * R&D Division Health * Escherweg 2 * D-26121 Oldenburg, Germany * * * Module: dcmnet * * Author: Michael Onken * * Purpose: Test for move feature of the DcmSCU class */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmnet/testscu.h" #include "dcmtk/dcmnet/diutil.h" #define OFFIS_CONSOLE_APPLICATION "testscu" static OFLogger echoscuLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION); static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $"; // our application entity title used for calling the peer machine #define APPLICATIONTITLE "TEST-SCU" // host name of the peer machine #define PEERHOSTNAME "www.dicomserver.co.uk" // TCP/IP port to connect to the peer machine #define PEERPORT 11112 // application entity title of the peer machine #define PEERAPPLICATIONTITLE "MOVESCP" // MOVE destination AE Title #define MOVEAPPLICATIONTITLE "TEST-SCU" static Uint8 findUncompressedPC(const OFString& sopClass, DcmSCU& scu) { Uint8 pc; pc = scu.findPresentationContextID(sopClass, UID_LittleEndianExplicitTransferSyntax); if (pc == 0) pc = scu.findPresentationContextID(sopClass, UID_BigEndianExplicitTransferSyntax); if (pc == 0) pc = scu.findPresentationContextID(sopClass, UID_LittleEndianImplicitTransferSyntax); return pc; } // ******************************************** int main(int argc, char *argv[]) { /* Setup DICOM connection parameters */ OFLog::configure(OFLogger::DEBUG_LOG_LEVEL); DcmTestSCU scu; // set AE titles scu.setAETitle(APPLICATIONTITLE); scu.setPeerHostName(PEERHOSTNAME); scu.setPeerPort(PEERPORT); scu.setPeerAETitle(PEERAPPLICATIONTITLE); // Use presentation context for FIND/MOVE in study root, propose all uncompressed transfer syntaxes OFList<OFString> ts; ts.push_back(UID_LittleEndianExplicitTransferSyntax); ts.push_back(UID_BigEndianExplicitTransferSyntax); ts.push_back(UID_LittleEndianImplicitTransferSyntax); scu.addPresentationContext(UID_FINDStudyRootQueryRetrieveInformationModel, ts); scu.addPresentationContext(UID_MOVEStudyRootQueryRetrieveInformationModel, ts); scu.addPresentationContext(UID_VerificationSOPClass, ts); /* Initialize network */ OFCondition result = scu.initNetwork(); if (result.bad()) { DCMNET_ERROR("Unable to set up the network: " << result.text()); return 1; } /* Negotiate Association */ result = scu.negotiateAssociation(); if (result.bad()) { DCMNET_ERROR("Unable to negotiate association: " << result.text()); return 1; } /* Let's look whether the server is listening: Assemble and send C-ECHO request */ result = scu.sendECHORequest(0); if (result.bad()) { DCMNET_ERROR("Could not process C-ECHO with the server: " << result.text()); return 1; } /* Assemble and send C-FIND request */ OFList<QRResponse*> findResponses; DcmDataset req; req.putAndInsertOFStringArray(DCM_QueryRetrieveLevel, "STUDY"); req.putAndInsertOFStringArray(DCM_StudyInstanceUID, ""); T_ASC_PresentationContextID presID = findUncompressedPC(UID_FINDStudyRootQueryRetrieveInformationModel, scu); if (presID == 0) { DCMNET_ERROR("There is no uncompressed presentation context for Study Root FIND"); return 1; } result = scu.sendFINDRequest(presID, &req, &findResponses); if (result.bad()) return 1; else DCMNET_INFO("There are " << findResponses.size() << " studies available"); /* Assemble and send C-MOVE request, for each study identified above*/ presID = findUncompressedPC(UID_MOVEStudyRootQueryRetrieveInformationModel, scu); if (presID == 0) { DCMNET_ERROR("There is no uncompressed presentation context for Study Root MOVE"); return 1; } OFListIterator(QRResponse*) study = findResponses.begin(); Uint32 studyCount = 1; OFBool failed = OFFalse; // Every while loop run will get all image for a specific study while (study != findResponses.end() && result.good()) { // be sure we are not in the last response which does not have a dataset if ( (*study)->m_dataset != NULL) { OFString studyInstanceUID; result = (*study)->m_dataset->findAndGetOFStringArray(DCM_StudyInstanceUID, studyInstanceUID); // only try to get study if we actually have study instance uid, otherwise skip it if (result.good()) { req.putAndInsertOFStringArray(DCM_StudyInstanceUID, studyInstanceUID); // fetches all images of this particular study result = scu.sendMOVERequest(presID, MOVEAPPLICATIONTITLE, &req, NULL /* we are not interested into responses*/); if (result.good()) { DCMNET_INFO("Received study #" << std::setw(7) << studyCount << ": " << studyInstanceUID); studyCount++; } } } study++; } if (result.bad()) { DCMNET_ERROR("Unable to retrieve all studies: " << result.text()); } while (!findResponses.empty()) { delete findResponses.front(); findResponses.pop_front(); } /* Release association */ scu.closeAssociation(DCMSCU_RELEASE_ASSOCIATION); return 0; }
P.S: The header file would be trivial:
#ifndef TESTSCU_H #define TESTSCU_H #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmnet/scu.h" /* Covers most common dcmdata classes */ class DcmTestSCU : public DcmSCU { public: DcmTestSCU() {} ~DcmTestSCU() {} }; #endif // TESTSCU_HNote
sendMOVERequest() and corresponding code was added after the 3.6.0 release. You need to use a current snapshot version in order to compile and run the code.
------------------------------------------------------------------
柳北风儿
发表评论
-
DCMTK: DcmSCP, error:QueryRetrieveLevel larger remaining bytes
2012-11-06 09:48 3019最近在DcmSCU发送一个findRequest后,DcmSC ... -
DICOM标准(2011)
2012-10-22 10:31 2983DICOM标准(2011) 最新版,下载请看我的百度云网 ... -
DCMTK:wwwapp instalation
2012-10-18 15:55 3318问题 最近按照wwwapp.txt安装work ... -
workList in DCMTK问题总结
2012-10-17 19:37 3581最近正在配置DCMTK中的worklist,因为需要响应C-F ... -
web Server支持 perl
2012-10-17 10:06 3400最近使用DCMTK 安装worklist 需要用到webser ... -
DICOM C-GET vs C-MOVE
2012-10-08 17:01 6625DICOM中C-Get 和C-Move的区别。 C-Move ... -
【最新snapshot】DCMTK3.6.1(MD支持库)安装说明
2012-09-25 16:16 7437【前言】 最近,因为需要开发DICOM ... -
【原创】自定义Appender类,输出DCMTK日志
2012-09-24 10:30 5249就像DCMTK官方论坛说的 ... -
问题:自定义Appender输出DCMTK的oflog
2012-09-24 10:09 2835在我调试DCMTK的DcmNet过程中,发现在Oflog中,D ... -
DCMTK:Receiving Images from PACS using DCMSCU
2012-09-15 14:03 5180通过DCMTK的DCMSCU,从PACS获取图像,看看人 ... -
DCMTK: Set output directory to DcmSCP
2012-09-18 09:16 4558Author Message -
DCMTK:DCMSCU get series
2012-09-15 14:02 2782Author Message mano ... -
DCMTK DCMSCU例子
2012-09-15 14:01 5792转载:http://forum.dcmtk.org/viewt ... -
DCMTK DCMScu和DCMScp 细节讨论
2012-09-15 14:04 14419PACS connection Moderator: ... -
DCMTK Howto: User Identity Negotiation
2012-09-18 09:16 6180Howto: User Identity Negotia ... -
DCMTK Create a Mammography CAD SR Document
2012-09-18 09:17 2785Howto: Create a Mammography ... -
DCMTK create GSPS object with multiple image references
2012-09-18 09:17 3013Howto: Create GSPS object wi ... -
DCMTK提取Overlay Data
2012-09-14 14:07 4258Howto: Extract Overlay Data ... -
DCMTK获取压缩后的pixel data
2012-09-14 14:06 6448Howto: Accessing Compressed ... -
DCMTK读取多帧图像,不需要全部读取像素数据,即可处理数据
2012-09-14 14:06 5668Howto: Access multi-frame im ...
相关推荐
标题中的“dcmtk-3.6.5-win64-support-MD-iconv-msvc-15.8.zip”表明这是DCMTK的3.6.5版本,针对Windows 64位操作系统优化,且集成了MD(Multi-threaded DLL)模式下的iconv库,用于字符集转换,并且是用Microsoft ...
标题中的"dcmtk-3.5.4-win32-i386-support.zip"表明这是一个针对32位Windows系统的DCMTK 3.5.4版本的压缩包,包含了支持库和相关工具。描述提到它是“很不错的转换DICOM文件工具”,意味着它可以用于 DICOM 数据的...
专栏博文“DICOM:基于DCMTK实现C-FIND SCU”中对应的源代码。基于dcmtk开源库中的findscu工程,实现的简单的C-FIND SCU,用于示范如何使用dcmtk操作实现具体的DICOM应用。
3. **dcmtk-3.6.5-x64-Release** 和 **dcmtk-3.6.5-x64-Debug**: 这两个子目录分别包含了在64位环境下编译的Release和Debug版本的库文件。Release版本通常用于最终产品部署,因为它经过优化,性能较好;而Debug版本...
标题中的“dcmtk-3.5.4-win32-i386 /MD for vc6”表明这是一个针对Windows 32位平台的DCMTK版本,构建时使用了/MD编译标志,这是Visual Studio 6.0中的一个选项,用于链接多线程DLL版本的C运行时库。这使得生成的库...
- 在"Where to build the binary:"字段填写C:\DCMTK\dcmtk-3.5.4。 - 点击"Configure"按钮,选择"Visual Studio 8 2005",点击OK。 - 根据需要,CMake会自动搜索libxml, libpng等库的路径,你可以根据需求开启要...
dcmtk-basic-example dcmtk-basic-example演示了如何编译,链接和包括 3.6.0工具包,用于开发C ++ 11程序来处理DICOM图像。 该示例是在Ubuntu 14.04上开发和测试的。动机当我想在自己的C ++代码中使用dcmtk库时,我...
* dcmtk-3.6.0-win32-i386-support_MT 将这些文件解压缩到硬盘上一个单独的文件夹下,例如 D:\DCMTK\。 CMAKE 编译 1. 将支持库中的相应 lib 文件、include 文件、bin 文件拷贝到 VS2010 安装目录的相应文件夹下...
这个“dcmtk-3.6.0-win32-i386-support_MD”版本是针对Windows 32位平台的DCMTK支持库,包含了MD(Medical Device)相关的支持。 DICOM是医疗领域广泛采用的数据交换、存储和通信的标准,它定义了如何在不同设备...
dcmtk-3.6.4-win64
PACS开发必备,DICOM开源开发包 dcmtk-3.5.4 dcmtk-3.5.4-win32-help dcmtk-3.5.4-win32-i386 由于上传限制这是第一部门,另一部分为 dcmtk-3.5.4开发包(win32支持文件)
"dcmtk-3.5.3-html-help.zip"是一个压缩包,其中包含了DCMTK 3.5.3版本的HTML帮助文档。这个文档集合为开发者提供了详尽的指导,涵盖了DCMTK库的功能、用法、API参考以及示例代码,帮助开发者理解和使用DCMTK进行 ...
关于`dcmtk-3.6.2-html-help.zip`这个压缩包,根据文件名可以推断,它包含了DCMTK 3.6.2版本的HTML帮助文档。这些文档通常会详细介绍库的各个组件、接口、使用示例以及错误处理等内容,是学习和使用DCMTK的重要参考...
在标题“dcmtk-3.5.3-win32-help.zip_dcmtk_dcmtk-3.5.3”中,我们可以看到这是DCMTK的一个特定版本——3.5.3,且是针对Windows 32位系统的帮助文件。这个压缩包包含了该版本的文档和可能的辅助工具,旨在帮助开发者...
标题中的"dcmtk-3.6.2-win64-support_MD-msvc-15.0.zip"指的是该软件的3.6.2版本,专为Windows 64位操作系统设计,并且支持Microsoft Visual Studio 2017(MSVC 15.0)编译环境。这个压缩包是为那些需要在Windows...
这个压缩包“dcmtk-3.6.1-debug”包含了DCMTK 3.6.1版本的Debug版本的动态库文件。在软件开发中,Debug版本的库文件通常包含额外的调试信息,这些信息对于定位和修复代码中的错误非常有用。相比于Release版本,Debug...
1. 解压提供的`Dcmtk-3.6.7`压缩包。 2. 配置项目的属性页,添加DCMTK库的包含目录(头文件)和库目录(链接库)。 3. 链接所需的DCMTK库文件,这些文件通常位于`lib`子目录下,区分Release和Debug模式。 4. 引用...
dcmtk-3.5.4开发包在win32下的补充资源文件包含: dcmtk-3.5.4-win32-i386-md-support dcmtk-3.5.4-win32-i386-support dcmtk-3.5.4-win32-i386-tls 与dcmtk-3.5.4开发包一起使用
"dcmtk-3.5.4-win32-i386-md-support.zip" 是一个专为Windows 32位平台(i386架构)编译并集成了MD支持的版本。MD支持可能指的是Medical Device(医疗器械)相关的功能或接口,使得该版本更适合在医疗设备环境中使用...
**DCMTK开发库在Windows (Win32-x86)环境下的应用与构建** DCMTK(DICOM ToolKit)是一个开源软件库,专门用于处理DICOM(Digital Imaging and Communications in Medicine)标准数据。DICOM是医疗成像领域广泛采用...