Beispiel #1
0
 /// <summary>
 /// Constructs a new <see cref="PatientNode"/> 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 PatientNode(DicomAttributeCollection dicomDataSet)
 {
     _studies   = new StudyNodeCollection(this);
     _patientId = dicomDataSet[DicomTags.PatientId].GetString(0, "");
     _name      = dicomDataSet[DicomTags.PatientsName].GetString(0, "");
     _birthdate = DicomConverter.GetDateTime(dicomDataSet[DicomTags.PatientsBirthDate].GetDateTime(0), dicomDataSet[DicomTags.PatientsBirthTime].GetDateTime(0));
     _sex       = DicomConverter.GetSex(dicomDataSet[DicomTags.PatientsSex].GetString(0, ""));
 }
Beispiel #2
0
 /// <summary>
 /// Constructs a new <see cref="PatientNode"/> using default values.
 /// </summary>
 public PatientNode()
 {
     _studies   = new StudyNodeCollection(this);
     _patientId = string.Format("PN{0}", this.Key);
     _name      = "Unnamed Patient";
     _birthdate = null;
     _sex       = PatientSex.Undefined;
 }
Beispiel #3
0
        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="source"></param>
        /// <param name="copyDescendants"></param>
        private PatientNode(PatientNode source, bool copyDescendants)
        {
            _studies   = new StudyNodeCollection(this);
            _patientId = source._patientId;
            _name      = source._name;
            _birthdate = source._birthdate;
            _sex       = source._sex;

            if (copyDescendants)
            {
                foreach (StudyNode study in source._studies)
                {
                    _studies.Add(study.Copy(true));
                }
            }
        }