本文整理汇总了C#中ClearCanvas.Dicom.Network.ClientAssociationParameters类的典型用法代码示例。如果您正苦于以下问题:C# ClientAssociationParameters类的具体用法?C# ClientAssociationParameters怎么用?C# ClientAssociationParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClientAssociationParameters类属于ClearCanvas.Dicom.Network命名空间,在下文中一共展示了ClientAssociationParameters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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);
}
}
示例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);
}
示例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");
}
}
示例6: OnReceiveRequestMessage
public void OnReceiveRequestMessage(DicomClient client, ClientAssociationParameters association, byte presentationID, DicomMessage message)
{
Assert.Fail("Incorrectly received OnReceiveRequestMessage callback");
}
示例7: OnDimseTimeout
public void OnDimseTimeout(DicomClient client, ClientAssociationParameters association)
{
Logger.LogInfo("Timeout waiting for response message, continuing.");
}
示例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();
}
}
示例9: OnReceiveAssociateReject
public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
{
}
示例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");
}
示例11: OnNetworkError
public void OnNetworkError(DicomClient client, ClientAssociationParameters association, Exception e)
{
throw new Exception("The method or operation is not implemented.");
}
示例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");
}
示例13: OnReceiveReleaseResponse
public void OnReceiveReleaseResponse(DicomClient client, ClientAssociationParameters association)
{
// Signal the main thread we're exiting
_threadStop.Set();
}
示例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;
}
示例15: Copy
internal ClientAssociationParameters Copy(ClientAssociationParameters sourceParameters)
{
return new ClientAssociationParameters(sourceParameters);
}