protected static String keyWordOf(final QidoRS main, ElementDictionary dict, int tag, Attributes attrs) { String keyword; if(attrs.getPrivateCreator(tag) != null) { keyword = ElementDictionary.keywordOf(tag, attrs.getPrivateCreator(tag)); } else { keyword = dict.keywordOf(tag); } return keyword; }
private boolean isBulkData(Attributes attrs) { return bulkDataDescriptor.isBulkData(itemPointers, attrs.getPrivateCreator(tag), tag, vr, length); }
public void addKey(int tag, String... ss) { log = Utility.getLog(); log.debug("MoveSCU::addKey tag=" + Integer.toHexString(tag)); for (String s: ss) { log.debug(" Value=" + s); } VR vr = ElementDictionary.vrOf(tag, keys.getPrivateCreator(tag)); keys.setString(tag, vr, ss); }
public void addKey(int tag, String... ss) { VR vr = ElementDictionary.vrOf(tag, keys.getPrivateCreator(tag)); keys.setString(tag, vr, ss); }
public void addKey(int tag, String... ss) { VR vr = ElementDictionary.vrOf(tag, keys.getPrivateCreator(tag)); keys.setString(tag, vr, ss); }
public void addKey(int tag, String... ss) { VR vr = ElementDictionary.vrOf(tag, keys.getPrivateCreator(tag)); keys.setString(tag, vr, ss); }
@Override public void readValue(DicomInputStream dis, Attributes attrs) throws IOException { int tag = dis.tag(); if (dis.level() == 0 && tag == Tag.PixelData) { imageDescriptor = new ImageDescriptor(attrs); initDicomOutputStream(); processPixelData(); postPixelData = new Attributes(dis.bigEndian()); } else { dis.readValue(dis, attrs); if (postPixelData != null && dis.level() == 0) postPixelData.addSelected(attrs, attrs.getPrivateCreator(tag), tag); } }
private void writeAttribute(int tag, VR vr, Object value, SpecificCharacterSet cs, Attributes attrs) throws SAXException { if (TagUtils.isGroupLength(tag) || TagUtils.isPrivateCreator(tag)) return; String privateCreator = attrs.getPrivateCreator(tag); addAttributes(tag, vr, privateCreator); startElement("DicomAttribute"); if (value instanceof Value) writeAttribute((Value) value, attrs.bigEndian()); else if (!vr.isInlineBinary()) { writeValues(vr, value, attrs.bigEndian(), attrs.getSpecificCharacterSet(vr)); } else if (value instanceof byte[]) { writeInlineBinary(attrs.bigEndian() ? vr.toggleEndian((byte[]) value, true) : (byte[]) value); } else throw new IllegalArgumentException("vr: " + vr + ", value class: " + value.getClass()); endElement("DicomAttribute"); }
if (vr == VR.UN) { vr = ElementDictionary.vrOf(tag, attrs.getPrivateCreator(tag)); if (vr == VR.UN && length == -1)
private void readFragments(Attributes attrs, int fragsTag, VR vr) throws IOException { Fragments frags = new Fragments(vr, attrs.bigEndian(), 10); String privateCreator = attrs.getPrivateCreator(fragsTag); for (int i = 0; readItemHeader(); ++i) { addItemPointer(fragsTag, privateCreator, i); handler.readValue(this, frags); removeItemPointer(); } if (frags.isEmpty()) attrs.setNull(fragsTag, vr); else { frags.trimToSize(); attrs.setValue(fragsTag, vr, frags); } }
private void readSequence(int len, Attributes attrs, int sqtag) throws IOException { if (len == 0) { attrs.setNull(sqtag, VR.SQ); return; } Sequence seq = attrs.newSequence(sqtag, 10); String privateCreator = attrs.getPrivateCreator(sqtag); boolean undefLen = len == -1; long endPos = pos + (len & 0xffffffffL); boolean explicitVR0 = explicitVR; boolean bigEndian0 = bigEndian; if (encodedVR == 0x554e // UN && !probeExplicitVR()) { explicitVR = false; bigEndian = false; } for (int i = 0; (undefLen || pos < endPos) && readItemHeader(); ++i) { addItemPointer(sqtag, privateCreator, i); handler.readValue(this, seq); removeItemPointer(); } explicitVR = explicitVR0; bigEndian = bigEndian0; if (seq.isEmpty()) attrs.setNull(sqtag, VR.SQ); else seq.trimToSize(); }
public static void addAttributes(Attributes attrs, int[] tags, String... ss) { Attributes item = attrs; for (int i = 0; i < tags.length-1; i++) { int tag = tags[i]; Sequence sq = item.getSequence(tag); if (sq == null) sq = item.newSequence(tag, 1); if (sq.isEmpty()) sq.add(new Attributes()); item = sq.get(0); } int tag = tags[tags.length-1]; VR vr = ElementDictionary.vrOf(tag, item.getPrivateCreator(tag)); if (ss.length == 0) if (vr == VR.SQ) item.newSequence(tag, 1).add(new Attributes(0)); else item.setNull(tag, vr); else item.setString(tag, vr, ss); }
public static void addAttributes(Attributes attrs, int[] tags, String... ss) { Attributes item = attrs; for (int i = 0; i < tags.length-1; i++) { int tag = tags[i]; Sequence sq = item.getSequence(tag); if (sq == null) sq = item.newSequence(tag, 1); if (sq.isEmpty()) sq.add(new Attributes()); item = sq.get(0); } int tag = tags[tags.length-1]; VR vr = ElementDictionary.vrOf(tag, item.getPrivateCreator(tag)); if (ss.length == 0) if (vr == VR.SQ) item.newSequence(tag, 1).add(new Attributes(0)); else item.setNull(tag, vr); else item.setString(tag, vr, ss); }
dis.skipFully(len); } else try { String privateCreator = attrs.getPrivateCreator(tag); addAttributes(tag, vr, privateCreator); startElement("DicomAttribute");
for (int tag : main.returnAttrs.tags()) { if (!TagUtils.isPrivateCreator(tag)) { url = addParam(url, "includefield", ElementDictionary.keywordOf(tag, main.returnAttrs.getPrivateCreator(tag)));