public PacsStorageScu(ServerPartition partition, Device remoteDevice, string moveOriginatorAe, ushort moveOrginatorMessageId) : base( partition.AeTitle, remoteDevice.AeTitle, remoteDevice.Hostname, remoteDevice.Port, moveOriginatorAe, moveOrginatorMessageId) { _remoteDevice = remoteDevice; }
private void StartListeners(ServerPartition part) { var parms = new DicomScpContext(part); //TODO support IPV6 var scp = new DicomScp<DicomScpContext>(parms, AssociationVerifier.Verify) { ListenPort = part.Port, AeTitle = part.AeTitle }; if (scp.Start(IPAddress.Any)) { _listenerList.Add(scp); Platform.Log(LogLevel.Info, "Start listen on {0} for server partition {1}", part.Port, part.Description); } else { Platform.Log(LogLevel.Error, "Unable to listen on {0} for server partition {1}", part.Port, part.Description); Platform.Log(LogLevel.Error, "Partition {0} will not accept any DICOM associations", part.Description); } }
/// <summary> /// create a instance of <see cref="SopInstanceImporterContext" /> to be used /// by <see cref="SopInstanceImporter"/> /// </summary> /// <param name="contextID"></param> /// <param name="sourceAE">source ae title of the image(s) to be import</param> /// <param name="partition">which the image(s) will be import to</param> public SopInstanceImporterContext(string contextID, string sourceAE, ServerPartition partition) { _contextId = contextID; _sourceAe = sourceAE; _partition = partition; }
public DicomScpContext(ServerPartition partition) { Partition = partition; }
public PacsStorageScu(ServerPartition partition, Device remoteDevice) : base(partition.AeTitle, remoteDevice.AeTitle, remoteDevice.Hostname, remoteDevice.Port) { _remoteDevice = remoteDevice; }
public static Device LookupDevice(ServerPartition partition, AssociationParameters association, out bool isNew) { isNew = false; Device device = null; using (var ctx = new PacsContext()) { var part = (from p in ctx.ServerPartitions select p).FirstOrDefault(); if (part != null) { device = part.Devices.FirstOrDefault(d => d.AeTitle.Equals(association.CallingAE)); } if (device == null) { if (!partition.AcceptAnyDevice) { return null; } if (partition.AutoInsertDevice) { device = new Device { AeTitle = association.CallingAE, Enabled = true, Description = string.Format("AE: {0}", association.CallingAE), //TODO Port = 104, AllowQuery = true, AllowRetrieve = true, AllowStorage = true, ServerPartitionPK = part.Id, LastAccessTime = DateTime.Now }; ctx.Devices.Add(device); ctx.SaveChanges(); isNew = true; } } if (device != null) { if (device.Dhcp && !association.RemoteEndPoint.Address.ToString().Equals(device.Hostname)) { device.Hostname = association.RemoteEndPoint.Address.ToString(); device.LastAccessTime = DateTime.Now; ctx.SaveChanges(); } else if (!isNew) { device.LastAccessTime = DateTime.Now; ctx.SaveChanges(); } } } return device; }