DeCaMino
ABOUT DOCUMENTATION DOWNLOAD LICENSING SUPPORT
DOCUMENTATION
As a plugin As a library
Get/Set attributes Storage SCP Direct write Storage SCU Storage commitment Query/Retrieve SCU Query/Retrieve SCP Worklist management File-sets (DICOMDIR) Direct encapsulation
DICOM conformance Image I/O conformance Changelog

Implementing a Query/Retrieve SCP

A Query/Retrieve SCP receives queries and sends answers after comparing the data elements in the queries with the data elements in the DICOM objects it can serve. The SCP also receives requests to move DICOM objects to another application entity (usually the one that sent the query and the move request).

Implementing such SCP with DeCaMino requires the instanciantiation of a QueryRetrieveSCP:

QueryRetrieveSCP scp = new QueryRetrieveSCP(listener);
scp.start();

listener is an instance of a class representing the logic of your Q/R SCP. It must implement a method called when a query is received (how to match data elements) and a method called when a retrieve is received (which DICOM object to send). A third method is also mandatory to declare what information model it supports (what set of data elements we are able to match, following models defined in DICOM specification):

class Listener implements QueryRetrieveSCPListener {

  public void queryReceived(QueryRetrieveSCP.Operation op) {
    Identifier id = op.identifier;
    /* Search our local database for patients, studies, series or images
       matching the data elements contained in id.
       For each match, build a response identifier, and call: */
    op.sendQueryResponsePending(responseId);
    /* Then, when the matching is complete: */
    op.sendQueryResponseFinal();
  }

  public void retrieveReceived(QueryRetrieveSCP.Operation op) {
    /* Read the objects the SCU is asking for in op.identifier, 
       then write each matching objects using the operation as the 
       writer output: */
    writer.setOutput(op);
    writer.write(dmd);
    /* Then when the sending is complete: */
    op.sendRetrieveResponseFinal();
  }

  public boolean supportsSyntax(String syn) {
    return UID.PatientRootQueryRetrieveInformationModelFIND.equals(syn) ||
      UID.PatientRootQueryRetrieveInformationModelMOVE.equals(syn);
  }
}

DICOM is the registered trademark of the National Electrical Manufacturers Association for its standards publications relating to digital communications of medical information.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

apteryx is a registered trademark of apteryx, sarl.

DeCaMinoTM is a trademark of apteryx, sarl.

© apteryx 2024