示例#1
0
        public DicomFile LoadDicomFile(LoadDicomFileArgs args)
        {
            if (args.ForceCompleteHeader && !CanLoadCompleteHeader)
            {
                throw new NotSupportedException("Provider doesn't support loading the complete header.");
            }
            if (args.IncludePixelData && !CanLoadPixelData)
            {
                throw new NotSupportedException("Provider doesn't support inclusion of pixel data.");
            }

            return(_loadDicomFile(args));
        }
		public DicomFile LoadDicomFile(LoadDicomFileArgs args)
		{
			try
			{
				var client = new StreamingClient(_wadoUri);
				var file = new DicomFile();
				using (var stream = client.RetrieveImageHeader(_aeTitle, args.StudyInstanceUid, args.SeriesInstanceUid, args.SopInstanceUid))
				{
					file.Load(stream);
				}

				return file;
			}
			catch (Exception e)
			{
				throw TranslateStreamingException(e);
			}
		}
		public DicomFile LoadDicomFile(LoadDicomFileArgs args)
		{
			try
			{
				Uri uri = new Uri(string.Format(StreamingSettings.Default.FormatWadoUriPrefix, _hostName, _wadoServicePort));
				var client = new StreamingClient(uri);
				var file = new DicomFile();
				using (var stream = client.RetrieveImageHeader(_aeTitle, args.StudyInstanceUid, args.SeriesInstanceUid, args.SopInstanceUid))
				{
					file.Load(stream);
				}

				return file;
			}
			catch (Exception e)
			{
				throw TranslateStreamingException(e);
			}
		}
示例#4
0
		public DicomFile GetCompleteSop()
		{
			//Just get the entire thing from the loader.
			var args = new LoadDicomFileArgs(StudyInstanceUid, SeriesInstanceUid, SopInstanceUid, true, true);
			return HeaderProvider.LoadDicomFile(args);
		}
示例#5
0
		private void LoadFullHeader()
		{
			if (_fullHeader != null)
				return; //We've already got it without the pixel data.

			var args = new LoadDicomFileArgs(this.StudyInstanceUid, this.SeriesInstanceUid, this.SopInstanceUid, true, false);
			_fullHeader = HeaderProvider.LoadDicomFile(args);
			_metaInfo = null;
		}
示例#6
0
        private void LoadFullHeader(bool includePixelData)
        {
            if (_fullHeader != null)
                return;

            var args = new LoadDicomFileArgs(this.StudyInstanceUid, this.SeriesInstanceUid, this.SopInstanceUid, true, includePixelData);
            _fullHeader = ParentSeries.ParentStudy.HeaderProvider.LoadDicomFile(args);
            _metaInfo = null;
        }
示例#7
0
		public DicomFile LoadDicomFile(LoadDicomFileArgs args)
		{
			if (args.ForceCompleteHeader && !CanLoadCompleteHeader)
				throw new NotSupportedException("Provider doesn't support loading the complete header.");
			if (args.IncludePixelData && !CanLoadPixelData)
				throw new NotSupportedException("Provider doesn't support inclusion of pixel data.");

			return _loadDicomFile(args);
		}