Esempio n. 1
0
File: Map.cs Progetto: ewcasas/DVTK
        // -------------------------------
        // - Begin public methods region -
        // -------------------------------
        /// <summary>
        /// Convert a HLI Attribute Set to a AttributeLayer Attribute Set.
        /// </summary>
        /// <param name="attributeSetIn">The HLI Attribute Set.</param>
        /// <param name="attributeSetOut">The AttributeLayer Attribute Set.</param>
        public static void ToAttributeSet(DvtkHighLevelInterface.Dicom.Other.AttributeSet attributeSetIn, Dvtk.Dicom.AttributeLayer.AttributeSet attributeSetOut)
        {
            for (int index = 0; index < attributeSetIn.Count; index++)
            {
                DvtkHighLevelInterface.Dicom.Other.Attribute hliAttribute = attributeSetIn[index];

                Tag tag = new Tag(hliAttribute.GroupNumber, hliAttribute.ElementNumber);

                if (hliAttribute.VR != DvtkData.Dimse.VR.SQ)
                {
                    SingleAttribute singleAttribute = new SingleAttribute(tag, (VR)Enum.Parse(typeof(VR), hliAttribute.VR.ToString(), true), attributeSetOut);
                }
                else
                {
                    SequenceAttribute sequenceAttribute = new SequenceAttribute(tag, attributeSetOut);

                    for (int sequenceItemIndex = 1; sequenceItemIndex <= hliAttribute.ItemCount; sequenceItemIndex++)
                    {
                        DvtkHighLevelInterface.Dicom.Other.SequenceItem hliSequenceItem = hliAttribute.GetItem(sequenceItemIndex);

                        SequenceItem sequenceItem = new SequenceItem(sequenceAttribute);

                        ToAttributeSet(hliSequenceItem, sequenceItem);
                    }
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="tag">The tag of this instance.</param>
 /// <param name="vr">The VR of this instance.</param>
 /// <param name="parent">The parent of this instance.</param>
 public Attribute(Tag tag, VR vr, AttributeSet parent)
 {
     this.tag = tag;
     this.vr = vr;
     this.parent = parent;
     this.parent.Add(this);
 }
Esempio n. 3
0
 // -----------------------------
 // - Begin constructors region -
 // -----------------------------
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="tag">The tag of this instance.</param>
 /// <param name="vr">The VR of this instance.</param>
 /// <param name="parent">The parent of this instance.</param>
 public SingleAttribute(Tag tag, VR vr, AttributeSet parent)
     : base(tag, vr, parent)
 {
     // Do nothing.
 }
Esempio n. 4
0
 // -----------------------------
 // - Begin constructors region -
 // -----------------------------
 public SequenceAttribute(Tag tag, AttributeSet parent)
     : base(tag, VR.SQ, parent)
 {
     // Do nothing.
 }