【问题标题】:How do I set the AE Title on a server I'm creating?如何在我正在创建的服务器上设置 AE 标题?
【发布时间】:2020-06-04 03:27:10
【问题描述】:

我正在制作一个非常简单的 STORE 服务器,除了回显和接收数据之外,它不打算做任何类似 DICOM 的事情。我从DicomCEchoProvider 继承,并让父类为我完成大部分工作:到目前为止,唯一有计划使用的方法是DicomCStoreResponse()OnCStoreRequestException(),来自IDicomCStoreProvider 接口。

我的测试机器似乎根本不关心 AET,但我不能假设其他所有机器都会如此适应。如何将 AE 标题设置为我选择的内容?

【问题讨论】:

    标签: c# uwp fo-dicom


    【解决方案1】:

    服务器 (SCP) 不发送 AETitle。相反,SCU 通过关联请求(在握手时)发送调用 AET 和被调用 AET。 SCP 的工作是检查这些数据,然后接受或拒绝关联。 如果您没有明确编码,则默认情况下 SCP 接受所有关联。

    查看示例项目 (https://github.com/fo-dicom/fo-dicom-samples/blob/master/Desktop/C-Store%20SCP/Program.cs)。 您必须创建自己的继承自 DicomService 的类,并且在方法 OnReceiveAssociationRequestAsync 中您必须编写类似的代码:

            public Task OnReceiveAssociationRequestAsync(DicomAssociation association)
            {
                // here you can check for the AETitle. You can also handle various AETitles and implement different behaviour depending on the AETitle (thats common in real PACS systems), like storing the files on different drives depending on the called AETitle...
                if (association.CalledAE != "STORESCP")
                {
                    return SendAssociationRejectAsync(
                        DicomRejectResult.Permanent,
                        DicomRejectSource.ServiceUser,
                        DicomRejectReason.CalledAENotRecognized);
                }
    
                foreach (var pc in association.PresentationContexts)
                {
                    if (pc.AbstractSyntax == DicomUID.Verification) pc.AcceptTransferSyntaxes(AcceptedTransferSyntaxes);
                    else if (pc.AbstractSyntax.StorageCategory != DicomStorageCategory.None) pc.AcceptTransferSyntaxes(AcceptedImageTransferSyntaxes);
                }
    
                return SendAssociationAcceptAsync(association);
            }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-18
      • 2011-01-09
      • 2016-07-29
      • 2010-12-10
      • 2016-04-10
      • 1970-01-01
      • 2016-06-15
      相关资源
      最近更新 更多