Exemplo n.º 1
0
 /// <summary>
 /// Get storage category collection of presentation contexts valid for C-GET requests.
 /// </summary>
 /// <param name="storageCategory">Storage category for which the sub-set of presentation context should be selected.</param>
 /// <param name="transferSyntaxes">Supported transfer syntaxes.</param>
 /// <returns>Collection of presentation contexts valid for C-GET requests.</returns>
 public static IEnumerable <DicomPresentationContext> GetScpRolePresentationContextsFromStorageUids(
     DicomStorageCategory storageCategory,
     params DicomTransferSyntax[] transferSyntaxes)
 {
     return
         (DicomUID.Enumerate()
          .Where(uid => uid.StorageCategory == storageCategory && !uid.IsRetired)
          .Select(uid => GetScpRolePresentationContext(uid, transferSyntaxes)));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Get, potentially filtered, collection of presentation contexts valid for C-GET requests.
        /// </summary>
        /// <param name="filter">Filter to apply when selecting a sub-set of active storage UID:s, or null to select all.</param>
        /// <param name="transferSyntaxes">Supported transfer syntaxes.</param>
        /// <returns>Collection of presentation contexts valid for C-GET requests.</returns>
        public static IEnumerable <DicomPresentationContext> GetScpRolePresentationContextsFromStorageUids(
            string filter,
            params DicomTransferSyntax[] transferSyntaxes)
        {
            var noFilter   = string.IsNullOrEmpty(filter?.Trim());
            var capsFilter = noFilter ? string.Empty : filter.ToUpperInvariant();

            return
                (DicomUID.Enumerate()
                 .Where(
                     uid =>
                     uid.StorageCategory != DicomStorageCategory.None && !uid.IsRetired &&
                     (noFilter || uid.Name.ToUpperInvariant().Contains(capsFilter)))
                 .Select(uid => GetScpRolePresentationContext(uid, transferSyntaxes)));
        }
 public AcceptOnlyEchoStoreProvider(INetworkStream stream, Encoding fallbackEncoding, Logger log,
                                    ILogManager logManager, INetworkManager networkManager, ITranscoderManager transcoderManager) : base(stream, fallbackEncoding, log, logManager, networkManager, transcoderManager)
 {
     AcceptedSopClasses.Add(DicomUID.Verification);
     AcceptedSopClasses.AddRange(DicomUID.Enumerate().Where(u => u.IsImageStorage));
 }