/// <summary> /// Returns a list of the services supported by this plugin. /// </summary> /// <returns></returns> public override IList<SupportedSop> GetSupportedSopClasses() { if (_list == null) { _list = new List<SupportedSop>(); // Get the SOP Classes using (IReadContext read = _store.OpenReadContext()) { // Set the input parameters for query PartitionSopClassQueryParameters inputParms = new PartitionSopClassQueryParameters(); inputParms.ServerPartitionKey = Partition.GetKey(); IQueryServerPartitionSopClasses broker = read.GetBroker<IQueryServerPartitionSopClasses>(); IList<PartitionSopClass> sopClasses = broker.Find(inputParms); // Now process the SOP Class List foreach (PartitionSopClass partitionSopClass in sopClasses) { if (partitionSopClass.Enabled && !partitionSopClass.NonImage) { SupportedSop sop = new SupportedSop(); sop.SopClass = SopClass.GetSopClass(partitionSopClass.SopClassUid); sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian); sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian); _list.Add(sop); } } } } return _list; }
private static IEnumerable<SupportedSop> GetSupportedSops() { var extendedConfiguration = LocalDicomServer.GetExtendedConfiguration(); foreach (SopClass sopClass in GetSopClasses(extendedConfiguration.ImageStorageSopClassUids)) { var supportedSop = new SupportedSop { SopClass = sopClass }; supportedSop.AddSyntax(TransferSyntax.ExplicitVrLittleEndian); supportedSop.AddSyntax(TransferSyntax.ImplicitVrLittleEndian); foreach (TransferSyntax transferSyntax in GetTransferSyntaxes(extendedConfiguration.StorageTransferSyntaxUids)) { if (transferSyntax.DicomUid.UID != TransferSyntax.ExplicitVrLittleEndianUid && transferSyntax.DicomUid.UID != TransferSyntax.ImplicitVrLittleEndianUid) { supportedSop.AddSyntax(transferSyntax); } } yield return supportedSop; } }
/// <summary> /// Returns a list of the services supported by this plugin. /// </summary> /// <returns></returns> public override IList<SupportedSop> GetSupportedSopClasses() { // Note: this method is called on startup to set the server's presentation contexts and then on every association. // If the settings change between those calls, the server may either throw an exception (if the sop is removed) or // does not behave as expected unless the server is restarted. if (_list == null) { _list = new List<SupportedSop>(); // Get the SOP Classes var partitionSopClassConfig = new PartitionSopClassConfiguration(); var sopClasses = partitionSopClassConfig.GetAllPartitionSopClasses(Partition); // Now process the SOP Class List foreach (PartitionSopClass partitionSopClass in sopClasses) { if (partitionSopClass.Enabled && !partitionSopClass.NonImage) { SupportedSop sop = new SupportedSop(); sop.SopClass = SopClass.GetSopClass(partitionSopClass.SopClassUid); if (!partitionSopClass.ImplicitOnly) sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian); sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian); _list.Add(sop); } } } return _list; }
/// <summary> /// Load a list of preferred SOP Classes and Transfer Syntaxes for a Device. /// </summary> /// <param name="read">A read context to read from the database.</param> public void LoadPreferredSyntaxes(IPersistenceContext read) { var select = read.GetBroker<IDevicePreferredTransferSyntaxEntityBroker>(); // Setup the select parameters. var criteria = new DevicePreferredTransferSyntaxSelectCriteria(); criteria.DeviceKey.EqualTo(_remoteDevice.GetKey()); IList<DevicePreferredTransferSyntax> list = select.Find(criteria); // Translate the list returned into the database into a list that is supported by the Storage SCU Component var sopList = new List<SupportedSop>(); foreach (DevicePreferredTransferSyntax preferred in list) { var sop = new SupportedSop { SopClass = SopClass.GetSopClass(preferred.GetServerSopClass().SopClassUid) }; sop.AddSyntax(TransferSyntax.GetTransferSyntax(preferred.GetServerTransferSyntax().Uid)); sopList.Add(sop); } SetPreferredSyntaxList(sopList); }
private static IEnumerable<SupportedSop> GetSupportedSops() { var sop = new SupportedSop { SopClass = SopClass.StudyRootQueryRetrieveInformationModelMove }; sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian); sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian); yield return sop; }
private static IEnumerable<SupportedSop> GetSupportedSops() { var sop = new SupportedSop { SopClass = SopClass.VerificationSopClass }; sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian); sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian); yield return sop; }
private static IEnumerable<SupportedSop> GetSupportedSops() { var extendedConfiguration = LocalDicomServer.GetExtendedConfiguration(); foreach (SopClass sopClass in GetSopClasses(extendedConfiguration.NonImageStorageSopClassUids)) { var supportedSop = new SupportedSop { SopClass = sopClass }; supportedSop.AddSyntax(TransferSyntax.ExplicitVrLittleEndian); supportedSop.AddSyntax(TransferSyntax.ImplicitVrLittleEndian); yield return supportedSop; } }
/// <summary> /// Public default constructor. Implements the Find and Move services for /// Patient Root and Study Root queries. /// </summary> public MoveScpExtension() { var sop = new SupportedSop { SopClass = SopClass.PatientRootQueryRetrieveInformationModelMove }; sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian); sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian); _list.Add(sop); sop = new SupportedSop { SopClass = SopClass.StudyRootQueryRetrieveInformationModelMove }; sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian); sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian); _list.Add(sop); }
/// <summary> /// Returns a list of the services supported by this plugin. /// </summary> /// <returns></returns> public override IList<SupportedSop> GetSupportedSopClasses() { if (_sopList == null) { _sopList = new List<SupportedSop>(); // Get the SOP Classes using (IReadContext read = _store.OpenReadContext()) { // Get the transfer syntaxes _syntaxList = LoadTransferSyntaxes(read, Partition.GetKey(),true); // Set the input parameters for query PartitionSopClassQueryParameters inputParms = new PartitionSopClassQueryParameters(); inputParms.ServerPartitionKey = Partition.GetKey(); IQueryServerPartitionSopClasses broker = read.GetBroker<IQueryServerPartitionSopClasses>(); IList<PartitionSopClass> sopClasses = broker.Find(inputParms); // Now process the SOP Class List foreach (PartitionSopClass partitionSopClass in sopClasses) { if (partitionSopClass.Enabled && !partitionSopClass.NonImage) { SupportedSop sop = new SupportedSop(); sop.SopClass = SopClass.GetSopClass(partitionSopClass.SopClassUid); foreach (PartitionTransferSyntax syntax in _syntaxList) { sop.SyntaxList.Add(TransferSyntax.GetTransferSyntax(syntax.Uid)); } _sopList.Add(sop); } } } } return _sopList; }
/// <summary> /// Public default constructor. Implements the Find and Move services for /// Patient Root and Study Root queries. /// </summary> public QueryScpExtension() { var sop = new SupportedSop { SopClass = SopClass.PatientRootQueryRetrieveInformationModelFind }; sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian); sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian); _list.Add(sop); sop = new SupportedSop { SopClass = SopClass.StudyRootQueryRetrieveInformationModelFind }; sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian); sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian); _list.Add(sop); var ep = new QueryKeysExtensionPoint(); foreach (IExtendedQueryKeys q in ep.CreateExtensions()) _queryExtensions.Add(q); }
/// <summary> /// Returns a list of the services supported by this plugin. /// </summary> /// <returns></returns> public override IList<SupportedSop> GetSupportedSopClasses() { if (_sopList == null) { _sopList = new List<SupportedSop>(); // Get the SOP Classes using (IReadContext read = _store.OpenReadContext()) { // Get the transfer syntaxes _syntaxList = LoadTransferSyntaxes(read, Partition.GetKey(),true); } var partitionSopClassConfig = new PartitionSopClassConfiguration(); var sopClasses = partitionSopClassConfig.GetAllPartitionSopClasses(Partition); if (sopClasses != null) { // Now process the SOP Class List foreach (PartitionSopClass partitionSopClass in sopClasses) { if (partitionSopClass.Enabled && !partitionSopClass.NonImage) { SupportedSop sop = new SupportedSop(); sop.SopClass = SopClass.GetSopClass(partitionSopClass.SopClassUid); foreach (PartitionTransferSyntax syntax in _syntaxList) { sop.SyntaxList.Add(TransferSyntax.GetTransferSyntax(syntax.Uid)); } _sopList.Add(sop); } } } } return _sopList; }
/// <summary> /// Returns a list of the DICOM services supported by this plugin. /// </summary> /// <returns></returns> public override IList<SupportedSop> GetSupportedSopClasses() { if (_list == null) { // Load from the database the non-image sops that are current configured for this server partition. _list = new List<SupportedSop>(); // Input parameters PartitionSopClassQueryParameters inputParms = new PartitionSopClassQueryParameters(); inputParms.ServerPartitionKey = Partition.GetKey(); // Do the query using (IReadContext read = _store.OpenReadContext()) { IQueryServerPartitionSopClasses broker = read.GetBroker<IQueryServerPartitionSopClasses>(); IList<PartitionSopClass> sopClasses = broker.Find(inputParms); read.Dispose(); // Now process the SOP Class list foreach (PartitionSopClass partitionSopClass in sopClasses) { if (partitionSopClass.Enabled && partitionSopClass.NonImage) { SupportedSop sop = new SupportedSop(); sop.SopClass = SopClass.GetSopClass(partitionSopClass.SopClassUid); sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian); sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian); _list.Add(sop); } } } } return _list; }
/// <summary> /// Load a list of preferred SOP Classes and Transfer Syntaxes for a Device. /// </summary> /// <param name="request">A read context to read from the database.</param> public void LoadPreferredSyntaxes(DicomSendRequest request) { _sendRequest = request; // TODO (CR Jun 2012): Just set it since it's not an event? // Add a delegate to do the actual selection of the contexts; PresentationContextSelectionDelegate += SelectPresentationContext; var dic = new Dictionary<SopClass, SupportedSop>(); foreach (var storageInstance in StorageInstanceList) { // skip if failed in LoadStorageInstanceInfo, ie file not found if (storageInstance.SendStatus == DicomStatuses.ProcessingFailure) continue; storageInstance.LoadInfo(); SupportedSop sop; if (!dic.TryGetValue(storageInstance.SopClass,out sop)) { sop = new SupportedSop { SopClass = storageInstance.SopClass }; if (request.CompressionType == CompressionType.JpegLossless) sop.AddSyntax(TransferSyntax.JpegLosslessNonHierarchicalFirstOrderPredictionProcess14SelectionValue1); else if (request.CompressionType == CompressionType.Rle) sop.AddSyntax(TransferSyntax.RleLossless); else if (request.CompressionType == CompressionType.J2KLossy) sop.AddSyntax(TransferSyntax.Jpeg2000ImageCompression); else if (request.CompressionType == CompressionType.J2KLossless) sop.AddSyntax(TransferSyntax.Jpeg2000ImageCompressionLosslessOnly); else if (request.CompressionType == CompressionType.JpegLossy) { sop.AddSyntax(TransferSyntax.JpegBaselineProcess1); sop.AddSyntax(TransferSyntax.JpegExtendedProcess24); } dic.Add(storageInstance.SopClass, sop); } } SetPreferredSyntaxList(dic.Values); }