Skip to content

Commit

Permalink
handle empty TR element
Browse files Browse the repository at this point in the history
  • Loading branch information
locastre committed Nov 27, 2020
1 parent 3ab29e3 commit fb1993d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ML_Dicom/util/data2dcmElement.m
Expand Up @@ -154,9 +154,13 @@
jDate = org.dcm4che3.util.DateUtils;
tz = attr.getTimeZone();
precision = org.dcm4che3.data.DatePrecision;
date = jDate.parseTM(tz, data, 1, precision);
attr.setDate(tag, vr, []);
attr.setString(tag, vr, jDate.formatTM(tz, date));
try
date = jDate.parseTM(tz, data, 1, precision);
attr.setDate(tag, vr, []);
attr.setString(tag, vr, jDate.formatTM(tz, date));
catch
attr.setDate(tag,vr,[]);
end
case 'UI'
attr.setString(tag, vr, data);
case 'UL'
Expand Down

0 comments on commit fb1993d

Please sign in to comment.