public DicomContentItem(DicomCodeItem code, DicomRelationship relationship, DicomValueType type, DateTime value) { Dataset = new DicomDataset(); Code = code; Relationship = relationship; Type = type; if (type == DicomValueType.Date) { Dataset.Add(DicomTag.Date, value); } else if (type == DicomValueType.Time) { Dataset.Add(DicomTag.Time, value); } else if (type == DicomValueType.DateTime) { Dataset.Add(DicomTag.DateTime, value); } else { throw new DicomStructuredReportException( "Type of DateTime is not the correct value type for {0} content item.", type); } }
public DicomContentItem Add( DicomCodeItem code, DicomRelationship relationship, DicomValueType type, DicomReferencedSOP value) { return(Add(new DicomContentItem(code, relationship, type, value))); }
public DicomContentItem Add( DicomCodeItem code, DicomRelationship relationship, DicomContinuity continuity, params DicomContentItem[] items) { return(Add(new DicomContentItem(code, relationship, continuity, items))); }
public DicomContentItem(DicomCodeItem code, DicomRelationship relationship, DicomMeasuredValue value) { Dataset = new DicomDataset(); Code = code; Relationship = relationship; Type = DicomValueType.Numeric; Dataset.Add(DicomTag.MeasuredValueSequence, value); }
public DicomContentItem(DicomCodeItem code, DicomRelationship relationship, DicomCodeItem value) { Dataset = new DicomDataset(); Code = code; Relationship = relationship; Type = DicomValueType.Code; Dataset.Add(DicomTag.ConceptCodeSequence, value); }
public DicomContentItem(DicomCodeItem code, DicomRelationship relationship, DicomUID value) { Dataset = new DicomDataset(); Code = code; Relationship = relationship; Type = DicomValueType.UIDReference; Dataset.Add(DicomTag.UID, value); }
public DicomContentItem(DicomCodeItem code, DicomRelationshipType relationship, DicomContinuity continuity, params DicomContentItem[] items) { Dataset = new DicomDataset(); Code = code; Relationship = relationship; Type = DicomValueType.Container; Continuity = continuity; Dataset.Add(DicomTag.ContentSequence, items); }
public T Get <T>(DicomCodeItem code, T defaultValue) { var item = Children().FirstOrDefault(x => x.Code == code); if (item == null) { return(default(T)); } if (typeof(T) == typeof(DicomContentItem)) { return((T)(object)item); } return(item.Get <T>()); }
public DicomContentItem(DicomCodeItem code, DicomRelationshipType relationship, DicomValueType type, DicomReferencedSOP value) { Dataset = new DicomDataset(); Code = code; Relationship = relationship; Type = type; if (type == DicomValueType.Composite || type == DicomValueType.Image || type == DicomValueType.Waveform) { Dataset.Add(DicomTag.ReferencedSOPSequence, value); } else { throw new DicomStructuredReportException("Type of DicomReferencedSOP is not the correct value type for {0} content item.", type); } }
public DicomContentItem(DicomCodeItem code, DicomRelationshipType relationship, DicomValueType type, string value) { Dataset = new DicomDataset(); Code = code; Relationship = relationship; Type = type; if (type == DicomValueType.Text) { Dataset.Add(DicomTag.TextValue, value); } else if (type == DicomValueType.PersonName) { Dataset.Add(DicomTag.PersonName, value); } else { throw new DicomStructuredReportException("Type of string is not the correct value type for {0} content item.", type); } }
public DicomStructuredReport(DicomCodeItem code, params DicomContentItem[] items) : base(code, DicomRelationshipType.Contains, DicomContinuity.Separate, items) { // relationship type is not needed for root element Dataset.Remove(DicomTag.RelationshipType); }
public DicomContentItem Add(DicomCodeItem code, DicomRelationship relationship, DicomMeasuredValue value) { return(Add(new DicomContentItem(code, relationship, value))); }
public DicomMeasuredValue(decimal value, DicomCodeItem units) { Add(DicomTag.NumericValue, value); Add(new DicomSequence(DicomTag.MeasurementUnitsCodeSequence, units)); }
public DicomStructuredReport(DicomCodeItem code, params DicomContentItem[] items) : base(code, DicomRelationship.Contains, DicomContinuity.Separate, items) { // relationship type is not needed for root element Dataset.Remove(DicomTag.RelationshipType); }