本文整理汇总了C#中ClearCanvas.Dicom.Network.ClientAssociationParameters.AddTransferSyntax方法的典型用法代码示例。如果您正苦于以下问题:C# ClientAssociationParameters.AddTransferSyntax方法的具体用法?C# ClientAssociationParameters.AddTransferSyntax怎么用?C# ClientAssociationParameters.AddTransferSyntax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ClearCanvas.Dicom.Network.ClientAssociationParameters
的用法示例。
在下文中一共展示了ClientAssociationParameters.AddTransferSyntax方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: RejectTests
public void RejectTests()
{
const int port = 2112;
/* Setup the Server */
var 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.AssociationReject;
DicomServer.StartListening(serverParameters, ServerHandlerCreator);
/* Setup the client */
var clientParameters = new ClientAssociationParameters("AssocTestClient", "AssocTestServer",
new IPEndPoint(IPAddress.Loopback, port));
pcid = clientParameters.AddPresentationContext(SopClass.CtImageStorage);
clientParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian);
clientParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian);
/* Open the association */
var handler = new ClientHandler(this, TestTypes.AssociationReject);
DicomClient client = DicomClient.Connect(clientParameters, handler);
handler._threadStop.WaitOne();
client.Dispose();
_serverType = TestTypes.AssociationReject;
/* Setup the client */
clientParameters = new ClientAssociationParameters("AssocTestClient", "AssocTestServer",
new IPEndPoint(IPAddress.Loopback, port));
pcid = clientParameters.AddPresentationContext(SopClass.MrImageStorage);
clientParameters.AddTransferSyntax(pcid, TransferSyntax.Jpeg2000ImageCompressionLosslessOnly);
/* Open the association */
var clientHandler = new ClientHandler(this, TestTypes.AssociationReject);
client = DicomClient.Connect(clientParameters, clientHandler);
handler._threadStop.WaitOne();
client.Dispose();
DicomServer.StopListening(serverParameters);
}