コード例 #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
ファイル: SingleAttribute.cs プロジェクト: ewcasas/DVTK
 // -----------------------------
 // - 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
ファイル: SequenceAttribute.cs プロジェクト: ewcasas/DVTK
 // -----------------------------
 // - Begin constructors region -
 // -----------------------------
 public SequenceAttribute(Tag tag, AttributeSet parent)
     : base(tag, VR.SQ, parent)
 {
     // Do nothing.
 }