AddFragment() 공개 메소드

public AddFragment ( ByteBuffer fragment ) : void
fragment ByteBuffer
리턴 void
예제 #1
0
        public override DcmItem Clone()
        {
            DcmFragmentSequence sq = new DcmFragmentSequence(Tag, VR, StreamPosition, Endian);

            sq.SetOffsetTable(OffsetTable);
            foreach (ByteBuffer fragment in Fragments)
            {
                sq.AddFragment(fragment.Clone());
            }
            return(sq);
        }
예제 #2
0
파일: XDicom.cs 프로젝트: xiaotie/mdcm
        private static void SaveFragmentItem(XElement item, DcmFragmentSequence seq)
        {
            ByteBuffer bb = new ByteBuffer();

            string[] strs = item.FirstText().Split('\\');
            if (seq.VR == DicomVR.OW)
            {
                foreach (string s in strs)
                {
                    bb.Writer.Write(ushort.Parse(s, NumberStyles.HexNumber, CultureInfo.InvariantCulture));
                }
            }
            else
            {
                foreach (string s in strs)
                {
                    bb.Writer.Write(byte.Parse(s, NumberStyles.HexNumber, CultureInfo.InvariantCulture));
                }
            }
            seq.AddFragment(bb);
        }
예제 #3
0
 public override DcmItem Clone()
 {
     DcmFragmentSequence sq = new DcmFragmentSequence(Tag, VR, StreamPosition, Endian);
     sq.SetOffsetTable(OffsetTable);
     foreach (ByteBuffer fragment in Fragments)
     {
         sq.AddFragment(fragment.Clone());
     }
     return sq;
 }
예제 #4
0
파일: XDicom.cs 프로젝트: GMZ/mdcm
 private static void SaveFragmentItem(XElement item, DcmFragmentSequence seq)
 {
     ByteBuffer bb = new ByteBuffer();
     string[] strs = item.FirstText().Split('\\');
     if (seq.VR == DicomVR.OW)
     {
         foreach (string s in strs)
         {
             bb.Writer.Write(ushort.Parse(s, NumberStyles.HexNumber, CultureInfo.InvariantCulture));
         }
     }
     else
     {
         foreach (string s in strs)
         {
             bb.Writer.Write(byte.Parse(s, NumberStyles.HexNumber, CultureInfo.InvariantCulture));
         }
     }
     seq.AddFragment(bb);
 }