thanili
thanili

Reputation: 617

Read the contents of a private dicom tag with dcm4che2 toolkit

My question is quite simple: How can i read a private dicom TAG (e.g. 0019,105A) ny using the dcm4che2 toolkit?

I am able to parse/read "public" dicom tags by using:

try {
            DicomObject dcmObj5;
            DicomInputStream din5 = null;
            din5 = new DicomInputStream(file);
            dcmObj5 = din5.readDicomObject();
            tmpSeriesId = dcmObj5.getString(Tag.SeriesInstanceUID);
            din5.close(); 
    }
        catch (IOException e) {
                e.printStackTrace();
    }

Can i use somehow getString() to read a private dicom tag?

Upvotes: 0

Views: 1138

Answers (1)

cneller
cneller

Reputation: 1582

The proper thing to do is to add the private attributes to your library (see http://www.dcm4che.org/confluence/display/d2/Adding+private+tags+to+the+dictionary).

Another option to try is to specify the VR (assuming you know it) and use

getString(int tag, VR vr)

Upvotes: 1

Related Questions