Perform a Query/Retrieve on a network DICOM node

385 views
Skip to first unread message

jhleg...@vicomtech.org

unread,
May 18, 2017, 6:01:52 AM5/18/17
to dcm4che
Hi,
I'm trying to perform a query/retrieve on a given network DICOM node using dcm4che.

The findscu.test.QueryTool [1] seems a handy class for that purpose. However, given that I am a begineer in dcm4che I don't know which are the parameters I should set to the QueryTool instance. I have set a dcm4chee PACS using docker, and also have an OsiriX DICOM server instance where I could query/fetch the studies.

Although I've been having a look at the doc, older posts, or the command line example parameters of the findscu tool [2], I cannot find the right workflow.

According to the QueryTool constructor, the necessary parameters are:
  • String host (e.g. "192.168.7.31")
  • int port (e.g.1025)
  • String aeTitle (e.g. "OsiriXAE")
  • String queryLevel (could it be "STUDY", according to [2]?)
  • String queryModel (?)
  • boolean relational (I've set it to false without little or no idea about what this implies, but I'd be grateful if anyone could provide me with details about the differences of a relational/non-relational query/retrieval)
  • Device device (?)
  • String sourceAETitle
  • Connection conn (?)

Which is the name I need to set to the Device instance?

Which are the parameters I need to set to the Connection instance? What's its String commonName parameter supposed to be? What's it's String hostname supposed to be, the remote DICOM node hostname, its IP address? Or the "local" machine hostname/IP where I'm developping/running the program?

Should I be creating an artificial AE (so that I can have a sourceAETitle as well) in my program to be able to Q/R the remote DICOM node? Should I then add this AE to the device (e.g. device.addApplicationEntity(ae);)  and add the connection to this AE ( ae.addConnection(connection);)?

Thanks,
Jon

jhleg...@vicomtech.org

unread,
May 22, 2017, 8:09:58 AM5/22/17
to dcm4che
Hi,
solved the issue; I was configuring the QueryTool instance with the wrong parameters.

What worked was:

String localAETitle = "LocalAETitle";
String localHostName = "localMachine.domainName";
int localPort = 11112;

String remoteAETitle = "OsiriXAE";
String remoteHost = "remoteMachine.domainName";
int remotePort = 1025;

Device device = new Device(localHostName);

Connection connection = new Connection(localAETitle, localHostName, localPort);
connection.setDevice(device);

ApplicationEntity ae = new ApplicationEntity(remoteAETitle);
device.addApplicationEntity(ae);
ae.addConnection(connection);

String queryLevel = "STUDY";
String queryModel = "";

boolean relational = false;

QueryTool queryTool = new QueryTool(remoteHost, remotePort, remoteAETitle, queryLevel, queryModel,
        relational, device, localAETitle, connection);

String testDescription = "QueryTest";

try {
    queryTool.query(testDescription);
    }
    catch (Exception e) {
        System.err.println(e.getMessage());
        e.printStackTrace();
        System.exit(2);
    }


Hope this helps others in case they bump into similar issues.

Jon
Reply all
Reply to author
Forward
0 new messages