private void OnPixelDataLoaded(string seriesInstanceUid, string nextSeriesInstanceUid, string nextSopInstanceUid) { if (string.IsNullOrEmpty(nextSeriesInstanceUid) == false && string.IsNullOrEmpty(nextSopInstanceUid) == false) { SeriesPrefetch prefetcher = GetSeriesPrefetcher(seriesInstanceUid); prefetcher.OnImageLoaded(nextSeriesInstanceUid, nextSopInstanceUid); } }
private SeriesPrefetch GetSeriesPrefetcher(string seriesInstanceUid) { lock (_prefetchers) { if (_prefetchers.ContainsKey(seriesInstanceUid)) { return(_prefetchers[seriesInstanceUid]); } else { SeriesPrefetch prefetcher = new SeriesPrefetch(_storage, seriesInstanceUid); _prefetchers.Add(seriesInstanceUid, prefetcher); return(prefetcher); } } }
private SeriesPrefetch GetSeriesPrefetcher(string seriesInstanceUid) { lock (_prefetchers) { if (_prefetchers.ContainsKey(seriesInstanceUid)) return _prefetchers[seriesInstanceUid]; else { SeriesPrefetch prefetcher = new SeriesPrefetch(_storage, seriesInstanceUid); _prefetchers.Add(seriesInstanceUid, prefetcher); return prefetcher; } } }