当关联突然中止时取回 StudyInstanceUID

问题描述

我正在编写一个示例 DICOM SCP 商店。我使用 SCU Store 命令模拟了许多 DCM 文件夹的传输(从另一台连接到我的 LAN 的计算机)。同时模拟 3 次传输。由于未知原因,其中一项传输中止。我试图追踪中止的关联以取回相关的 StudyInstanceUID。这是我的 SCP :

public static long computeMultipleSumsBit(int n) {
    BitSet b= new BitSet();
    int[] factors = {3,5,7};
    for (int f : factors) {
        for (int i = 1; i < (n+(f-1))/f; i++) {
            b.set(f*i); // set the ith position of f
        }
    }
    return b.stream().mapToLong(a->a).sum();
}

我在association.py中找到了相关消息,但有机会获得中止的dataset.StudyInstanceUID:

from pynetdicom import AE,debug_logger,AllStoragePresentationContexts,evt

debug_logger()

def handle_store(event):
    """Handle EVT_C_STORE events."""
    ds = event.dataset
    ds.file_Meta = event.file_Meta

    return 0x0000

handlers = [(evt.EVT_C_STORE,handle_store)]

ae = AE()
# Unlimited PDU size
ae.maximum_pdu_size = 0
#ae.add_supported_context
ae.supported_contexts = AllStoragePresentationContexts
ae.start_server(('',11112),block=True,evt_handlers=handlers)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...