/// <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; }
/// <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 = ""; }
/// <summary> /// Constructs a new <see cref="SopInstanceNode"/> using the given <see cref="DicomFile"/> as a template. /// </summary> /// <param name="sourceDicomFile">The <see cref="DicomFile"/> from which to initialize this node.</param> public SopInstanceNode(DicomMessageBase sourceDicomFile) { _dicomFile = new DicomFile("", sourceDicomFile.MetaInfo.Copy(), sourceDicomFile.DataSet.Copy()); _instanceUid = sourceDicomFile.DataSet[DicomTags.SopInstanceUid].GetString(0, ""); if (_instanceUid == "") { _instanceUid = StudyBuilder.NewUid(); } }
/// <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(); } }
/// <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(); } }
/// <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()); } } }
/// <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)); } } }
/// <summary> /// Copy constructor /// </summary> /// <param name="source"></param> private SopInstanceNode(SopInstanceNode source) { _instanceUid = StudyBuilder.NewUid(); _dicomFile = new DicomFile("", source._dicomFile.MetaInfo.Copy(true, true, true), source._dicomFile.DataSet.Copy(true, true, true)); }
/// <summary> /// Constructs a new <see cref="SopInstanceNode"/> using default values. /// </summary> public SopInstanceNode() { _dicomFile = new DicomFile(""); _instanceUid = StudyBuilder.NewUid(); }