Beispiel #1
0
        public static Room GetRoom(PatientImage pi)
        {
            if (pi == null)
            {
                logger.Warn("Attemt to get room for null PatientImage");
                return(null);
            }

            var roomBridges = DicomModule.GetRoomBridges();

            if (pi.DeviceSerialNumber != null)
            {
                if (roomBridges.Where(x => x.SerialNumber == pi.DeviceSerialNumber).Any())
                {
                    return(roomBridges.Where(x => x.SerialNumber == pi.DeviceSerialNumber).First().Room);
                }
            }

            if (pi.ManufacturerModelName != null)
            {
                if (roomBridges.Where(x => x.ModelName == pi.ManufacturerModelName).Any())
                {
                    return(roomBridges.Where(x => x.ModelName == pi.ManufacturerModelName).First().Room);
                }
            }
            return(null);
        }
Beispiel #2
0
 public DicomConnector(List <StoredDicomServer> servers)
 {
     logger.Trace("Instantiating Dicom connector..");
     DicomServers = servers;
     DicomTranslator.connector = this;
     _preferences           = DicomModule.GetPreferences();
     server                 = DicomServer.Create <CStoreSCP>(_preferences.Port);
     _preferences.HostName  = Dns.GetHostName();
     _preferences.IPAddress = GetLocalIPAddress();
     logger.Info("DicomServer AETITLE: {0}; IPAddress: {1}; Port {2}; TimeoutDelay: {3}; HostName: {4}", _preferences.AETitle, _preferences.IPAddress, _preferences.Port, _preferences.TimeoutDelay, _preferences.HostName);
     DicomModule.SavePreferences(_preferences);
     logger.Info("Server is listening: " + server.IsListening);
     ReceivedFiles = new List <DicomFile>();
     logger.Trace("Instantiating Dicom connector... done.");
 }
Beispiel #3
0
 public DicomConnector() : this(DicomModule.GetDicomServers())
 {
 }