QRServer.cs 694 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright (c) 2012-2020 fo-dicom contributors.
  2. // Licensed under the Microsoft Public License (MS-PL).
  3. using Dicom.Network;
  4. using QueryRetrieve_SCP.Model;
  5. namespace QueryRetrieve_SCP
  6. {
  7. public static class QRServer
  8. {
  9. private static IDicomServer _server;
  10. public static string AETitle { get; set; }
  11. public static IDicomImageFinderService CreateFinderService => new StupidSlowFinderService();
  12. public static void Start(int port, string aet)
  13. {
  14. AETitle = aet;
  15. _server = DicomServer.Create<QRService>(port);
  16. }
  17. public static void Stop()
  18. {
  19. _server.Dispose();
  20. }
  21. }
  22. }