The VerificationSCU example demonstrates how to use DCF to implement a verification (DICOM echo) service class user.
Classes
Class | Description | |
---|---|---|
Program |
Simple verification service class user which should should be used with VerificationSCP.
|
Remarks
Supported OS Platforms:
- Windows - .Net Framework 4.7.2 64-bit and 32-bit
- Windows - .Net Core 2.1 64-bit and 32-bit
- Linux - .Net Core 2.1 64-bit
Examples
VerificationSCU Sample Code
public class Program { /// <summary> /// Main entry point for VerificationSCU. /// </summary> [STAThread] public static void Main() { Console.Title = "LaurelBridge.DCFExamples.VerificationSCU"; int[] ports = new[] { 10104, 10105, 10106 }; Parallel.ForEach(ports, port => { try { using (DCF.Dicom.Verification.VerificationSCU verificationSCU = new DCF.Dicom.Verification.VerificationSCU("ECHOSCU", new DicomAddress("127.0.0.1", port, "TESTSCP"))) { verificationSCU.RequestAssociation(); CEchoResponse status = verificationSCU.CEcho(30); Console.WriteLine("VerificationSCU: cEcho status on port {0}: {1}", port, status.Status == DimseStatus.DIMSE_SUCCESS ? "success" : "failure"); verificationSCU.ReleaseAssociation(); } } catch (Exception e) { Console.WriteLine("Exception caught during execution: {0}{1}Please verify the Verification SCP is running and listening on port {2}.{1}", e.Message, Environment.NewLine, port); Environment.ExitCode = 1; } } ); if (System.Diagnostics.Debugger.IsAttached) { Console.Write("Press any key to continue . . . "); Console.ReadKey(); } } }