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); }
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); }
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; }