How to get private vendor attribute tag in C_FIND from pixelmed?

Tags: , ,



i’m trying to read a private vendor tag from a dicom server. The only tags I’m able to read successfully are the standard DICOM tagFromNames the tag is 2001,100b, and in my example set of files they definitely have that entry in their header

here is the code for calling the CFIND request

SpecificCharacterSet specificCharacterSet = new SpecificCharacterSet((String[])null);

        AttributeList identifier = new AttributeList();

        //specify attributes to retrieve and pass in any search criteria
        //query root of "study" to retrieve studies
        studies.removeAllElements();

        identifier.putNewAttribute(TagFromName.QueryRetrieveLevel).addValue("STUDY"); 
        identifier.putNewAttribute(TagFromName.PatientName,specificCharacterSet).addValue("*");
        identifier.putNewAttribute(TagFromName.PatientID,specificCharacterSet);
        identifier.putNewAttribute(TagFromName.StudyID);
        identifier.putNewAttribute(TagFromName.PatientAge);
        identifier.putNewAttribute(TagFromName.PatientSex);
        identifier.putNewAttribute(TagFromName.ModalitiesInStudy);
        identifier.putNewAttribute(TagFromName.AccessionNumber);
        identifier.putNewAttribute(TagFromName.StudyInstanceUID);
        identifier.putNewAttribute(TagFromName.StudyDescription);
        identifier.putNewAttribute(TagFromName.StudyDate).addValue(date);
        identifier.putNewAttribute(TagFromName.StudyTime);

        AttributeTag at = new com.pixelmed.dicom.AttributeTag("0x2001,0x100b");
        identifier.putNewAttribute(at);

        IdentifierHandler ih = new IdentifierHandler(){
            @Override
            public void doSomethingWithIdentifier(AttributeList id) throws DicomException {
               studies.add(new Study(id, reportfolder));

//Attempt to read private dicom tag from received identifier
                    System.out.println(id.get(at));
            }

        };
        new FindSOPClassSCU(serv.getAddress(),serv.getPort(), serv.getAetitle(), "ISPReporter",SOPClass.StudyRootQueryRetrieveInformationModelFind,identifier,ih);

However, my output from the query, receives 7 identifiers that match for the date however when I try to read the 2001,100b tag, the error I get reads:

DicomException: No such data element as (0x2001,0x100b) in dictionary

if I use this line instead

identifier.put(new com.pixelmed.dicom.TextAttribute(at) {
                 public int getMaximumLengthOfEntireValue() {  return 20; }
             });

Then I get:

null
null
null
null
null
null
null

(null for each identifier returned)

Answer

Two things (second one moot because this won’t work anyway because of the first):

  1. C-FIND SCPs query against a database of a subset of data elements previously extracted from the DICOM image header and indexed – only a (small) subset of data elements present in images are actually indexed, as described; the standard requires very few in the Query Information Models, and the IHE Scheduled Workflow (SWF) profile a few more (Query Images Transaction Table 4.14-1; implementers could index every data element (or at least every standard data elements), but this is rarely done (PixelMed doesn’t, though I have consider doing it adaptively as data elements are encountered now that hsqldb supports adding columns; NoSQL based implementations might find this easier)

  2. When you encode a private data element, whether it be in a query identifier/response, or in an image header, you need to include its creator; i.e., for (2001,100b), you need to include (2001,0010); otherwise the creator of the private data element is not specified.

David



Source: stackoverflow