Esempio n. 1
0
 /// <summary>
 /// Constructs a new <see cref="StudyNode"/> using default values.
 /// </summary>
 public StudyNode()
 {
     _series       = new SeriesNodeCollection(this);
     _instanceUid  = StudyBuilder.NewUid();
     _studyId      = string.Format("ST{0}", this.Key);
     _description  = "Untitled Study";
     _dateTime     = System.DateTime.Now;
     _accessionNum = "";
 }
Esempio n. 2
0
 /// <summary>
 /// Constructs a new <see cref="StudyNode"/> using actual values from attributes in the given <see cref="DicomAttributeCollection"/>.
 /// </summary>
 /// <param name="dicomDataSet">The data set from which to initialize this node.</param>
 public StudyNode(DicomAttributeCollection dicomDataSet)
 {
     _series       = new SeriesNodeCollection(this);
     _studyId      = dicomDataSet[DicomTags.StudyId].GetString(0, "");
     _description  = dicomDataSet[DicomTags.StudyDescription].GetString(0, "");
     _dateTime     = DicomConverter.GetDateTime(dicomDataSet[DicomTags.StudyDate].GetDateTime(0), dicomDataSet[DicomTags.StudyTime].GetDateTime(0));
     _accessionNum = dicomDataSet[DicomTags.AccessionNumber].GetString(0, "");
     _instanceUid  = dicomDataSet[DicomTags.StudyInstanceUid].GetString(0, "");
     if (_instanceUid == "")
     {
         _instanceUid = StudyBuilder.NewUid();
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="source"></param>
        /// <param name="copyDescendants"></param>
        public StudyNode(StudyNode source, bool copyDescendants)
        {
            _series       = new SeriesNodeCollection(this);
            _instanceUid  = StudyBuilder.NewUid();
            _studyId      = source._studyId;
            _description  = source._description;
            _dateTime     = source._dateTime;
            _accessionNum = source._accessionNum;

            if (copyDescendants)
            {
                foreach (SeriesNode series in source._series)
                {
                    _series.Add(series.Copy(true));
                }
            }
        }