public TagD(int tagID, String privateCreatorID, int vmMin, int vmMax, Object defaultValue) { this(tagID, null, privateCreatorID, ElementDictionary.vrOf(tagID, privateCreatorID), vmMin, vmMax, defaultValue); }
private void appendKeyword(DicomInputStream dis, StringBuilder line) { if (line.length() < width) { line.append(" "); line.append(ElementDictionary.keywordOf(dis.tag(), null)); if (line.length() > width) line.setLength(width); } }
private void setDummyValues(String[] optVals) { if (optVals != null) for (int i = 1; i < optVals.length; i++, i++) { int tag = CLIUtils.toTag(optVals[i - 1]); VR vr = ElementDictionary.getStandardElementDictionary().vrOf(tag); deidentifier.setDummyValue(tag, vr, optVals[i]); } }
public static int tagForKeyword(String keyword, String privateCreatorID) { return getElementDictionary(privateCreatorID).tagForKeyword(keyword); }
public static VR vrOf(int tag, String privateCreator) { return getElementDictionary(privateCreator).vrOf(tag); }
public static String keywordOf(int tag, String privateCreator) { return getElementDictionary(privateCreator).keywordOf(tag); }
CSVParser(char delim, char quote, String header) { quot = quote; String regex = delim + "(?=(?:[^\\" + quot + "]*\\" + quot + "[^\\" + quot + "]*\\" + quot + ")*[^\\" + quot + "]*$)"; pattern = Pattern.compile(regex); String[] headers = parseFields(header); tags = new int[headers.length]; vrs = new VR[headers.length]; for (int i = 0; i < headers.length; i++) { tags[i] = DICT.tagForKeyword(headers[i]); vrs[i] = DICT.vrOf(tags[i]); } }
TagType type = tag.getType(); int id = tag.getId(); String key = dic.keywordOf(id); if (val == null || !StringUtil.hasLength(key)) { return; dataset.setString(id, dic.vrOf(id), (String[]) val); } else { dataset.setString(id, dic.vrOf(id), val.toString()); dataset.setDate(id, dic.vrOf(id), TagUtil.toLocalDate((TemporalAccessor) val)); } else if (val.getClass().isArray()) { dataset.setDate(id, dic.vrOf(id), TagUtil.toLocalDates(val)); dataset.setInt(id, dic.vrOf(id), (Integer) val); } else if (val instanceof int[]) { dataset.setInt(id, dic.vrOf(id), (int[]) val); dataset.setFloat(id, dic.vrOf(id), (Float) val); } else if (val instanceof float[]) { dataset.setFloat(id, dic.vrOf(id), (float[]) val); dataset.setDouble(id, dic.vrOf(id), (Double) val); } else if (val instanceof double[]) { dataset.setDouble(id, dic.vrOf(id), (double[]) val);
private static String addRequestParameters(final QidoRS main, String url) throws UnsupportedEncodingException { ElementDictionary dict = ElementDictionary.getStandardElementDictionary(); for (int tag : main.returnAttrs.tags()) { if (!TagUtils.isPrivateCreator(tag)) { url = addParam(url, "includefield", ElementDictionary.keywordOf(tag, main.returnAttrs.getPrivateCreator(tag)));
public static void fillAttributes(Map<TagW, Object> tags, Attributes dataset) { if (tags != null && dataset != null) { ElementDictionary dic = ElementDictionary.getStandardElementDictionary(); for (Entry<TagW, Object> entry : tags.entrySet()) { fillAttributes(dataset, entry.getKey(), entry.getValue(), dic); } } }
public static ElementDictionary getElementDictionary( String privateCreator) { if (privateCreator != null) synchronized (loader) { for (ElementDictionary dict : loader) if (privateCreator.equals(dict.getPrivateCreator())) return dict; } return getStandardElementDictionary(); }
public static int toTag(String tagOrKeyword) { try { return Integer.parseInt(tagOrKeyword, 16); } catch (IllegalArgumentException e) { int tag = ElementDictionary.tagForKeyword(tagOrKeyword, null); if (tag == -1) throw new IllegalArgumentException(tagOrKeyword); return tag; } }
values[tmIndex] = updateTimeZoneDT(from, to, (String) tm); } else { int daTag = ElementDictionary.getElementDictionary(privateCreatorOf(tmTag)).daTagOf(tmTag); int daIndex = daTag != 0 ? indexOf(daTag) : -1; Object da = daIndex >= 0 ? decodeStringValue(daIndex) : Value.NULL;
CSVParser(char delim, char quote, String header) { quot = quote; String regex = delim + "(?=(?:[^\\" + quot + "]*\\" + quot + "[^\\" + quot + "]*\\" + quot + ")*[^\\" + quot + "]*$)"; pattern = Pattern.compile(regex); String[] headers = parseFields(header); tags = new int[headers.length]; vrs = new VR[headers.length]; for (int i = 0; i < headers.length; i++) { tags[i] = DICT.tagForKeyword(headers[i]); vrs[i] = DICT.vrOf(tags[i]); } }
public static String getKeywordFromTag(int tagID, String privateCreatorID) { return ElementDictionary.getElementDictionary(privateCreatorID).keywordOf(tagID); }
public static void fillAttributes(Iterator<Entry<TagW, Object>> iter, Attributes dataset) { if (iter != null && dataset != null) { ElementDictionary dic = ElementDictionary.getStandardElementDictionary(); while (iter.hasNext()) { Entry<TagW, Object> entry = iter.next(); fillAttributes(dataset, entry.getKey(), entry.getValue(), dic); } } }
public static int toTag(String tagOrKeyword) { try { return Integer.parseInt(tagOrKeyword, 16); } catch (IllegalArgumentException e) { int tag = ElementDictionary.tagForKeyword(tagOrKeyword, null); if (tag == -1) throw new IllegalArgumentException(tagOrKeyword); return tag; } }
public TagD(int tagID, String displayedName, String privateCreatorID, int vmMin, int vmMax, Object defaultValue) { this(tagID, displayedName, privateCreatorID, ElementDictionary.vrOf(tagID, privateCreatorID), vmMin, vmMax, defaultValue); }
private void setDummyValues(String[] optVals) { if (optVals != null) for (int i = 1; i < optVals.length; i++, i++) { int tag = CLIUtils.toTag(optVals[i - 1]); VR vr = ElementDictionary.getStandardElementDictionary().vrOf(tag); deidentifier.setDummyValue(tag, vr, optVals[i]); } }