首页 > 解决方案 > fo-dicom C-Move Query 不调用 CStoreRequestCallback

问题描述

var client = new DicomClient();

        var pcs = DicomPresentationContext.GetScpRolePresentationContextsFromStorageUids(
            DicomStorageCategory.Image,
            DicomTransferSyntax.ExplicitVRLittleEndian,
            DicomTransferSyntax.ImplicitVRLittleEndian,
            DicomTransferSyntax.ImplicitVRBigEndian);
        client.AdditionalPresentationContexts.AddRange(pcs);

        DicomDataset dataset = null;
        client.OnCStoreRequest = request =>
        {
            dataset = request.Dataset;
            return new DicomCStoreResponse(request, DicomStatus.Success);
        };

       
        var get = new DicomCMoveRequest(QRServer,
            StudyId,
            SeriesUd);


        var handle = new ManualResetEventSlim();
        get.OnResponseReceived = (request, response) =>
        {
            handle.Set();
        };
        client.AddRequest(get);
        client.Send(ipAddress, 104, false, AEClient, QRServer);
        handle.Wait();
        Thread.Sleep(10000);

在上面的代码片段中,如果 AEClient 和 QRServer 相同/相同 AETitle ,CMoveResponse 成功但没有得到任何 CStoreRequest

如果 AEClient 和 QRServer 不同,则会出现 Move destination Unknown 之类的错误

标签: fo-dicom

解决方案


有几种 DICOM 协议如何请求数据:C-GetC-Move。他们的行为完全不同。请参阅此处的示例以获得很好的解释:https ://saravanansubramanian.com/dicomtutorials/

C-Move 请求告诉服务器将图像发送到新关联中的特定 AETitle(MoveDestination)。所以你必须启动一个新的 StoreSCP 服务器实例来接收图像。因此,服务器当然必须知道 AETitle,因为从 MoveDestination 服务器也必须知道 IP 和端口。

另一方面,C-Get 返回相同 accociation上的数据。在这种情况下,您将调用 OnCStoreRequestCallback。


推荐阅读