public static LocalDateTime getDicomDateTime(TimeZone tz, String value) { return getDicomDateTime(tz, value, false); }
public static TemporalAccessor[] getDatesFromElement(XMLStreamReader xmler, String attribute, TagType type, TemporalAccessor[] defaultValue, String separator) { if (attribute != null) { String val = xmler.getAttributeValue(null, attribute); if (val != null) { String[] strs = val.split(Pattern.quote(separator)); TemporalAccessor[] vals = new TemporalAccessor[strs.length]; for (int i = 0; i < strs.length; i++) { if (TagType.TIME.equals(type)) { vals[i] = getDicomTime(strs[i]); } else if (TagType.DATETIME.equals(type)) { vals[i] = getDicomDateTime(null, strs[i]); } else { vals[i] = getDicomDate(strs[i]); } } return vals; } } return defaultValue; }
public static TemporalAccessor[] getDatesFromDicomElement(XMLStreamReader xmler, String attribute, TagType type, TemporalAccessor[] defaultValue, String separator) { if (attribute != null) { String val = xmler.getAttributeValue(null, attribute); if (val != null) { String[] strs = val.split(Pattern.quote(separator)); TemporalAccessor[] vals = new TemporalAccessor[strs.length]; for (int i = 0; i < strs.length; i++) { if (TagType.DICOM_TIME.equals(type)) { vals[i] = TagD.getDicomTime(strs[i]); } else if (TagType.DICOM_DATETIME.equals(type)) { vals[i] = TagD.getDicomDateTime(null, strs[i]); } else { vals[i] = TagD.getDicomDate(strs[i]); } } return vals; } } return defaultValue; }
public static TemporalAccessor getDateFromElement(XMLStreamReader xmler, String attribute, TagType type, TemporalAccessor defaultValue) { if (attribute != null) { String val = xmler.getAttributeValue(null, attribute); if (val != null) { if (TagType.DICOM_TIME.equals(type)) { return getDicomTime(val); } else if (TagType.DICOM_DATETIME.equals(type)) { return getDicomDateTime(null, val); } else { return getDicomDate(val); } } } return defaultValue; }
public static TemporalAccessor getDateFromDicomElement(XMLStreamReader xmler, String attribute, TagType type, TemporalAccessor defaultValue) { if (attribute != null) { String val = xmler.getAttributeValue(null, attribute); if (val != null) { if (TagType.DICOM_TIME.equals(type)) { return TagD.getDicomTime(val); } else if (TagType.DICOM_DATETIME.equals(type)) { return TagD.getDicomDateTime(null, val); } else { return TagD.getDicomDate(val); } } } return defaultValue; }
LocalDateTime[] is = new LocalDateTime[ss.length]; for (int i = 0; i < is.length; i++) { is[i] = TagD.getDicomDateTime(null, data); value = TagD.getDicomDateTime(null, data);