public static Job route_dataset_to_at(DicomDS wrapper, DateTimeOffset time, params string[] aetitles) { try { List <DicomScp> scps = GetScps(aetitles); if (scps.Count > 0) { Job job = new Job() { Loops = 1 }; job.StartTime = time; Module.Scheduler.SubmitJob(job, (j) => Store(wrapper, scps)); Logger.Global.SystemMessage(LogType.Information, "Dataset will be stored to server {0} at {1}".FormatWith(aetitles.ToDisplay(), job.StartTime.ToString("MM/dd/yyyy - hh:mm:ss tt")), ""); return(job); } } catch (Exception e) { Logger.Global.SystemException(string.Empty, e); } return(null); }
public static Job route_dataset_with_retry_to_at(DicomDS wrapper, string aetitle, string ipAddress, int port, DateTimeOffset time, int numRetries, int retryTimeout) { try { if (!string.IsNullOrEmpty(ipAddress)) { DicomScp scp = new DicomScp(IPAddress.Parse(ipAddress), aetitle, port); Job job = new Job() { Loops = 1 }; job.StartTime = time; Module.Scheduler.SubmitJob(job, (j) => Store(wrapper, new List <DicomScp>() { scp }, numRetries, retryTimeout)); Logger.Global.SystemMessage(LogType.Information, "Dataset will be stored to server {0} at {1}".FormatWith(aetitle, job.StartTime.ToString("MM/dd/yyyy - hh:mm:ss tt")), ""); return(job); } } catch (Exception e) { Logger.Global.SystemException(string.Empty, e); } return(null); }
public StoreClient(List <DicomScp> scps, DicomDataSet ds) { DicomServer server = ServiceLocator.Retrieve <DicomServer>(); _Scu = new StoreScu(server.TemporaryDirectory); _DataSet = ds; _Scps.AddRange(scps); }
public static void route_dataset_to(DicomDS wrapper, params string[] aetitles) { try { List <DicomScp> scps = GetScps(aetitles); if (scps.Count > 0) { Store(wrapper, scps); } } catch (Exception e) { Logger.Global.SystemException(string.Empty, e); } finally { wrapper.Dataset = null; wrapper = null; } }
public static void route_dataset_with_retry_to(DicomDS wrapper, int numRetries, int retryTimeout, params string[] aetitles) { try { List <DicomScp> scps = GetScps(aetitles); DicomServer server = ServiceLocator.Retrieve <DicomServer>(); if (scps.Count > 0) { Store(wrapper, scps, numRetries, retryTimeout); } } catch (Exception e) { Logger.Global.SystemException(string.Empty, e); } finally { wrapper.Dataset = null; wrapper = null; } }
public static void route_dataset_with_retry_to(DicomDS wrapper, string aetitle, string ipAddress, int port, int numRetries, int retryTimeout) { try { if (!string.IsNullOrEmpty(ipAddress)) { DicomScp scp = new DicomScp(IPAddress.Parse(ipAddress), aetitle, port); Store(wrapper, new List <DicomScp>() { scp }, numRetries, retryTimeout); } } catch (Exception e) { Logger.Global.SystemException(string.Empty, e); } finally { wrapper.Dataset = null; wrapper = null; } }