From: gunter z. <gun...@us...> - 2002-06-27 11:40:18
|
Update of /cvsroot/dcm4che/dcm4che14/src/main/org/dcm4cheri/data In directory usw-pr-cvs1:/tmp/cvs-serv7951/src/main/org/dcm4cheri/data Modified Files: DcmObjectImpl.java Log Message: add getInteger fix getDateTime Index: DcmObjectImpl.java =================================================================== RCS file: /cvsroot/dcm4che/dcm4che14/src/main/org/dcm4cheri/data/DcmObjectImpl.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DcmObjectImpl.java 16 Jun 2002 19:34:36 -0000 1.10 --- DcmObjectImpl.java 27 Jun 2002 11:40:15 -0000 1.11 *************** *** 170,173 **** --- 170,185 ---- } + public Integer getInteger(int tag) throws DcmValueException { + return getInteger(tag, 0); + } + + public Integer getInteger(int tag, int index) throws DcmValueException { + DcmElement e = get(tag); + if (e == null || e.vm() <= index) + return null; + + return new Integer(e.getInt(index)); + } + public int getInt(int tag, int defVal) throws DcmValueException { return getInt(tag, 0, defVal); *************** *** 259,263 **** return null; ! DcmElement time = get(dateTag); if (time == null || time.isEmpty()) return date.getDate(); --- 271,275 ---- return null; ! DcmElement time = get(timeTag); if (time == null || time.isEmpty()) return date.getDate(); |