Ejemplo n.º 1
2
        public async Task SendAsync_SingleRequest_DataSufficientlyTransported()
        {
            int port = Ports.GetNext();
            using (new DicomServer<SimpleCStoreProvider>(port))
            {
                DicomDataset command = null, dataset = null;
                var request = new DicomCStoreRequest(@".\Test Data\CT1_J2KI");
                request.OnResponseReceived = (req, res) =>
                {
                    command = request.Command;
                    dataset = request.Dataset;
                };

                var client = new DicomClient();
                client.AddRequest(request);

                await client.SendAsync("127.0.0.1", port, false, "SCU", "ANY-SCP");

                var commandField = command.Get<ushort>(DicomTag.CommandField);
                Assert.Equal((ushort)1, commandField);

                var modality = dataset.Get<string>(DicomTag.Modality);
                Assert.Equal("CT", modality);
            }
        }
Ejemplo n.º 2
1
 private void CStoreTask(object state)
 {
     Interlocked.Increment(ref index);
     string file = (string)state;
     DicomCStoreRequest cstoreReq = new DicomCStoreRequest(file);
     DicomClient client = new DicomClient();
     client.AddRequest(cstoreReq);
     client.Send("127.0.0.1", 104, false, string.Format("ZSSURE_{0}",index), "STORESCP");
 }
        public async Task OnCStoreRequestAsync_PreferedTransfersyntax()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <AsyncDicomCStoreProviderPreferingUncompressedTS>(port, logger: _logger.IncludePrefix("DicomServer")))
            {
                var client = new Client.DicomClient("127.0.0.1", port, false, "SCU", "ANY-SCP")
                {
                    Logger = _logger.IncludePrefix(typeof(DicomClient).Name)
                };

                int numberOfContexts           = 0;
                DicomTransferSyntax accpetedTS = null;
                // create a request with a jpeg-encoded file
                var request = new DicomCStoreRequest(@"./Test Data/CT1_J2KI");
                client.AssociationAccepted += (sender, e) =>
                {
                    numberOfContexts = e.Association.PresentationContexts.Count;
                    accpetedTS       = e.Association.PresentationContexts.First().AcceptedTransferSyntax;
                };
                await client.AddRequestAsync(request).ConfigureAwait(false);

                await client.SendAsync().ConfigureAwait(false);

                Assert.Equal(2, numberOfContexts); // one for the jpeg2k TS and one for the mandatory ImplicitLittleEndian
                Assert.Equal(DicomTransferSyntax.JPEG2000Lossy, accpetedTS);
            }
        }
        public async Task OnCStoreRequestAsync_ShouldRespond()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <AsyncDicomCStoreProvider>(port, logger: _logger.IncludePrefix("DicomServer")))
            {
                var client = new Client.DicomClient("127.0.0.1", port, false, "SCU", "ANY-SCP")
                {
                    Logger = _logger.IncludePrefix(typeof(DicomClient).Name)
                };

                DicomCStoreResponse             response = null;
                DicomRequest.OnTimeoutEventArgs timeout  = null;
                var request = new DicomCStoreRequest(@"./Test Data/10200904.dcm")
                {
                    OnResponseReceived = (req, res) => response = res,
                    OnTimeout          = (sender, args) => timeout = args
                };

                await client.AddRequestAsync(request).ConfigureAwait(false);

                await client.SendAsync().ConfigureAwait(false);

                Assert.NotNull(response);
                Assert.Equal(DicomStatus.Success, response.Status);
                Assert.Null(timeout);
            }
        }
Ejemplo n.º 5
0
        public async Task Send_SingleRequest_DataSufficientlyTransported()
        {
            int port = Ports.GetNext();

            using (DicomServer.Create <SimpleCStoreProvider>(port))
            {
                DicomDataset command = null, dataset = null;
                var          request = new DicomCStoreRequest(@".\Test Data\CT1_J2KI");
                request.OnResponseReceived = (req, res) =>
                {
                    command = request.Command;
                    dataset = request.Dataset;
                };

                var client = new Network.Client.DicomClient("127.0.0.1", port, false, "SCU", "ANY-SCP");
                await client.AddRequestAsync(request).ConfigureAwait(false);

                await client.SendAsync().ConfigureAwait(false);

                var commandField = command.Get <ushort>(DicomTag.CommandField);
                Assert.Equal((ushort)1, commandField);

                var modality = dataset.Get <string>(DicomTag.Modality);
                Assert.Equal("CT", modality);
            }
        }
        public async Task AcceptStoreContexts()
        {
            int port = Ports.GetNext();

            using (DicomServer.Create <AcceptOnlyEchoStoreProvider>(port))
            {
                var         echoReq    = new DicomCEchoRequest();
                DicomStatus echoStatus = DicomStatus.Pending;
                echoReq.OnResponseReceived += (req, resp) => echoStatus = resp.Status;

                var         storeReq    = new DicomCStoreRequest(@".\Test Data\CT1_J2KI");
                DicomStatus storeStatus = DicomStatus.Pending;
                storeReq.OnResponseReceived += (req, resp) => storeStatus = resp.Status;

                var         filmSession = new FilmSession(DicomUID.BasicFilmSession, DicomUID.Generate());
                var         printReq    = new DicomNCreateRequest(filmSession.SOPClassUID, filmSession.SOPInstanceUID);
                DicomStatus printStatus = DicomStatus.Pending;
                printReq.OnResponseReceived += (req, resp) => printStatus = resp.Status;

                var client = new Client.DicomClient("127.0.0.1", port, false, "SCU", "ANY-SCP");
                await client.AddRequestsAsync(echoReq, storeReq, printReq);

                await client.SendAsync();

                Assert.Equal(DicomStatus.Success, echoStatus);
                Assert.Equal(DicomStatus.Success, storeStatus);
                Assert.Equal(DicomStatus.SOPClassNotSupported, printStatus);
            }
        }
 public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
 {
     return(new DicomCStoreResponse(request, DicomStatus.Success)
     {
         Dataset = request.Dataset
     });
 }
Ejemplo n.º 8
0
        public void Send_PrivateRegisteredSOPClass_SendSucceeds()
        {
            var uid = new DicomUID("1.1.1.1", "Private Fo-Dicom Storage", DicomUidType.SOPClass);

            DicomUID.Register(uid);
            var ds = new DicomDataset(
                new DicomUniqueIdentifier(DicomTag.SOPClassUID, uid),
                new DicomUniqueIdentifier(DicomTag.SOPInstanceUID, "1.2.3.4.5"));

            var port = Ports.GetNext();

            using (DicomServer.Create <SimpleCStoreProvider>(port))
            {
                DicomStatus status  = null;
                var         request = new DicomCStoreRequest(new DicomFile(ds))
                {
                    OnResponseReceived = (req, res) => status = res.Status
                };

                var client = new DicomClient();
                client.AddRequest(request);

                client.Send("127.0.0.1", port, false, "SCU", "ANY-SCP");

                Assert.Equal(DicomStatus.Success, status);
            }
        }
Ejemplo n.º 9
0
        public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
        {
            var tempName = Path.GetTempFileName();

            Console.WriteLine(tempName);
            request.File.Save(tempName);

            return(new DicomCStoreResponse(request, DicomStatus.Success));
        }
Ejemplo n.º 10
0
        public void Old_Send_PrivateTags_DataSufficientlyTransported()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <SimpleCStoreProvider>(port))
            {
                DicomDataset command = null, requestDataset = null, responseDataset = null;
                var          request = new DicomCStoreRequest(new DicomDataset
                {
                    { DicomTag.CommandField, (ushort)DicomCommandField.CStoreRequest },
                    { DicomTag.AffectedSOPClassUID, DicomUID.CTImageStorage },
                    { DicomTag.MessageID, (ushort)1 },
                    { DicomTag.AffectedSOPInstanceUID, "1.2.3" },
                });

                var privateCreator = DicomDictionary.Default.GetPrivateCreator("Testing");
                var privTag1       = new DicomTag(4013, 0x008, privateCreator);
                var privTag2       = new DicomTag(4013, 0x009, privateCreator);
                DicomDictionary.Default.Add(new DicomDictionaryEntry(privTag1, "testTag1", "testKey1", DicomVM.VM_1, false, DicomVR.CS));
                DicomDictionary.Default.Add(new DicomDictionaryEntry(privTag2, "testTag2", "testKey2", DicomVM.VM_1, false, DicomVR.CS));

                request.Dataset = new DicomDataset();
                request.Dataset.Add(DicomTag.Modality, "CT");
                request.Dataset.Add(privTag1, "TESTA");
                request.Dataset.Add(new DicomCodeString(privTag2, "TESTB"));
                //{
                //    { DicomTag.Modality, "CT" },
                //    new DicomCodeString(privTag1, "test1"),
                //    { privTag2, "test2" },
                //};

                request.OnResponseReceived = (req, res) =>
                {
                    command         = req.Command;
                    requestDataset  = req.Dataset;
                    responseDataset = res.Dataset;
                };

                var client = new DicomClient();
                client.AddRequest(request);

                client.Send("127.0.0.1", port, false, "SCU", "ANY-SCP");

                Assert.Equal((ushort)1, command.Get <ushort>(DicomTag.CommandField));

                Assert.Equal("CT", requestDataset.Get <string>(DicomTag.Modality));
                Assert.Equal("TESTB", requestDataset.Get <string>(privTag2, null));
                Assert.Equal("TESTA", requestDataset.Get <string>(privTag1, null));

                Assert.Equal("CT", responseDataset.Get <string>(DicomTag.Modality));
                // Assert.Equal("test1", responseDataset.Get<DicomCodeString>(privTag1).Get<string>());
                Assert.Equal("TESTB", responseDataset.Get <string>(privTag2, -1, null));
                Assert.Equal("TESTA", responseDataset.Get <string>(privTag1, null));
            }
        }
Ejemplo n.º 11
0
        public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
        {
            var tempName = Path.GetTempFileName();

            Logger.Info(tempName);
            request.File.Save(tempName);

            return(new DicomCStoreResponse(request, DicomStatus.Success)
            {
                Dataset = request.Dataset
            });
        }
Ejemplo n.º 12
0
        public void Can_create_request_from_invalid_DicomFile()
        {
            var file = new DicomFile();

            file.Dataset.ValidateItems = false;
            file.Dataset.Add(DicomTag.SOPClassUID, DicomUID.CTImageStorage);
            file.Dataset.Add(new DicomUniqueIdentifier(DicomTag.SOPInstanceUID, "1.2.3.04"));
            file.Dataset.ValidateItems = true;


            var request = new DicomCStoreRequest(file);

            Assert.NotNull(request);
        }
Ejemplo n.º 13
0
        public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
        {

            DicomFile file = request.File;

            //call anonymization method
            //update crosswalk (might be part of anonymization)
            //send file to host
            DicomSender send = new DicomSender("10.7.201.228",5000, "TONY", "AE_TITLE");
            send.sendDicom(file);
            
            MessageBox.Show("recieved dicom file: " + file.Dataset.Get<String>(DicomTag.DateTime));
            return new DicomCStoreResponse(request, DicomStatus.Success);

        }
Ejemplo n.º 14
0
        public void Send_FromIpv6ToIpv4AnyListenerKnownSOPClass_SendFails()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <SimpleCStoreProvider>(NetworkManager.IPv4Any, port))
            {
                var request = new DicomCStoreRequest(@".\Test Data\CT-MONO2-16-ankle");

                var client = new DicomClient();
                client.AddRequest(request);

                var exception = Record.Exception(() => client.Send(NetworkManager.IPv6Loopback, port, false, "SCU", "ANY-SCP"));

                Assert.IsAssignableFrom <SocketException>(exception);
            }
        }
Ejemplo n.º 15
0
			public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request) {
				var studyUid = request.Dataset.Get<string>(DicomTag.StudyInstanceUID);
				var instUid = request.SOPInstanceUID.UID;

				var path = Path.GetFullPath(Program.StoragePath);
				path = Path.Combine(path, studyUid);

				if (!Directory.Exists(path))
					Directory.CreateDirectory(path);

				path = Path.Combine(path, instUid) + ".dcm";

				request.File.Save(path);

				return new DicomCStoreResponse(request, DicomStatus.Success);
			}
Ejemplo n.º 16
0
        public void Send_ToExplicitOnlyProvider_NotAccepted()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <ExplicitLECStoreProvider>(port))
            {
                var request = new DicomCStoreRequest(@"./Test Data/CR-MONO1-10-chest");

                var client = new DicomClient();
                client.AddRequest(request);

                var exception = Record.Exception(() => client.Send("127.0.0.1", port, false, "SCU", "ANY-SCP"));

                Assert.IsType <DicomAssociationRejectedException>(exception);
            }
        }
Ejemplo n.º 17
0
        public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
        {
            var tempName = Path.GetTempFileName();

            Logger.Info(tempName);

            // as the incoming file could be not-valid
            request.File.Dataset.ValidateItems      = false;
            request.File.FileMetaInfo.ValidateItems = false;

            request.File.Save(tempName);

            return(new DicomCStoreResponse(request, DicomStatus.Success)
            {
                Dataset = request.Dataset
            });
        }
Ejemplo n.º 18
0
        public void Send_Ipv6AnyListenerKnownSOPClass_SendSucceeds()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <SimpleCStoreProvider>(NetworkManager.IPv6Any, port))
            {
                DicomStatus status  = null;
                var         request = new DicomCStoreRequest(@".\Test Data\CT-MONO2-16-ankle");
                request.OnResponseReceived = (req, res) =>
                { status = res.Status; };

                var client = new DicomClient();
                client.AddRequest(request);

                client.Send(NetworkManager.IPv6Loopback, port, false, "SCU", "ANY-SCP");

                Assert.Equal(DicomStatus.Success, status);
            }
        }
Ejemplo n.º 19
0
 public FoDicomNetwork.DicomCStoreResponse OnCStoreRequest(FoDicomNetwork.DicomCStoreRequest request)
 {
     try
     {
         _logger?.Log(LogLevel.Information, "Transfer syntax used: {0}", request.TransferSyntax);
         _associationDataProvider.HandleCStoreRequest(request, Association.CalledAE, _associationId);
         return(new FoDicomNetwork.DicomCStoreResponse(request, FoDicomNetwork.DicomStatus.Success));
     }
     catch (System.IO.IOException ex) when((ex.HResult & 0xFFFF) == 0x27 || (ex.HResult & 0xFFFF) == 0x70)
     {
         _logger?.Log(LogLevel.Error, "Failed to process C-STORE request, out of storage space: {ex}", ex);
         return(new FoDicomNetwork.DicomCStoreResponse(request, FoDicomNetwork.DicomStatus.ResourceLimitation));
     }
     catch (Exception ex)
     {
         _logger?.Log(LogLevel.Error, "Failed to process C-STORE request: {ex}", ex);
         return(new FoDicomNetwork.DicomCStoreResponse(request, FoDicomNetwork.DicomStatus.ProcessingFailure));
     }
 }
Ejemplo n.º 20
0
        public void Send_PrivateNotRegisteredSOPClass_SendFails()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <SimpleCStoreProvider>(port))
            {
                DicomStatus status  = null;
                var         request = new DicomCStoreRequest(@".\Test Data\GH355.dcm");
                request.OnResponseReceived = (req, res) =>
                { status = res.Status; };

                var client = new DicomClient();
                client.AddRequest(request);

                client.Send("127.0.0.1", port, false, "SCU", "ANY-SCP");

                Assert.Equal(DicomStatus.SOPClassNotSupported, status);
            }
        }
Ejemplo n.º 21
0
        public void Send_KnownSOPClass_SendSucceeds()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <SimpleCStoreProvider>(port))
            {
                DicomStatus status  = null;
                var         request = new DicomCStoreRequest(@".\Test Data\CT-MONO2-16-ankle")
                {
                    OnResponseReceived = (req, res) => status = res.Status
                };

                var client = new DicomClient();
                client.AddRequest(request);

                client.Send("127.0.0.1", port, false, "SCU", "ANY-SCP");

                Assert.Equal(DicomStatus.Success, status);
            }
        }
Ejemplo n.º 22
0
        public void Send_PrivateRegisteredSOPClass_SendSucceeds()
        {
            var uid = new DicomUID("1.3.46.670589.11.0.0.12.1", "Private MR Spectrum Storage", DicomUidType.SOPClass);

            DicomUID.Register(uid);

            var port = Ports.GetNext();

            using (DicomServer.Create <SimpleCStoreProvider>(port))
            {
                DicomStatus status  = null;
                var         request = new DicomCStoreRequest(@".\Test Data\GH355.dcm");
                request.OnResponseReceived = (req, res) =>
                { status = res.Status; };

                var client = new DicomClient();
                client.AddRequest(request);

                client.Send("127.0.0.1", port, false, "SCU", "ANY-SCP");

                Assert.Equal(DicomStatus.Success, status);
            }
        }
Ejemplo n.º 23
0
 public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
 {
     return(new DicomCStoreResponse(request, DicomStatus.Success));
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Callback for handling a client related C-STORE request, typically emanating from the client's C-GET request.
 /// </summary>
 /// <param name="request">
 /// C-STORE request.
 /// </param>
 /// <returns>
 /// The <see cref="DicomCStoreResponse"/> related to the C-STORE <paramref name="request"/>.
 /// </returns>
 public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
 {
     return this.client.OnCStoreRequest == null
                ? new DicomCStoreResponse(request, DicomStatus.StorageStorageOutOfResources)
                : this.client.OnCStoreRequest(request);
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Initializes DICOM C-Store response to be returned to SCU.
 /// </summary>
 /// <param name="request">DICOM C-Store request being responded to</param>
 /// <param name="status">Status result of the C-Store operation</param>
 public DicomCStoreResponse(DicomCStoreRequest request, DicomStatus status) : base(request, status)
 {
 }
Ejemplo n.º 26
0
 public DicomCStoreResponse(DicomCStoreRequest request, DicomStatus status)
     : base(request, status)
 {
 }
 public async Task <DicomCStoreResponse> OnCStoreRequestAsync(DicomCStoreRequest request)
 {
     return(new DicomCStoreResponse(request, DicomStatus.Success));
 }
Ejemplo n.º 28
0
 public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
 {
     return new DicomCStoreResponse(request, DicomStatus.Success);
 }
Ejemplo n.º 29
0
 public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
 {
     var path = Settings.Default.GetStoragePath(Association.CalledAE);
     SaveDicomToFile(request.Dataset, path, request.File, Settings.Default.GetServerOptions(Association.CalledAE));
     return new DicomCStoreResponse(request, DicomStatus.Success);
 }
Ejemplo n.º 30
0
 public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
 {
     //to do yourself
     //实现自定义的存储方案
     if (OnCStoreRequestCallBack != null)
     {
         return OnCStoreRequestCallBack(request);
     }
     return new DicomCStoreResponse(request, DicomStatus.NoSuchActionType);
 }
Ejemplo n.º 31
0
 /// <inheritdoc />
 public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
 {
     return(_client.OnCStoreRequest == null
                ? new DicomCStoreResponse(request, DicomStatus.StorageStorageOutOfResources)
                : _client.OnCStoreRequest(request));
 }
Ejemplo n.º 32
0
            public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
            {
                var tempName = Path.GetTempFileName();
                Console.WriteLine(tempName);
                request.File.Save(tempName);

                return new DicomCStoreResponse(request, DicomStatus.Success);
            }
Ejemplo n.º 33
0
        /// <summary>
        /// Raised when C-STORE request is received.
        /// </summary>
        /// <param name="request">Received C-STORE request</param>
        /// <returns>Response of the store to the request</returns>
        public DicomCStoreResponse OnCStoreRequest(DicomCStoreRequest request)
        {
            var studyUid = request.Dataset.Get<string>(DicomTag.StudyInstanceUID);
            var instanceUid = request.SOPInstanceUID.UID;

            using (var stream = mDownloadAction(studyUid, instanceUid))
            {
                request.File.Save(stream);
            }
              
            return new DicomCStoreResponse(request, DicomStatus.Success);
        }
Ejemplo n.º 34
0
        public virtual IEnumerable<DicomCMoveResponse> OnCMoveRequest(DicomCMoveRequest request)
        {
            DicomStatus status = DicomStatus.Success;
            IList<DicomCMoveResponse> rsp = new List<DicomCMoveResponse>();
            /*----to do------*/
            //添加查询数据库的代码,即根据request的条件提取指定的图像
            //然后将图像信息添加到rsp响应中

            //创建C-STORE-SCU,发起C-STORE-RQ
            IList<DicomDataset> queries;
            DicomClient clt = new DicomClient();

            if (OnZSCMoveRequest != null)
            {
                queries = OnZSCMoveRequest(request);
                if (queries != null)
                {
                    Logger.Info("需要发送{0}个数据", queries.Count);
                    int len = queries.Count;
                    int cnt = 0;
                    foreach (var item in queries)
                    {
                        //zssure:
                        //取巧的方法直接利用request来构造response中相同的部分
                        //这部分与mDCM方式很不同
                        var studyUid = item.Get<string>(DicomTag.StudyInstanceUID);
                        var instUid = item.Get<string>(DicomTag.SOPInstanceUID);
                        //需要在c:\cmovetest目录下手动添加C-MOVE SCU请求的图像
                        //本地构造的目录结构为,
                        //      c:\cmovetest\12\0.dcm
                        //      c:\cmovetest\12\1.dcm
                        //      c:\cmovetest\12\2.dcm
                        var path = Path.GetFullPath(@"c:\cmovetest");

                        try
                        {
                            path = Path.Combine(path, studyUid);
                            if (!Directory.Exists(path))
                                Directory.CreateDirectory(path);
                            path = Path.Combine(path, instUid) + ".dcm";
                            DicomCStoreRequest cstorerq = new DicomCStoreRequest(path);
                            cstorerq.OnResponseReceived = (rq, rs) =>
                            {
                                if (rs.Status != DicomStatus.Pending)
                                {

                                }
                                if (rs.Status == DicomStatus.Success)
                                {
                                    DicomCMoveResponse rsponse = new DicomCMoveResponse(request, DicomStatus.Pending);
                                    rsponse.Remaining = --len;
                                    rsponse.Completed = ++cnt;
                                    rsponse.Warnings = 0;
                                    rsponse.Failures = 0;
                                    //zssure:2014-12-24
                                    //修复发送C-MOVE-RSP的逻辑错误
                                    SendResponse(rsponse);
                                    //rsp.Add(rsponse);
                                    //zssure:end

                                }

                            };
                            clt.AddRequest(cstorerq);
                            //注意:这里给出的IP地址与C-MOVE请求的IP地址相同,意思就是说C-MOVE SCP需要向C-MOVE SCU发送C-STORE-RQ请求
                            //将查询到的图像返回给C-MOVE SCU
                            //所以四尺C-STORE-RQ中的IP地址与C-MOVE SCU相同,但是端口不同,因为同一个端口不能被绑定多次。
                            clt.Send("127.0.0.1", 22345, false, this.Association.CalledAE, request.DestinationAE);

                        }
                        catch (System.Exception ex)
                        {
                            DicomCMoveResponse rs = new DicomCMoveResponse(request, DicomStatus.StorageStorageOutOfResources);
                            rsp.Add(rs);
                            return rsp;

                        }
                    }
                    //zssure:
                    //发送完成后统一返回C-MOVE RESPONSE 
                    //貌似响应流程有问题,有待进一步核实
                    //注意,如果最后为发送DicomStatus.Success消息,TCP连接不会释放,浪费资源
                    rsp.Add(new DicomCMoveResponse(request, DicomStatus.Success));
                    return rsp;

                }
                else
                {
                    rsp.Add(new DicomCMoveResponse(request, DicomStatus.NoSuchObjectInstance));
                    return rsp;

                }

            }
            rsp.Add(new DicomCMoveResponse(request, DicomStatus.NoSuchObjectInstance));
            return rsp;

        }