private IStudyRootStudyIdentifier GetStudyIdentifier(Study study) { if (ReconcilePatientInfo) { var studyIdentifier = study.GetIdentifier(); return(new StudyRootStudyIdentifier(ReconcilePatient(studyIdentifier), studyIdentifier)); } return(study.GetIdentifier()); }
public IImageSet BuildImageSet(StudyTree studyTree, out Study study) { if (IsRemote) { study = null; //Add only the image set, which essentially makes it a remote study. var identifier = new StudyRootStudyIdentifier(this, this, new StudyIdentifier()) { PatientId = ReconciledPatientId ?? PatientId }; return(new ImageSet(new DicomImageSetDescriptor(identifier))); } study = AddStudy(studyTree); var studyIdentifier = study.GetIdentifier(); studyIdentifier = new StudyRootStudyIdentifier(studyIdentifier) { PatientId = ReconciledPatientId ?? study.ParentPatient.PatientId }; var imageSet = new ImageSet(new DicomImageSetDescriptor(studyIdentifier)); foreach (var series in study.Series) { foreach (var displaySet in DisplaySetFactory.CreateDisplaySets(series)) { imageSet.DisplaySets.Add(displaySet); } } return(imageSet); }
private IStudyRootStudyIdentifier GetStudyIdentifier(Study study) { //if (ReconcilePatientInfo) //{ // var studyIdentifier = study.GetIdentifier(); // return new StudyRootStudyIdentifier(ReconcilePatient(studyIdentifier), studyIdentifier); //} return(study.GetIdentifier()); }
private IDisplaySet CreateDisplaySet(Study study, IEnumerable <Series> modalitySeries) { var first = modalitySeries.FirstOrDefault(); if (first == null) { return(null); } var modality = first.Modality; if (String.IsNullOrEmpty(modality)) { return(null); } var displaySet = new DisplaySet(new ModalityDisplaySetDescriptor(study.GetIdentifier(), modality, PresentationImageFactory)); int seriesCount = 0; foreach (var series in modalitySeries) { bool added = false; foreach (var imageSop in series.Sops) //We don't want key images, references etc. { foreach (var image in PresentationImageFactory.CreateImages(imageSop)) { displaySet.PresentationImages.Add(image); added = true; } } if (added) { ++seriesCount; } } // Degenerate case is one series, in which case we don't create this display set. if (seriesCount > 1) { return(displaySet); } displaySet.Dispose(); return(null); }
public IImageSet BuildImageSet(StudyTree studyTree, out Study study) { if (IsRemote) { study = null; //Add only the image set, which essentially makes it a remote study. var identifier = new StudyRootStudyIdentifier(this, this, new StudyIdentifier()) { PatientId = ReconciledPatientId ?? PatientId }; return new ImageSet(new DicomImageSetDescriptor(identifier)); } study = AddStudy(studyTree); var studyIdentifier = study.GetIdentifier(); studyIdentifier = new StudyRootStudyIdentifier(studyIdentifier) { PatientId = ReconciledPatientId ?? study.ParentPatient.PatientId }; var imageSet = new ImageSet(new DicomImageSetDescriptor(studyIdentifier)); foreach (var series in study.Series) { foreach (var displaySet in DisplaySetFactory.CreateDisplaySets(series)) imageSet.DisplaySets.Add(displaySet); } return imageSet; }
protected virtual DicomImageSetDescriptor CreateImageSetDescriptor(Study study) { return(new DicomImageSetDescriptor(study.GetIdentifier())); }