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

C# Network.ClientAssociationParameters类代码示例

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

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



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

示例1: BeginTransferringDicomInstancesAuditTest

		public void BeginTransferringDicomInstancesAuditTest()
		{
			AssociationParameters parms = new ClientAssociationParameters("CLIENT", "SERVER",
																		  new IPEndPoint(new IPAddress(new byte[] { 2, 2, 2, 2 }),
																						 2));
			parms.LocalEndPoint = new IPEndPoint(new IPAddress(new byte[] { 1, 1, 1, 1 }),
												 1);


			BeginTransferringDicomInstancesAuditHelper helper =
				new BeginTransferringDicomInstancesAuditHelper(
					new DicomAuditSource("testApp", "Site", AuditSourceTypeCodeEnum.ApplicationServerProcessTierInMultiTierSystem),
					EventIdentificationContentsEventOutcomeIndicator.Success,
					parms, new AuditPatientParticipantObject("id1234", "Test Patient"));

			DicomAttributeCollection collection = new DicomAttributeCollection();
			SetupMR(collection);
			helper.AddStorageInstance(new StorageInstance(new DicomMessage(new DicomAttributeCollection(), collection)));
			
			string output = helper.Serialize(true);

			Assert.IsNotEmpty(output);

			Assert.Ignore("Skipping schema validation due to schema bug #9455");
			Exception exception;
			if (!helper.Verify(out exception))
				throw exception;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:28,代码来源:AuditTest.cs


示例2: SetSocketOptions

        private void SetSocketOptions(ClientAssociationParameters parameters)
        {
            _socket.ReceiveBufferSize = parameters.ReceiveBufferSize;
            _socket.SendBufferSize = parameters.SendBufferSize;
            _socket.ReceiveTimeout = parameters.ReadTimeout;
            _socket.SendTimeout = parameters.WriteTimeout;
            _socket.LingerState = new LingerOption(false, 0);
            // Nagle option
			_socket.NoDelay = parameters.DisableNagle;
        }
开发者ID:khaha2210,项目名称:radio,代码行数:10,代码来源:DicomClient.cs


示例3: 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


示例4: 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


示例5: 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


示例6: OnReceiveRequestMessage

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


示例7: OnDimseTimeout

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


示例8: 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


示例9: OnReceiveAssociateReject

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

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


示例10: 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


示例11: 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


示例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: 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


示例15: Copy

 internal ClientAssociationParameters Copy(ClientAssociationParameters sourceParameters)
 {
     return new ClientAssociationParameters(sourceParameters);
 }
开发者ID:scottshea,项目名称:monodicom,代码行数:4,代码来源:AssociationParameters.cs


示例16: ClientAssociationParameters

 private ClientAssociationParameters(ClientAssociationParameters parameters)
     : base(parameters)
 {
 }
开发者ID:scottshea,项目名称:monodicom,代码行数:4,代码来源:AssociationParameters.cs


示例17: OnReceiveReleaseResponse

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


示例18: OnReceiveAbort

 public void OnReceiveAbort(DicomClient client, ClientAssociationParameters association, DicomAbortSource source, DicomAbortReason reason)
 {
     Assert.Fail("Incorrectly received OnReceiveAbort callback");
 }
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:4,代码来源:AssociationTests.cs


示例19: OnReceiveAbort

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


示例20: ServerTest

        public void ServerTest()
        {
            int port = 2112;

            /* Setup the Server */
            ServerAssociationParameters serverParameters = new ServerAssociationParameters("AssocTestServer",new IPEndPoint(IPAddress.Any,port));
            byte pcid = serverParameters.AddPresentationContext(SopClass.MrImageStorage);
            serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian);
            serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrBigEndian);
            serverParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian);

            _serverType = TestTypes.SendMR;
            DicomServer.StartListening(serverParameters, ServerHandlerCreator);

            /* Setup the client */
            ClientAssociationParameters clientParameters = new ClientAssociationParameters("AssocTestClient","AssocTestServer",
                                                                                           new System.Net.IPEndPoint(IPAddress.Loopback,port));
            pcid = clientParameters.AddPresentationContext(SopClass.MrImageStorage);
            clientParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian);
            clientParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian);

            pcid = clientParameters.AddPresentationContext(SopClass.CtImageStorage);
            clientParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian);
            clientParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian);

            /* Open the association */
            ClientHandler handler = new ClientHandler(this,TestTypes.SendMR);
            DicomClient client = DicomClient.Connect(clientParameters, handler);


            handler._threadStop.WaitOne();

            client.Dispose();

            DicomServer.StopListening(serverParameters);
        }
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:36,代码来源:AssociationTests.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Network.DicomClient类代码示例发布时间:2022-05-24
下一篇:
C# Network.AssociationParameters类代码示例发布时间: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