• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Network.DicomClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ClearCanvas.Dicom.Network.DicomClient的典型用法代码示例。如果您正苦于以下问题:C# DicomClient类的具体用法?C# DicomClient怎么用?C# DicomClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DicomClient类属于ClearCanvas.Dicom.Network命名空间,在下文中一共展示了DicomClient类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnReceiveResponseMessage

        public override void OnReceiveResponseMessage(DicomClient client, ClientAssociationParameters association, byte presentationID, ClearCanvas.Dicom.DicomMessage message)
        {
            base.OnReceiveResponseMessage(client, association, presentationID, message);

            if (message.Status.Status == DicomState.Warning)
            {
                DicomStatus status = DicomStatuses.LookupQueryRetrieve(message.Status.Code);
                _errorDescriptionDetails = String.Format("Remote server returned a warning status ({0}: {1}).",
                     RemoteAE, status.Description);
            }
        }
开发者ID:nhannd,项目名称:Xian,代码行数:11,代码来源:ImageViewerMoveScu.cs


示例2: Query

        public void Query(string remoteAE, string remoteHost, int remotePort)
        {

            IPAddress addr = Dns.GetHostAddresses(remoteHost)[0];
            ClientAssociationParameters _assocParams = new ClientAssociationParameters(AETitle, remoteAE, new IPEndPoint(addr, remotePort));

            byte pcid = _assocParams.AddPresentationContext(SopClass.StudyRootQueryRetrieveInformationModelFind);
            _assocParams.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian);
            _assocParams.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian);

            _dicomClient = DicomClient.Connect(_assocParams, this);

        }
开发者ID:nhannd,项目名称:Xian,代码行数:13,代码来源:CFindSCU.cs


示例3: OnReceiveAssociateAccept

        public void OnReceiveAssociateAccept(DicomClient client, ClientAssociationParameters association)
        {
            if (_type == TestTypes.AssociationReject)
            {
                Assert.Fail("Unexpected negotiated association on reject test.");
            }
            else if (_type == TestTypes.SendMR)
            {
                DicomMessage msg = new DicomMessage();

                _test.SetupMR(msg.DataSet);
                byte id = association.FindAbstractSyntaxWithTransferSyntax(msg.SopClass, TransferSyntax.ExplicitVrLittleEndian);

                client.SendCStoreRequest(id, client.NextMessageID(), DicomPriority.Medium, msg);
            }
            else
            {
                Assert.Fail("Unexpected test type");
            }
        }
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:20,代码来源:AssociationTests.cs


示例4: Verify

        /// <summary>
        /// Sends verification request to specified Remote Dicom Host.
        /// </summary>
        /// <param name="clientAETitle"></param>
        /// <param name="remoteAE"></param>
        /// <param name="remoteHost"></param>
        /// <param name="remotePort"></param>
        /// <returns></returns>
        public VerificationResult Verify(string clientAETitle, string remoteAE, string remoteHost, int remotePort)
        {
            if (_dicomClient == null)
            {
                // TODO: Dispose...
                _dicomClient = null;
            }

            Logger.LogInfo("Preparing to connect to AE {0} on host {1} on port {2} for verification.", remoteAE, remoteHost, remotePort);
            try
            {
                IPAddress addr = null;
                foreach (IPAddress dnsAddr in Dns.GetHostAddresses(remoteHost))
                    if (dnsAddr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
                    {
                        addr = dnsAddr;
                        break;
                    }
                if (addr == null)
                {
                    Logger.LogError("No Valid IP addresses for host {0}", remoteHost);
                    _verificationResult = VerificationResult.Failed;
                }
                else
                {
                    _assocParams = new ClientAssociationParameters(clientAETitle, remoteAE, new IPEndPoint(addr, remotePort));

                    SetPresentationContexts();

                    _verificationResult = VerificationResult.Failed;
                    _dicomClient = DicomClient.Connect(_assocParams, this);
                    ProgressEvent.WaitOne();
                }
            }
            catch (Exception e)
            {
                Logger.LogErrorException(e, "Unexpected exception trying to connect to Remote AE {0} on host {1} on port {2}", remoteAE, remoteHost, remotePort);
            }
            return _verificationResult;
        }
开发者ID:khaha2210,项目名称:radio,代码行数:48,代码来源:VerificationScu.cs


示例5: OnReceiveRequestMessage

 public void OnReceiveRequestMessage(DicomClient client, ClientAssociationParameters association, byte presentationID, DicomMessage message)
 {
     Assert.Fail("Incorrectly received OnReceiveRequestMessage callback");
 }
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:4,代码来源:AssociationTests.cs


示例6: OnReceiveResponseMessage

        public void OnReceiveResponseMessage(DicomClient client, ClientAssociationParameters association, byte presentationID, DicomMessage message)
        {
            if (message.Status.Status != DicomState.Success)
            {
                Logger.LogError("Failure status received in sending C-STORE: {0}", message.Status.Description);
            }

            bool ok = false;
            while (ok == false)
            {
                _fileListIndex++;
                if (_fileListIndex >= _fileList.Count)
                {
                    Logger.LogInfo("Completed sending C-STORE-RQ messages, releasing association.");
                    client.SendReleaseRequest();
                    return;
                }

                ok = SendCStore(client, association);
            }
        }
开发者ID:khaha2210,项目名称:radio,代码行数:21,代码来源:StorageScu.cs


示例7: OnReceiveAssociateReject

 public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
 {
     Logger.LogInfo("Association Rejection when {0} connected to remote AE {1}", association.CallingAE, association.CalledAE);
     _dicomClient = null;
 }
开发者ID:khaha2210,项目名称:radio,代码行数:5,代码来源:StorageScu.cs


示例8: OnReceiveAssociateReject

        public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
        {

        }
开发者ID:nhannd,项目名称:Xian,代码行数:4,代码来源:CFindSCU.cs


示例9: OnReceiveResponseMessage

 public void OnReceiveResponseMessage(DicomClient client, ClientAssociationParameters association, byte presentationID, DicomMessage message)
 {
     if (message.Status.Status == DicomState.Pending)
     {
         string studyinstanceuid = message.DataSet[DicomTags.StudyInstanceUid].GetString(0, "");
         if (OnResultReceive != null)
             OnResultReceive(message.DataSet);
     }
     else
     {
         _dicomClient.SendReleaseRequest();
     }
 }
开发者ID:nhannd,项目名称:Xian,代码行数:13,代码来源:CFindSCU.cs


示例10: OnNetworkError

 public void OnNetworkError(DicomClient client, ClientAssociationParameters association, Exception e)
 {
     throw new Exception("The method or operation is not implemented.");
 }
开发者ID:nhannd,项目名称:Xian,代码行数:4,代码来源:CFindSCU.cs


示例11: OnReceiveAssociateAccept

        public void OnReceiveAssociateAccept(DicomClient client, ClientAssociationParameters association)
        {
            Logger.LogInfo("Association Accepted:\r\n{0}", association.ToString());

            _fileListIndex = 0;

            bool ok = SendCStore(client, association);
            while (ok == false)
            {
                _fileListIndex++;
                if (_fileListIndex >= _fileList.Count)
                {
                    Logger.LogInfo("Completed sending C-STORE-RQ messages, releasing association.");
                    client.SendReleaseRequest();
                    return;
                }
                ok = SendCStore(client, association);
            }
        }
开发者ID:khaha2210,项目名称:radio,代码行数:19,代码来源:StorageScu.cs


示例12: OnReceiveResponseMessage

 public void OnReceiveResponseMessage(DicomClient client, ClientAssociationParameters association, byte presentationID, DicomMessage message)
 {
     client.SendReleaseRequest();
     Assert.AreEqual(message.Status.Code, DicomStatuses.Success.Code, "Incorrect DICOM status returned");
 }
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:5,代码来源:AssociationTests.cs


示例13: OnReceiveReleaseResponse

 public void OnReceiveReleaseResponse(DicomClient client, ClientAssociationParameters association)
 {
     // Signal the main thread we're exiting
     _threadStop.Set();
 }
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:5,代码来源:AssociationTests.cs


示例14: OnDimseTimeout

 public void OnDimseTimeout(DicomClient client, ClientAssociationParameters association)
 {
     Logger.LogInfo("Timeout waiting for response message, continuing.");
 }
开发者ID:khaha2210,项目名称:radio,代码行数:4,代码来源:StorageScu.cs


示例15: ConnectTLS

        /// <summary>
        /// Connection to a remote DICOM application via TLS.
        /// </summary>
        /// <param name="assoc"></param>
        /// <param name="handler"></param>
        /// <returns></returns>
        public static DicomClient ConnectTLS(AssociationParameters assoc, IDicomClientHandler handler)
        {
            DicomClient client = new DicomClient(assoc, handler);
            client.ConnectTLS();
            return client;
		}
开发者ID:khaha2210,项目名称:radio,代码行数:12,代码来源:DicomClient.cs


示例16: OnNetworkError

 public void OnNetworkError(DicomClient client, ClientAssociationParameters association, Exception e)
 {
     Logger.LogErrorException(e, "Unexpected network error");
     _dicomClient = null;
 }
开发者ID:khaha2210,项目名称:radio,代码行数:5,代码来源:StorageScu.cs


示例17: OnReceiveAbort

 public void OnReceiveAbort(DicomClient client, ClientAssociationParameters association, DicomAbortSource source, DicomAbortReason reason)
 {
     Logger.LogError("Unexpected association abort received from {0}", association.CalledAE);
     _dicomClient = null;
 }
开发者ID:khaha2210,项目名称:radio,代码行数:5,代码来源:StorageScu.cs


示例18: OnReceiveReleaseResponse

 public void OnReceiveReleaseResponse(DicomClient client, ClientAssociationParameters association)
 {
     Logger.LogInfo("Association released to {0}", association.CalledAE);
     _dicomClient = null;
 }
开发者ID:khaha2210,项目名称:radio,代码行数:5,代码来源:StorageScu.cs


示例19: OnReceiveReleaseResponse

 public void OnReceiveReleaseResponse(DicomClient client, ClientAssociationParameters association)
 {
     if (OnQueryCompleted != null)
     {
         OnQueryCompleted();
         _dicomClient.Dispose();
     }
 }
开发者ID:nhannd,项目名称:Xian,代码行数:8,代码来源:CFindSCU.cs


示例20: OnReceiveAssociateReject

 public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
 {
     if (_type == TestTypes.AssociationReject)
     {
         Assert.IsTrue(source == DicomRejectSource.ServiceProviderACSE);
         Assert.IsTrue(result == DicomRejectResult.Permanent);
         Assert.IsTrue(reason == DicomRejectReason.NoReasonGiven);
         _threadStop.Set();
     }
     else
         Assert.Fail("Incorrectly received OnReceiveAssociateReject callback");
 }
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:12,代码来源:AssociationTests.cs



注:本文中的ClearCanvas.Dicom.Network.DicomClient类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Network.DicomServer类代码示例发布时间:2022-05-24
下一篇:
C# Network.ClientAssociationParameters类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap