Hello,
I did not yet try to set a VOI window, but i'll try as soon as I finished the Query/Retrieve part.
I have two questions :
The first is related to storescp and SCP in general.
I built storescp as a shared library for Android, and used the
dcmscu example to send move requests. It works, but the problem is that I cannot stop the server once I retrieved the study. It results in a background thread that I cannot stop properly.
I would like to start the server each time I want to retrieve a study, but with different parameters (port, output directory).
Is it possible to stop the storeSCP after retrieving a study, for instance using option --exec-on-eostudy ?
I also wanted to implement a c-get request. However it does not work. Here is my code :
--------------
Get.cpp
--------------
Code:
//init scu and JNI stuff...
scu.setACSETimeout(5);
scu.setPacs(jHost, jPort, jPeerAeTitle, jCallingAeTitle);
OFList<OFString> ts;
ts.push_back(UID_LittleEndianExplicitTransferSyntax);
ts.push_back(UID_BigEndianExplicitTransferSyntax);
ts.push_back(UID_LittleEndianImplicitTransferSyntax);
scu.addPresentationContext(UID_GETStudyRootQueryRetrieveInformationModel, ts);
scu.addPresentationContext(UID_VerificationSOPClass, ts);
OFCondition result = scu.initNetwork();
if (result.bad())
{
scu.setLastError(result.text());
scu.closeAssociation(DCMSCU_RELEASE_ASSOCIATION);
return 1;
}
result = scu.negotiateAssociation();
if (result.bad())
{
OFString s("Unable to negotiate association: ");
scu.setLastError(s + result.text());
scu.closeAssociation(DCMSCU_RELEASE_ASSOCIATION);
return 2;
}
T_ASC_PresentationContextID presID = scu.findUncompressedPC(UID_GETStudyRootQueryRetrieveInformationModel);
if (presID == 0)
{
scu.setLastError("There is no uncompressed presentation context for Study Root FIND");
return 3;
}
OFString storageDir = env->GetStringUTFChars(jStorageDir, NULL);
scu.setStorageDir(storageDir);
OFString uid = env->GetStringUTFChars(jUid, NULL);
DcmDataset *req = new DcmDataset;
req->putAndInsertOFStringArray(DCM_QueryRetrieveLevel, "SERIES");
LOGI("%s", uid.c_str());
req->putAndInsertOFStringArray(DCM_SeriesInstanceUID, uid, true);
OFList<RetrieveResponse *> responses;
result = scu.sendCGETRequest(presID, req, &responses);
if (result.bad())
{
scu.setLastError("C-GET request failed");
return 4;
}
scu.closeAssociation(DCMSCU_RELEASE_ASSOCIATION);
return 0;
}
-------
DicomSCU.cpp
The DicomSCU class inherits
DcmSCU-------
Code:
OFCondition DicomSCU::handleCGETResponse(const T_ASC_PresentationContextID presID,
RetrieveResponse *response,
OFBool &continueCGETSession)
{
LOGI("%s", response->m_affectedSOPClassUID.c_str());
LOGI("Failed : %d", response->m_numberOfFailedSubops);
LOGI("Completed : %d", response->m_numberOfCompletedSubops);
LOGI("Remaining : %d", response->m_numberOfRemainingSubops);
return DcmSCU::handleCGETResponse(presID, response, continueCGETSession);
}
LOGI refers to Android Log.
The output is :
Failed : 22
Completed : 0
Remaining : 0
The study I want to retrieve has effectively 22 elements, however the single C-GET response tell me it failed.
How to solve it ? Is it due to a bad presentation context?
Could you provide a C-GET example?
Thanks by Advance
相关推荐
这个源码是移植dcmtk中的存储服务。它依赖于我移植的几个重要的库文件ofstd,dcmdata,dcmnet。这几个库文件是所有服务基本上都要依赖的库。
这是博文《第一个 DCMTK 程序:显示 DICOM 图像(DCMTK 3.6.4 + Qt 5.14.2 + VS2015)》的源码,详细内容见博客文章 https://blog.csdn.net/blackwoodcliff/article/details/109481195
nodejs-dcmtk 基于Nodsjs Alpine和DCMTK的Docker映像
dcmtk dcmtk的目标是包装'DICOM'工具包('DCMTK') 。 移植了医学数字成像和通信('DICOM')工具包的功能集,这是一组处理成像数据的功能。 安装 您可以使用以下方法从安装dcmtk的发行版本: install.packages( ...
名称:DCMTK 评级:★★★★★ 开源许可:BSD 功能: 影像处理,影像归档,影像管理,影像传输 标准:DICOM 语言:英语 客户端: 桌面 平台:跨平台 编程语言:C/C++ 官方网站:http://dicom.offis.de/
DCMTK3.6.3源码:dcmtk-3.6.3.zip 以及英文帮助文档 : dcmtk-3.6.3-html-help.zip
dcmtk使用手册,医学领域的东东,有学习的可以下载看看,没学过,不知道好不好学
DCMTK编译文件说明。DCMTK3.6.0
专栏博文“DICOM:基于DCMTK实现C-FIND SCU”中对应的源代码。基于dcmtk开源库中的findscu工程,实现的简单的C-FIND SCU,用于示范如何使用dcmtk操作实现具体的DICOM应用。
linux 系统下DCMTK3.6.0源码
用dcmtk库做的DIcOM图像显示程序,原创呀
Windows平台下,Qt(5.10)32位环境下编译的dcmtk(3.6.3)库,包含debug和release版
DICOM DCMTK显示DICOM图像 VC DCMTKDICOM DCMTK显示DICOM图像 VC DCMTKDICOM DCMTK显示DICOM图像 VC DCMTK
最全DCMTK攻略.doc
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 dcmtk-3.5.4 source code and documentation
DCMTK的帮助文档:dcmtk-3.5.3-html-help.zip
dcmtk程序包简介,欢迎下载,共同学习!
DCMTK工具下载,实现dicom传输文件等功能,包含各种脚本命令帮助
描述了dcmtk中关键的函数描述,使用举例以及参数描述