Example #1
0
        /// <summary>
        /// Adds a <see cref="SeriesInformation"/> data
        /// </summary>
        /// <param name="message"></param>
        public void Add(DicomMessageBase message)
        {
            if (PatientInfo == null)
            {
                PatientInfo = new PatientInformation(message.DataSet);
            }

            if (Series == null)
            {
                Series = new List <SeriesInformation>();
            }

            string            seriesInstanceUid = message.DataSet[DicomTags.SeriesInstanceUid].ToString();
            SeriesInformation theSeries         = Series.Find(ser => ser.SeriesInstanceUid == seriesInstanceUid);

            if (theSeries == null)
            {
                SeriesInformation newSeries = new SeriesInformation(message.DataSet)
                {
                    NumberOfInstances = 1
                };
                Series.Add(newSeries);
            }
            else
            {
                theSeries.NumberOfInstances++;
            }
        }
Example #2
0
        public void Add(SeriesInformation series)
        {
            if (Series == null)
            {
                Series = new List <SeriesInformation>();
            }

            Series.Add(series);
        }
Example #3
0
        public static StudyInformation CreateFrom(Study study)
        {
            ServerEntityAttributeProvider studyWrapper = new ServerEntityAttributeProvider(study);
            StudyInformation studyInfo = new StudyInformation(studyWrapper);

            foreach (Series series in study.Series.Values)
            {
                ServerEntityAttributeProvider seriesWrapper = new ServerEntityAttributeProvider(series);
                SeriesInformation             seriesInfo    = new SeriesInformation(seriesWrapper);
                studyInfo.Add(seriesInfo);
            }

            return(studyInfo);
        }
Example #4
0
        public StudyInformation(IDicomAttributeProvider attributeProvider)
        {
            if (attributeProvider[DicomTags.StudyId] != null)
            {
                StudyId = attributeProvider[DicomTags.StudyId].ToString();
            }

            if (attributeProvider[DicomTags.AccessionNumber] != null)
            {
                AccessionNumber = attributeProvider[DicomTags.AccessionNumber].ToString();
            }

            if (attributeProvider[DicomTags.StudyDate] != null)
            {
                StudyDate = attributeProvider[DicomTags.StudyDate].ToString();
            }

            if (attributeProvider[DicomTags.ModalitiesInStudy] != null)
            {
                Modalities = attributeProvider[DicomTags.ModalitiesInStudy].ToString();
            }

            if (attributeProvider[DicomTags.StudyInstanceUid] != null)
            {
                StudyInstanceUid = attributeProvider[DicomTags.StudyInstanceUid].ToString();
            }

            if (attributeProvider[DicomTags.StudyDescription] != null)
            {
                StudyDescription = attributeProvider[DicomTags.StudyDescription].ToString();
            }


            if (attributeProvider[DicomTags.ReferringPhysiciansName] != null)
            {
                ReferringPhysician = attributeProvider[DicomTags.ReferringPhysiciansName].ToString();
            }

            PatientInfo = new PatientInformation(attributeProvider);

            DicomAttribute seriesUidAttr;

            if (attributeProvider.TryGetAttribute(DicomTags.SeriesInstanceUid, out seriesUidAttr))
            {
                SeriesInformation series = new SeriesInformation(attributeProvider);
                Add(series);
            }
        }