get VR of a private TAG (without using dictionary VRMap)

88 views
Skip to first unread message

Thanasis Iliopoulos

unread,
Jun 5, 2015, 6:37:03 AM6/5/15
to dcm...@googlegroups.com

i am trying to check if there is a way to extract VR (value representation) from a private DICOM tag.

i am aware that DicomObject.vROf:

http://www.dcm4che.org/docs/dcm4che2-apidocs/org/dcm4che2/data/DicomObject.html#vrOf(int)

returns UN if no a VRMap is configured for this private TAGS! i would like to do something like:

vR = dcmObj4.vrOf(0X0051100b).toString();
    if("LO".equals(vR)) {
        log.info("VR of acquisitionMatrix is: " + vR);
        acquisitionMatrixX = dcmObj4.getString(0X0051100b, VR.LO);
    } else if ("SH".equals(vR)) {
        log.info("VR of acquisitionMatrix is: " + vR);
        acquisitionMatrixX = dcmObj4.getString(0X0051100b, VR.SH);
    } else if ("UN".equals(vR)) {
        log.info("VR of acquisitionMatrix is: " + vR);
        acquisitionMatrixX = dcmObj4.getString(0X0051100b, VR.UN);
    } else {
        log.info("VR of acquisitionMatrix is OTHER: " + vR);
    }

The fact is that i am trying to parse dicom files from specific vendor/models and i can see that even for the same vendor/model combination different VRs can be used on the same private TAG!

Can i extract VR of a private dicom tag on dynamically?

Reply all
Reply to author
Forward
0 new messages