Dimse.Scu.NGet (Dimse v0.8.7)

Copy Markdown View Source

N-GET SCU — DIMSE-N Get Service Class User.

Sends an N-GET-RQ to retrieve attribute values from a managed SOP Instance.

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.34.6.1"]
)

{:ok, status, data} = Dimse.Scu.NGet.query(assoc, sop_class_uid, sop_instance_uid)

DICOM Reference

  • PS3.7 Section 10.1.2 (N-GET Service)

Summary

Functions

build_command_set(sop_class_uid, sop_instance_uid, message_id, opts \\ [])

@spec build_command_set(String.t(), String.t(), integer(), keyword()) :: map()

Builds an N-GET-RQ command set.

Uses RequestedSOPClassUID (0000,0003) and RequestedSOPInstanceUID (0000,1001).

Options

  • :attribute_identifier_list — list of {group, element} tags to retrieve

query(assoc, sop_class_uid, sop_instance_uid, opts \\ [])

@spec query(pid(), String.t(), String.t(), keyword()) ::
  {:ok, integer(), binary() | nil}
  | {:error, {:status, integer(), binary() | nil} | term()}

Sends an N-GET-RQ and waits for N-GET-RSP.

Returns {:ok, status, data} for successful or warning responses, {:error, {:status, status, data}} for DIMSE failure statuses, or {:error, reason} for transport/protocol failures.