C-FIND SCU — DICOM Query Service Class User.
Sends a C-FIND-RQ to a remote SCP to query DICOM data sets, equivalent to
DCMTK's findscu or dcm4che's findscu.
Usage
{:ok, assoc} = Dimse.Scu.open("192.168.1.10", 11112,
calling_ae: "MY_SCU",
called_ae: "REMOTE_SCP",
abstract_syntaxes: ["1.2.840.10008.5.1.4.1.2.2.1"] # Study Root
)
{:ok, results} = Dimse.Scu.Find.query(assoc, "1.2.840.10008.5.1.4.1.2.2.1", query_data)Query SOP Classes (PS3.4)
- Patient Root Q/R - FIND:
1.2.840.10008.5.1.4.1.2.1.1 - Study Root Q/R - FIND:
1.2.840.10008.5.1.4.1.2.2.1 - Modality Worklist - FIND:
1.2.840.10008.5.1.4.31
DICOM Reference
- PS3.7 Section 9.1.2 (C-FIND Service)
- PS3.4 Annex C (Query/Retrieve Service Class)
Summary
Functions
Builds a C-FIND-RQ command set.
Sends a C-FIND-RQ with the given query identifier and collects all matching results.
Maps a query level atom to its SOP Class UID.
Functions
Builds a C-FIND-RQ command set.
Parameters
sop_class_uid— the Query/Retrieve SOP Class UIDmessage_id— unique message identifier
Options
:priority— request priority (default:0x0000medium)
Sends a C-FIND-RQ with the given query identifier and collects all matching results.
The SCU sends a single C-FIND-RQ with the query identifier (encoded data set), then receives zero or more C-FIND-RSP messages with Pending status (0xFF00/0xFF01), each containing a matching data set. The final C-FIND-RSP has Success status (0x0000) and no data set.
Parameters
assoc— association pid fromDimse.Scu.open/3sop_class_uid— Query/Retrieve SOP Class UIDquery_data— encoded query identifier data set
Options
:priority— request priority (default:0x0000medium):timeout— response timeout in ms (default:30_000)
Returns {:ok, [binary()]} with matching data sets on success,
{:error, {:cancelled, results}} when the peer ends the operation with
Cancel status after sending partial results,
{:error, {:status, code}} for other non-success final statuses,
{:error, reason} for transport or protocol errors.
Maps a query level atom to its SOP Class UID.
Supported levels
:patient— Patient Root Query/Retrieve Information Model - FIND:study— Study Root Query/Retrieve Information Model - FIND:worklist— Modality Worklist Information Model - FIND
Returns nil for unknown levels.