Example #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="sequenceItem">The single sequence item that encodes this Measured Value.</param>
        public MeasuredValue(SequenceItem sequenceItem)
        {
            this.sequenceItem = sequenceItem;

            this.measurementUnits = ConceptCode.CreateConceptCode(sequenceItem, "0x004008EA", measurementUnitsContext);

            this.validationResults = new ValidationResults(context);
        }
Example #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="sequenceItem">
 /// The attributeSet instance containing the DICOM attributes to construct this instance with.
 /// </param>
 /// <param name="parentContentItem">The parent Content Item.</param>
 /// <param name="position">
 /// The ordinal position of the associated Sequence Item in it's contained Content Sequence
 /// Item.
 /// </param>
 internal ContentItem(AttributeSet attributeSet, ContentItem parentContentItem, uint position)
 {
     this.attributeSet      = attributeSet;
     this.conceptName       = ConceptCode.CreateConceptCode(attributeSet, "0x0040A043", conceptNameContext);
     this.position          = position;
     this.parentContentItem = parentContentItem;
     childContentItems      = new List <ContentItem>();
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="sequenceItem">
        /// The SequenceItem instance containing the DICOM attributes to construct this instance with.
        /// </param>
        /// <param name="parentContentItem">The parent Content Item.</param>
        /// <param name="position">The ordinal position of the associated Sequence Item in it's contained Content Sequence Item.</param>
        public ContentItemWithValueTypeNum(AttributeSet attributeSet, ContentItem parentContentItem, uint position) :
            base(attributeSet, parentContentItem, position)
        {
            DvtkHighLevelInterface.Dicom.Other.Attribute attribute = attributeSet["0x0040A300"];

            if (attribute.Exists)
            {
                if (attribute.VR == VR.SQ)
                {
                    if (attribute.ItemCount > 0)
                    {
                        this.measuredValue = new MeasuredValue(attribute.GetItem(1));
                    }
                }
            }

            this.numericValueQualifier = ConceptCode.CreateConceptCode(attributeSet, "0x0040A301", numericValueQualifierContext);
        }
Example #4
0
        //
        // - Methods -
        //

        /// <summary>
        /// Create a ConceptCode instance, if the specified Sequence Attribute is present in the
        /// supplied Attribute Set and the Sequence Attribute contains at least one Sequence Item.
        /// </summary>
        /// <param name="attributeSet">
        /// The Attribute Set in which the Sequence Attribute may be present.
        /// </param>
        /// <param name="tag">The Tag of the Sequence Attribute.</param>
        /// <returns>
        /// The created ConceptCode instance if the first Sequence Item exists.
        /// Null otherwise.
        /// </returns>
        internal static ConceptCode CreateConceptCode(AttributeSet attributeSet, String tag, string context)
        {
            ConceptCode conceptCode = null;

            DvtkHighLevelInterface.Dicom.Other.Attribute attribute = attributeSet[tag];

            if (attribute.Exists)
            {
                if (attribute.VR == VR.SQ)
                {
                    if (attribute.ItemCount > 0)
                    {
                        conceptCode = new ConceptCode(attribute.GetItem(1), context);
                    }
                }
            }

            return(conceptCode);
        }
Example #5
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="sequenceItem">
 /// The AttributeSet instance containing the DICOM attributes to construct this instance with.
 /// </param>
 /// <param name="parentContentItem">The parent Content Item.</param>
 /// <param name="position">The ordinal position of the associated Sequence Item in it's contained Content Sequence Item.</param>
 public ContentItemWithValueTypeCode(AttributeSet attributeSet, ContentItem parentContentItem, uint position) :
     base(attributeSet, parentContentItem, position)
 {
     this.conceptCode = ConceptCode.CreateConceptCode(attributeSet, "0x0040A168", conceptCodeContext);
 }