Beispiel #1
0
 /// <summary>
 /// Asynchronously perform DICOM reading of a byte source.
 /// </summary>
 /// <param name="source">Byte source to read.</param>
 /// <param name="observer">Reader observer.</param>
 /// <param name="stop">Criterion at which to stop.</param>
 /// <returns>Awaitable reader resulting status.</returns>
 public Task<DicomReaderResult> ReadAsync(IByteSource source, IDicomReaderObserver observer, Func<ParseState, bool> stop = null)
 {
     var worker = new DicomReaderWorker(observer, stop, this.Dictionary, this.IsExplicitVR, this._private);
     return worker.DoWorkAsync(source);
 }
Beispiel #2
0
        /// <summary>
        /// Asynchronously perform DICOM reading of a byte source.
        /// </summary>
        /// <param name="source">Byte source to read.</param>
        /// <param name="observer">Reader observer.</param>
        /// <param name="stop">Criterion at which to stop.</param>
        /// <returns>Awaitable reader resulting status.</returns>
        public Task <DicomReaderResult> ReadAsync(IByteSource source, IDicomReaderObserver observer, Func <ParseState, bool> stop = null)
        {
            var worker = new DicomReaderWorker(observer, stop, Dictionary, IsExplicitVR, IsDeflated, _private);

            return(worker.DoWorkAsync(source));
        }
Beispiel #3
0
        /// <summary>
        /// Perform DICOM reading of a byte source.
        /// </summary>
        /// <param name="source">Byte source to read.</param>
        /// <param name="observer">Reader observer.</param>
        /// <param name="stop">Criterion at which to stop.</param>
        /// <returns>Reader resulting status.</returns>
        public DicomReaderResult Read(IByteSource source, IDicomReaderObserver observer, Func <ParseState, bool> stop = null)
        {
            var worker = new DicomReaderWorker(observer, stop, this.Dictionary, this.IsExplicitVR, this._private);

            return(worker.DoWork(source));
        }