public DicomElement putSequence(int tag, int capacity) { return ds1.putSequence(tag,capacity); }
public DicomElement putSequence(int tag) { return ds1.putSequence(tag); }
public DicomElement putSequence(int tag, int capacity) { if (!filter(tag)) { throw new UnsupportedOperationException(); } return attrs.putSequence(tag, capacity); }
public DicomElement putSequence(int tag) { if (!filter(tag)) { throw new UnsupportedOperationException(); } return attrs.putSequence(tag); }
public DicomElement putSequence(int[] tagPath) { checkTagPathLength(tagPath); int last = tagPath.length - 1; DicomObject item = getItem(tagPath, last, false); return item.putSequence(tagPath[last]); }
public DicomElement putSequence(int[] tagPath, int capacity) { checkTagPathLength(tagPath); int last = tagPath.length - 1; DicomObject item = getItem(tagPath, last, false); return item.putSequence(tagPath[last], capacity); }
private void onStartItem(String offStr, String src) { this.src = src; if (state != State.EXPECT_VAL_OR_FIRST_ITEM && state != State.EXPECT_NEXT_ITEM) { throw new IllegalStateException("state:" + state); } if (state == State.EXPECT_VAL_OR_FIRST_ITEM) { sqStack.push(vr == VR.SQ ? attrs.putSequence(tag) : attrs .putFragments(tag, vr, false)); } DicomElement sq = sqStack.peek(); if (sq.vr() == VR.SQ) { DicomObject parent = attrs; attrs = new BasicDicomObject(); ((BasicDicomObject) attrs).setParent(parent); if (offStr != null) { attrs.setItemOffset(Long.parseLong(offStr)); } sq.addDicomObject(attrs); state = State.EXPECT_ELM; } else { sb.setLength(0); state = State.EXPECT_FRAG; } }
private void copyConceptNameModifiers(DicomObject dcmobj, DicomObject rec) { DicomElement objsq = dcmobj.get(Tag.ContentSequence); if (objsq == null) { return; } DicomElement recsq = null; DicomObject item; for (int i = 0, n = objsq.countItems(); i < n; i++) { item = objsq.getDicomObject(i); if ("HAS CONCEPT MOD".equals(item.getString(Tag.RelationshipType))) { if (recsq == null) { // lazy sequence creation recsq = rec.putSequence(Tag.ContentSequence); } recsq.addDicomObject(item); } } }
actionInfo.putString(Tag.TransactionUID, VR.UI, UIDUtils.createUID()); DicomElement refSOPSq = actionInfo.putSequence(Tag.ReferencedSOPSequence); for (int i = 0, n = files.size(); i < n; ++i) { FileInfo info = files.get(i);
actionInfo.putString(Tag.TransactionUID, VR.UI, UIDUtils.createUID()); DicomElement refSOPSq = actionInfo.putSequence(Tag.ReferencedSOPSequence); for (int i = 0, n = files.size(); i < n; ++i) { FileInfo info = files.get(i);
default: if (vallen == -1 || vr == VR.SQ ) { DicomElement a = vr == VR.SQ ? attrs.putSequence(tag) : attrs .putFragments(tag, vr, ts.bigEndian()); readItems(a, vallen);
private DicomObject getItem(int[] itemPath, int pathLen, boolean readonly) { DicomObject item = this; for (int i = 0; i < pathLen; ++i, ++i) { DicomElement sq = item.get(itemPath[i]); if (sq == null || !sq.hasItems()) { if (readonly) { return null; } sq = item.putSequence(itemPath[i]); } while (sq.countItems() <= itemPath[i + 1]) { if (readonly) { return null; } sq.addDicomObject(new BasicDicomObject()); } item = sq.getDicomObject(itemPath[i + 1]); } return item; }
if (vallen == -1) { if (sq.vr() == VR.UN) { DicomElement tmp = attrs.putSequence(sq.tag()); for (int i = 0, n = sq.countItems(); i < n; ++i) { byte[] b = sq.getFragment(i);
DicomElement t; if (vr == VR.SQ) { t = dest.putSequence(destTag, n); for (int i = 0; i < n; i++) { DicomObject srcItem = attr.getDicomObject(i);