コード例 #1
0
        protected override void InitStrategy()
        {
            var settings = new WebStationStreamingSettings();

            _strategy = new WeightedWindowPrefetchingStrategy(
                new StreamingCorePrefetchingStrategy(), _loaderName, SR.DescriptionWebStationPrefetchingStrategy)
            {
                Enabled = settings.RetrieveConcurrency > 0,
                RetrievalThreadConcurrency     = Math.Max(settings.RetrieveConcurrency, 1),
                DecompressionThreadConcurrency = Math.Max(settings.DecompressConcurrency, 1),
                FrameLookAheadCount            = settings.ImageWindow >= 0 ? (int?)settings.ImageWindow : null,
                SelectedImageBoxWeight         = Math.Max(settings.SelectedWeighting, 1),
                UnselectedImageBoxWeight       = Math.Max(settings.UnselectedWeighting, 0)
            };

            PrefetchingStrategy = _strategy;

            if (Platform.IsLogLevelEnabled(LogLevel.Debug))
            {
                StringBuilder message = new StringBuilder();
                message.AppendLine(String.Format("Streaming Prefetch Strategy: {0}", _strategy.Name));
                message.AppendLine(String.Format("\tEnabled: {0}", _strategy.Enabled ? "Yes" : "No"));
                message.AppendLine(String.Format("\tRetrieval Thread Concurrency: {0}", _strategy.RetrievalThreadConcurrency));
                message.AppendLine(String.Format("\tDecompression Thread Concurrency: {0}", _strategy.DecompressionThreadConcurrency));
                message.AppendLine(String.Format("\tFrame Lookahead Count: {0}", _strategy.FrameLookAheadCount));
                message.AppendLine(String.Format("\tSelected Imagebox Weight: {0}", _strategy.SelectedImageBoxWeight));
                message.AppendLine(String.Format("\tUnselected Imagebox Weight: {0}", _strategy.UnselectedImageBoxWeight));

                Platform.Log(LogLevel.Debug, message.ToString());
            }
        }
コード例 #2
0
 protected virtual void InitStrategy()
 {
     PrefetchingStrategy = new WeightedWindowPrefetchingStrategy(new StreamingCorePrefetchingStrategy(), _loaderName, SR.DescriptionPrefetchingStrategy)
     {
         Enabled = StreamingSettings.Default.RetrieveConcurrency > 0,
         RetrievalThreadConcurrency     = Math.Max(StreamingSettings.Default.RetrieveConcurrency, 1),
         DecompressionThreadConcurrency = Math.Max(StreamingSettings.Default.DecompressConcurrency, 1),
         FrameLookAheadCount            = StreamingSettings.Default.ImageWindow >= 0 ? (int?)StreamingSettings.Default.ImageWindow : null,
         SelectedImageBoxWeight         = Math.Max(StreamingSettings.Default.SelectedWeighting, 1),
         UnselectedImageBoxWeight       = Math.Max(StreamingSettings.Default.UnselectedWeighting, 0)
     };
 }
コード例 #3
0
        public LocalStoreStudyLoader() : base("DICOM_LOCAL")
        {
            int?frameLookAhead = PreLoadingSettings.Default.FrameLookAheadCount;

            if (PreLoadingSettings.Default.LoadAllFrames)
            {
                frameLookAhead = null;
            }

            var coreStrategy = new SimpleCorePrefetchingStrategy(frame => frame.ParentImageSop.DataSource is LocalStoreSopDataSource);

            PrefetchingStrategy = new WeightedWindowPrefetchingStrategy(coreStrategy, "DICOM_LOCAL", "Simple prefetcing strategy for local images.")
            {
                Enabled = PreLoadingSettings.Default.Enabled,
                RetrievalThreadConcurrency     = PreLoadingSettings.Default.Concurrency,
                FrameLookAheadCount            = frameLookAhead,
                SelectedImageBoxWeight         = PreLoadingSettings.Default.SelectedImageBoxWeight,
                UnselectedImageBoxWeight       = PreLoadingSettings.Default.UnselectedImageBoxWeight,
                DecompressionThreadConcurrency = 0
            };
        }