示例#1
0
 internal StudyItemCollection(StudyNodeCollection collection)
 {
     _collection = collection;
     foreach (StudyNode node in collection)
     {
         base.Add(new StudyItem(node));
     }
 }
示例#2
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, ""));
		}
示例#3
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;
		}
示例#4
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));
				}
			}
		}