コード例 #1
0
ファイル: LayoutManager.cs プロジェクト: hksonngan/Xian
        private IStudyRootStudyIdentifier GetStudyIdentifier(Study study)
        {
            if (ReconcilePatientInfo)
            {
                var studyIdentifier = study.GetIdentifier();
                return(new StudyRootStudyIdentifier(ReconcilePatient(studyIdentifier), studyIdentifier));
            }

            return(study.GetIdentifier());
        }
コード例 #2
0
ファイル: StudyBuilder.cs プロジェクト: bangush/server-1
        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);
        }
コード例 #3
0
        private IStudyRootStudyIdentifier GetStudyIdentifier(Study study)
        {
            //if (ReconcilePatientInfo)
            //{
            //    var studyIdentifier = study.GetIdentifier();
            //    return new StudyRootStudyIdentifier(ReconcilePatient(studyIdentifier), studyIdentifier);
            //}

            return(study.GetIdentifier());
        }
コード例 #4
0
        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);
        }
コード例 #5
0
ファイル: StudyBuilder.cs プロジェクト: nhannd/Xian
        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;
        }
コード例 #6
0
ファイル: ImageSetFactory.cs プロジェクト: top501/GoldenEagle
 protected virtual DicomImageSetDescriptor CreateImageSetDescriptor(Study study)
 {
     return(new DicomImageSetDescriptor(study.GetIdentifier()));
 }