AddFragment() public method

public AddFragment ( ByteBuffer fragment ) : void
fragment ByteBuffer
return void
Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
Archivo: XDicom.cs Proyecto: 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);
 }