Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        public StoreClient(List <DicomScp> scps, DicomDataSet ds)
        {
            DicomServer server = ServiceLocator.Retrieve <DicomServer>();

            _Scu     = new StoreScu(server.TemporaryDirectory);
            _DataSet = ds;
            _Scps.AddRange(scps);
        }
Beispiel #4
0
        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;
            }
        }
Beispiel #5
0
        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;
            }
        }
Beispiel #6
0
        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;
            }
        }