public SpecificCharacterSet getSpecificCharacterSet() { return attrs.getSpecificCharacterSet(); }
public SpecificCharacterSet getSpecificCharacterSet() { if (charset != null) return charset; if (parent != null) return parent.getSpecificCharacterSet(); return null; }
public SpecificCharacterSet getSpecificCharacterSet() { return dcmobj.getSpecificCharacterSet(); }
public SpecificCharacterSet getSpecificCharacterSet() { if( ds1.contains(Tag.SpecificCharacterSet) ) return ds1.getSpecificCharacterSet(); return ds2.getSpecificCharacterSet(); }
@Override public void characters(char[] ch, int start, int length) { if ((state == State.EXPECT_VAL_OR_FIRST_ITEM && vr != VR.SQ) || state == State.EXPECT_FRAG) { sb.append(ch, start, length); vr.parseXMLValue(sb, out, false, attrs.getSpecificCharacterSet()); } }
private void onEndElement() throws SAXException { switch (state) { case EXPECT_VAL_OR_FIRST_ITEM: if (vr == VR.SQ) { attrs.putNull(tag, VR.SQ); } else { attrs.putBytes(tag, vr, getValue(vr, attrs.getSpecificCharacterSet()), false); sb.setLength(0); out.reset(); } break; case EXPECT_NEXT_ITEM: sqStack.pop(); break; default: throw new IllegalStateException("state:" + state); } state = State.EXPECT_ELM; }
public static MappedDICOMObject toMap(DicomObject obj, Path parent) { if(obj == null) return null; MappedDICOMObject map = new MappedDICOMObject(parent); SpecificCharacterSet charSet = obj.getSpecificCharacterSet(); Iterator<DicomElement> it = obj.iterator(); while(it.hasNext()){ DicomElement e = it.next(); Object o = toObject(parent , e, charSet); TagValue tag = tagStruct.getTagValue(e.tag()); String t = (tag != null) ? tag.getAlias() : Integer.toString(e.tag()); map.put(t, o); } return map; }
private void writeElement(DicomObject attrs, DicomElement a) throws SAXException, IOException { VR vr = a.vr(); final int tag = a.tag(); if (file != null) file = new File(file, StringUtils.intToHex(tag)); String fpath = fpath(tag, vr, a.length()); startAttributeElement(tag, vr, a.length(), fpath, attrs); if (a.hasItems()) { for (int i = 0, n = a.countItems(); i < n; ++i) { writeItem(a, i); } } else { if (fpath != null) { writeToFile(a.getBytes()); } else { vr.formatXMLValue(a.getBytes(), a.bigEndian(), attrs.getSpecificCharacterSet(), cbuf, ch); } } endAttributeElement(); if (file != null) file = file.getParentFile(); }
} else { vr.formatXMLValue(val, bigEndian, attrs.getSpecificCharacterSet(), cbuf, ch);
.getSpecificCharacterSet(), vr == VR.PN ? ignoreCaseOfPN : false, keys.cacheGet()));