最近在DcmSCU发送一个findRequest后,DcmSCP总是报一个错误:

hi, all.

when i send a findRequest in DcmSCU, it will be successful to receive response.
but then the DcmServer will take place an error, as follows.

Quote:
"2012-11-03 16:12:25.758 INFO: Sending C-Find Response" 
"2012-11-03 16:12:27.795 DEBUG: C-FIND Response successfully sent" 
"2012-11-03 16:12:29.678 DEBUG: DcmDataset::read() TransferSyntax="Little Endian Implicit"" 
"2012-11-03 16:12:29.678 WARN: DcmItem: Length of element (0008,0052) is odd" 
"2012-11-03 16:12:29.679 ERROR: DcmElement: QueryRetrieveLevel (0008,0052) larger (414531) than remaining bytes (20) in file, premature end of stream" 
"2012-11-03 16:12:29.679 DEBUG: DIMSE Error, detail (if available): 0006:020d DIMSE: receiveCommand: cmdSet->read() Failed2012-11-03 16:12:29.679 DEBUG: 0001:0004 Invalid stream" 
"2012-11-03 16:12:59.681 DEBUG: DcmSCP: Association Terminated" 
"2012-11-03 16:12:59.681 DEBUG: +++++++++++++++++++++++++++++

最后的解决方法是:

I have found the anwser Something about the findscu tool

we should implement the callback function to set response->DimseStatus=STATUS_Success;

Code:
typedef void (*DIMSE_FindProviderCallback)(
        /* in */
        void *callbackData,
        OFBool cancelled, T_DIMSE_C_FindRQ *request,
        DcmDataset *requestIdentifiers, int responseCount,
        /* out */
        T_DIMSE_C_FindRSP *response,
        DcmDataset **responseIdentifiers,
        DcmDataset **statusDetail);

DCMTK_DCMNET_EXPORT OFCondition
DIMSE_findProvider(
        /* in */
        T_ASC_Association *assoc,
        T_ASC_PresentationContextID presIdCmd,
        T_DIMSE_C_FindRQ *request,
        DIMSE_FindProviderCallback callback, void *callbackData,
        /* blocking info for data set */
        T_DIMSE_BlockingMode blockMode, int timeout);

my callBack function:

Code:
void FindProviderCallback(
   /* in */ 
   void *callbackData,  
   OFBool cancelled, T_DIMSE_C_FindRQ *request, 
   DcmDataset *requestIdentifiers, int responseCount,
   /* out */
   T_DIMSE_C_FindRSP *response,
   DcmDataset **responseIdentifiers,
   DcmDataset **statusDetail)
{
   if (responseCount>1)
   {
      //*responseIdentifiers=NULL;
      response->DimseStatus=STATUS_Success;
   }
   else   
   {
      if(request->DataSetType==DIMSE_DATASET_PRESENT) //or some other conditions are met
         *responseIdentifiers=new DcmDataset(*requestIdentifiers);     
   }
}

Thanks all.

DCMTK: DcmSCP, error:QueryRetrieveLevel larger remaining bytes相关推荐

  1. Python——CSV读取大文件报错_csv.Error: field larger than field limit

    Python--CSV读取大文件报错_csv.Error: field larger than field limit 使用Python读取较大的csv文件时,可能出现大字段,导致超过字段默认限制,从 ...

  2. [php错误]PHP中Notice: unserialize(): Error at offset of bytes in on line 的解决方法

    2019独角兽企业重金招聘Python工程师标准>>> php 5.5以前 function mb_unserialize($serial_str) { return preg_re ...

  3. _csv.Error: field larger than field limit (131072)

    import csv csv.field_size_limit(500 * 1024 * 1024)

  4. linux SPI驱动开发

    一,linux内核设备驱动分三类 1,字符设备驱动:按字节来访问设备,字符驱动负责驱动字符设备,这样的驱动通常实现open,close,read,write系统调用. 特点:操作的硬件,按照字节流形式 ...

  5. Linux candence spi驱动理解

    本文测试平台为zedboard,使用PS端SPI外设.根据wiki_xilinx中的说明,此驱动为 candence_spi.c ,现对此驱动程序做一个简单的分析.wiki_xilinx 中 SPI ...

  6. [已解决] InnoDB: preallocating bytes for file ./ibdata1 failed with error

    Docker 中的 Alpine 初始化数据库 docker exec cmdb3 mysql_install_db --user=root 复制代码 时报错 : 2018-07-21 14:00:2 ...

  7. mysql 100600_MySQL ERROR 1034: Incorrect Key File on InnoDB Table

    Sometimes, you may experience "ERROR 1034: Incorrect key file" while running the ALTER TAB ...

  8. golang bytes.buffer 字节缓冲器 简介

    目录 创建 Buffer缓冲器 NewBuffer NewBufferString 向 Buffer 中写入数据 Write WriteString WriteByte WriteRune 完整示例 ...

  9. golang的bytes.buffer

    参考原文:go语言的bytes.buffer 一.创建缓冲期 bytes.buffer是一个缓冲byte类型的缓冲器 1.使用bytes.NewBuffer创建:参数是[]byte的话,缓冲器里就是这 ...

最新文章

  1. 语音变音调和加速减速
  2. MySQL(11)数据库实现高可用架构之MMM
  3. JavaScript学习笔记系列2:Dom操作(一)
  4. 说一下现在比较火的创业项目
  5. 2017乌鲁木齐ICPC: K. Sum of the Line(容斥)
  6. 网络编程基础概念-网络协议
  7. BERT源码分析(二)
  8. 3229: 硬币组合
  9. 斗兽棋 java_GitHub - java-a/project1: 基于命令行的斗兽棋
  10. 统计学之离散指标(全距、内距、异众比率、平均差与标准差)
  11. HuffMan编码C语言实现
  12. linux的ping命令含义,Linux ping命令详解
  13. html怎么给图片加密,实现图片加密
  14. python网络爬虫——爬取嗅事百科
  15. 国产操作系统——中科方德桌面操作系统
  16. .NET开源工作流RoadFlow-流程设计-流程步骤设置-策略设置
  17. BT profile
  18. qt -- 字符串加密
  19. OpenJDK System.loadLibrary源码剖析
  20. 使用决策树和随机森林预测NBA获胜球队

热门文章

  1. And Design:拓荒笔记——Form表单
  2. 2018.11.04 洛谷P1081 开车旅行(倍增)
  3. 位带操作全解释,个人觉得不错就转过来理解下
  4. 每天备份NAS上的www目录到一块单独的硬盘上
  5. jsonArray:JavaBean,List,Map转成json格式(轉+整理)
  6. Developer Express 之 XtraReport如何动态绑定数据
  7. 年轻人不讲武德不仅白piao接口测试知识还白piao接口测试工具会员
  8. 接口测试如何在post请求中传递文件
  9. Python 字符串(二)
  10. 接口 对象 = new 实现类 与 实现类 对象= new 实现类