예제 #1
0
파일: Map.cs 프로젝트: 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);
                    }
                }
            }
        }
예제 #2
0
파일: Attribute.cs 프로젝트: ewcasas/DVTK
 /// <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);
 }
예제 #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.
 }
예제 #4
0
 // -----------------------------
 // - Begin constructors region -
 // -----------------------------
 public SequenceAttribute(Tag tag, AttributeSet parent)
     : base(tag, VR.SQ, parent)
 {
     // Do nothing.
 }