Example #1
0
		/// <summary>
		/// Constructs a new <see cref="SeriesNode"/> using default values.
		/// </summary>
		public SeriesNode()
		{
			_images = new SopInstanceNodeCollection(this);
			_instanceUid = StudyBuilder.NewUid();
			_description = "Untitled Series";
			_dateTime = System.DateTime.Now;
		}
Example #2
0
		/// <summary>
		/// Constructs a new <see cref="SeriesNode"/> using actual values from attributes from the given <see cref="DicomAttributeCollection"/>.
		/// </summary>
		/// <param name="dicomDataSet">The data set from which to initialize this node.</param>
		public SeriesNode(DicomAttributeCollection dicomDataSet)
		{
			_images = new SopInstanceNodeCollection(this);
			_description = dicomDataSet[DicomTags.SeriesDescription].GetString(0, "");
			_dateTime =
				DicomConverter.GetDateTime(dicomDataSet[DicomTags.SeriesDate].GetDateTime(0),
				                           dicomDataSet[DicomTags.SeriesTime].GetDateTime(0));
			_instanceUid = dicomDataSet[DicomTags.SeriesInstanceUid].GetString(0, "");
			if (_instanceUid == "")
				_instanceUid = StudyBuilder.NewUid();
		}
Example #3
0
 internal ImageItemCollection(SopInstanceNodeCollection list)
 {
     _list = list;
     for (int n = 0; n < list.Count; n++)
     {
         //TODO: implement some way to render an icon from the dicom attributes instead of needing an ipresentationimage
         //so that we can stick the same UI mode on top of a studybuilder session created programmatically
         //so when we implement that, we can uncomment this line below and allow preinitialization of the collection
         //base.Insert(n, new ImageItem(list[n], null));
     }
 }
Example #4
0
		/// <summary>
		/// Copy constructor
		/// </summary>
		/// <param name="source"></param>
		/// <param name="copyDescendants"></param>
		private SeriesNode(SeriesNode source, bool copyDescendants) {
			_images = new SopInstanceNodeCollection(this);
			_instanceUid = StudyBuilder.NewUid();
			_description = source._description;
			_dateTime = source._dateTime;

			if(copyDescendants)
			{
				foreach (SopInstanceNode sop in source._images)
				{
					_images.Add(sop.Copy());
				}
			}
		}