Read private TAGS from various vendors

77 views
Skip to first unread message

Thanasis Iliopoulos

unread,
May 26, 2015, 8:49:30 AM5/26/15
to dcm...@googlegroups.com
Hello Guys,

i am wondering on which is the most efficient way to setup & build a JAVA application (using dcm4che toolkit) for being able to indentify and parse in a proper way DICOMs from various vendors.

For example at the moment i need to parse private tags from MRIs manufactured by Siemens, GE and Philips. I can see that even for the same vendor there are differences in the VR of the same private tags.

At the moment i am trying to parse these private TAGs by using code as the one listed below:

//get acquisitionMatrixX of a DICOM file
public String getAcquisitionMatrixX(File file) throws IOException {
        
        String acquisitionMatrixX =null;
        String manufacturer = null;
        
        CheckIfIsDicom checkFile = new CheckIfIsDicom();
        
        if(checkFile.checkIfDicomObjectFileB(file)) {
            try {
                
                DicomObject dcmObj4;
                DicomInputStream din4 = null;
                din4 = new DicomInputStream(file);
                dcmObj4 = din4.readDicomObject();
                
                manufacturer = dcmObj4.getString(Tag.Manufacturer);
                
                if(manufacturer.contains("GE")) {                    
                    acquisitionMatrixX = dcmObj4.getString(0X00181310, VR.US);
                    log.info("GE machine |acquisitionMatrixX| --------- Value for tag: " + acquisitionMatrixX);
                } else if (manufacturer.contains("SIEMENS")) {
                    //IN CASE OF some models VR.SH & UN
                    acquisitionMatrixX = dcmObj4.getString(0X0051100b, VR.LO);
                    log.info("SIEMENS machine |acquisitionMatrixX| --------- Value for tag: " + acquisitionMatrixX);
                } else if (manufacturer.toLowerCase().contains("PHILIPS".toLowerCase())) {
                    acquisitionMatrixX = dcmObj4.getString(0X00189058, VR.US);
                    log.info("PHILIPS machine |acquisitionMatrixX| --------- Value for tag: " + acquisitionMatrixX);
                } else {
                    acquisitionMatrixX = "";
                }
                
                din4.close(); 
            }
            catch (IOException e) {
                    e.printStackTrace();
            } finally {
                if("".equals(acquisitionMatrixX) || acquisitionMatrixX==null) {
                    acquisitionMatrixX="-100000";
                } else {
                }
            }
        } else {
            log.info("### IS NOT DICOM! ####");
            log.info("Selected file is not a DICOM Object");
        }
        
        return acquisitionMatrixX;
    }

However i do not think that such a way of parsing DICOM tags from different vendors is the most efficient in terms of consistency and maintenance of code/logic!

Does anybody has developed an application with such a requirement? Are there any other ways to try and automate this process (e.g. by using data dictionaries per vendor/model?)

Anybody has some rough propositions or guideliness on that?

Thanks!

Dimitri Pianeta

unread,
May 27, 2015, 4:01:04 AM5/27/15
to dcm...@googlegroups.com
A list tag for philips private here https://github.com/INCF/NeuroimagingMetadata/wiki/PhilipsAchieva2.
      
Reply all
Reply to author
Forward
0 new messages