internal SopInstance(InstanceXml xml, Series parent, IDicomFileLoader dicomFileLoader) { _xml = xml; _parentSeries = parent; _dicomFileLoader = dicomFileLoader; _sequenceHasExcludedTags = new Dictionary <uint, bool>(); _metaInfo = new DicomAttributeCollection(); if (xml.TransferSyntax != null) { var transferSyntax = xml.TransferSyntax.UidString; if (!String.IsNullOrEmpty(transferSyntax)) { _metaInfo[DicomTags.TransferSyntaxUid].SetString(0, transferSyntax); } } if (xml.SopClass != null) { var sopClass = xml.SopClass.Uid; if (!String.IsNullOrEmpty(sopClass)) { _metaInfo[DicomTags.SopClassUid].SetString(0, sopClass); } } }
internal Series(SeriesXml xml, Study parent, IDicomFileLoader dicomFileLoader) { _xml = xml; _parentStudy = parent; _dicomFileLoader = dicomFileLoader; _sopInstanceCollection = new SopInstanceCollection(this); _firstSopInstance = _sopInstanceCollection.FirstOrDefault(); }
public Study(StudyXml xml, IDicomFileLoader dicomFileLoader) { _studyInstanceUid = xml.StudyInstanceUid; _xml = xml; _dicomFileLoader = dicomFileLoader; _seriesCollection = new SeriesCollection(this); _firstSopInstance = _seriesCollection.SelectMany(s => s.SopInstances).FirstOrDefault(); }
public FramePixelDataRetriever(FramePixelData source) { _loader = source.Parent._loader; _studyInstanceUid = source.Parent.StudyInstanceUid; _seriesInstanceUid = source.Parent.SeriesInstanceUid; SopInstanceUid = source.Parent.SopInstanceUid; TransferSyntaxUid = source.Parent.TransferSyntaxUid; _frameNumber = source.FrameNumber; }
public StreamingSopDataSource(DicomFile file, IDicomFileLoader loader) : base(file) { if (!loader.CanLoadCompleteHeader) throw new ArgumentException("Loader must be capable of retrieving the full image header.", "loader"); if (!loader.CanLoadFramePixelData) throw new ArgumentException("Loader must be capable of loading frame pixel data.", "loader"); _loader = loader; //Have to assume this to be the case. _fullHeaderRetrieved = true; }
public StreamingSopDataSource(DicomFile file, IDicomFileLoader loader) : base(file) { if (!loader.CanLoadCompleteHeader) { throw new ArgumentException("Loader must be capable of retrieving the full image header.", "loader"); } if (!loader.CanLoadFramePixelData) { throw new ArgumentException("Loader must be capable of loading frame pixel data.", "loader"); } _loader = loader; //Have to assume this to be the case. _fullHeaderRetrieved = true; }
public StreamingSopDataSource(InstanceXml instanceXml, IDicomFileLoader loader) : base(new DicomFile("", new DicomAttributeCollection(), instanceXml.Collection)) { if (!loader.CanLoadCompleteHeader) throw new ArgumentException("Loader must be capable of retrieving the full image header.", "loader"); if (!loader.CanLoadFramePixelData) throw new ArgumentException("Loader must be capable of loading frame pixel data.", "loader"); _loader = loader; //These don't get set properly for instance xml. var sourceFile = (DicomFile)SourceMessage; sourceFile.TransferSyntaxUid = instanceXml.TransferSyntax.UidString; sourceFile.MediaStorageSopInstanceUid = instanceXml.SopInstanceUid; sourceFile.MetaInfo[DicomTags.SopClassUid].SetString(0, instanceXml.SopClass == null ? instanceXml[DicomTags.SopClassUid].ToString() : instanceXml.SopClass.Uid); }
internal SopInstance(InstanceXml xml, Series parent, IDicomFileLoader dicomFileLoader) { _xml = xml; _parentSeries = parent; _dicomFileLoader = dicomFileLoader; _sequenceHasExcludedTags = new Dictionary<uint, bool>(); _metaInfo = new DicomAttributeCollection(); if (xml.TransferSyntax != null) { var transferSyntax = xml.TransferSyntax.UidString; if (!String.IsNullOrEmpty(transferSyntax)) _metaInfo[DicomTags.TransferSyntaxUid].SetString(0, transferSyntax); } if (xml.SopClass != null) { var sopClass = xml.SopClass.Uid; if (!String.IsNullOrEmpty(sopClass)) _metaInfo[DicomTags.SopClassUid].SetString(0, sopClass); } }
public StreamingSopDataSource(InstanceXml instanceXml, IDicomFileLoader loader) : base(new DicomFile("", new DicomAttributeCollection(), instanceXml.Collection)) { if (!loader.CanLoadCompleteHeader) { throw new ArgumentException("Loader must be capable of retrieving the full image header.", "loader"); } if (!loader.CanLoadFramePixelData) { throw new ArgumentException("Loader must be capable of loading frame pixel data.", "loader"); } _loader = loader; //These don't get set properly for instance xml. var sourceFile = (DicomFile)SourceMessage; sourceFile.TransferSyntaxUid = instanceXml.TransferSyntax.UidString; sourceFile.MediaStorageSopInstanceUid = instanceXml.SopInstanceUid; sourceFile.MetaInfo[DicomTags.SopClassUid].SetString(0, instanceXml.SopClass == null ? instanceXml[DicomTags.SopClassUid].ToString() : instanceXml.SopClass.Uid); }
public Study(StudyXml xml, IDicomFileLoader headerProvider) { _xml = xml; HeaderProvider = headerProvider; }
private ISopDicomFileLoader ConvertLoader(IDicomFileLoader loader) { return(new SopDicomFileLoader(loader.CanLoadCompleteHeader, loader.CanLoadPixelData, loader.CanLoadFramePixelData, args => loader.LoadDicomFile(new LoadDicomFileArgs(StudyInstanceUid, SeriesInstanceUid, SopInstanceUid, args.ForceCompleteHeader, args.IncludePixelData)), args => loader.LoadFramePixelData(new LoadFramePixelDataArgs(StudyInstanceUid, SeriesInstanceUid, SopInstanceUid, args.FrameNumber)))); }
public StreamingSopDataSource(InstanceXml instanceXml, IDicomFileLoader loader) : base(instanceXml) { _loader = ConvertLoader(loader); CheckLoaderCapabilities(); }
private ISopDicomFileLoader ConvertLoader(IDicomFileLoader loader) { return new SopDicomFileLoader(loader.CanLoadCompleteHeader, loader.CanLoadPixelData, loader.CanLoadFramePixelData, args => loader.LoadDicomFile(new LoadDicomFileArgs(StudyInstanceUid, SeriesInstanceUid, SopInstanceUid, args.ForceCompleteHeader, args.IncludePixelData)), args => loader.LoadFramePixelData(new LoadFramePixelDataArgs(StudyInstanceUid, SeriesInstanceUid, SopInstanceUid, args.FrameNumber))); }