How to use DCMTK-getscu to retrieve DICOM instances from Orthanc

In Understanding DICOM with Orthanc — Orthanc Book documentation, it has an example:

  1. Add in orthanc.json, add “getscu” as:
    {
    “DicomModalities” : {
    “getscu” : [ “GETSCU”, “localhost”, 2000 ]
    }
    }
  2. getscu -v localhost 4242 -aec ORTHANC -k “0008,0052=STUDY” -k “0020,000d=<study.uid>”

However, it failed with error:
DICOM authorization rejected for AET ORTHANC on IP 127.0.0.1: This AET is not listed in configuration option “DicomModalities”

Tried and failed again:
getscu -v localhost 2000 -aet GETSCU -k “0008,0052=STUDY” -k “0020,000d=<study.uid>”

Please help. Thanks in advance!!

Hi,

Your config looks ok.
Here’s the command I’ve been using for testing:

getscu -S -k "QueryRetrieveLevel=Study" -k "StudyInstanceUID=1.2.3" localhost 4242

and the output in verbose mode:

I0610 09:10:42.473309          DICOM-2 main.cpp:356] Incoming Get request from AET GETSCU on IP 127.0.0.1, calling AET ANY-SCP
I0610 09:10:42.473309          DICOM-2 OrthancGetRequestHandler.cpp:490] (dicom) C-GET-SCU request received from AET "GETSCU"
I0610 09:10:42.473309          DICOM-2 OrthancGetRequestHandler.cpp:498] (dicom)   (0008,0052)  QueryRetrieveLevel = Study
I0610 09:10:42.473309          DICOM-2 OrthancGetRequestHandler.cpp:498] (dicom)   (0020,000d)  StudyInstanceUID = *** POTENTIAL PHI ***
I0610 09:10:42.483278          DICOM-2 OrthancGetRequestHandler.cpp:564] (dicom) C-GET: Sending resource ac629eb1-cca4871c-eaa5fff7-fd2cbf0a-0a6dfeec to modality "GETSCU"
I0610 09:10:42.483278          DICOM-2 OrthancGetRequestHandler.cpp:564] (dicom) C-GET: Sending resource 72de3b86-da4b2556-bb33f32f-d1d84f80-fb017059 to modality "GETSCU"
I0610 09:10:49.443244          DICOM-2 OrthancGetRequestHandler.cpp:250] (dicom) C-GET SCP selected transfer syntax 1.2.840.10008.1.2.1, for source instance with SOP class 1.2.840.10008.5.1.4.1.1.4 and transfer syntax 1.2.840.10008.1.2.1
I0610 09:10:49.443244          DICOM-2 OrthancGetRequestHandler.cpp:287] (dicom) Store SCU RQ: MsgID 1, (MR)
I0610 09:10:57.492141          DICOM-2 StorageCache.cpp:128] Read attachment "b262c287-3b17-42ad-b6e7-5a147d0df21b" with content type 1 from cache
I0610 09:10:57.493142          DICOM-2 OrthancGetRequestHandler.cpp:250] (dicom) C-GET SCP selected transfer syntax 1.2.840.10008.1.2.1, for source instance with SOP class 1.2.840.10008.5.1.4.1.1.2 and transfer syntax 1.2.840.10008.1.2.4.70
I0610 09:10:57.493142          DICOM-2 OrthancGetRequestHandler.cpp:287] (dicom) Store SCU RQ: MsgID 2, (CT)
I0610 09:10:57.520143          DICOM-2 CommandDispatcher.cpp:932] (dicom) Finishing association with AET GETSCU on IP 127.0.0.1: DUL Peer Requested Release
I0610 09:10:57.520143          DICOM-2 CommandDispatcher.cpp:940] (dicom) Association Release with AET GETSCU on IP 127.0.0.1

HTH,

Alain

Thanks for help!

Unsuccessful:
I: Requesting Association
I: Association Accepted (Max Send PDV: 16372)
I: Sending C-GET Request (MsgID 1)
E: Failed receiving DIMSE command: 0006:0317 Peer aborted Association (or never connected)

Orthanc.log displays:
W0610 08:51:53.749785 DICOM-1 main.cpp:408] DICOM authorization rejected for AET GETSCU on IP 127.0.0.1: This AET is not listed in configuration option “DicomModalities”
W0610 08:51:53.749785 DICOM-1 CommandDispatcher.cpp:831] Rejected Get request from remote DICOM modality with AET “GETSCU” and hostname “127.0.0.1”

Thanks! [getscu -S -k “QueryRetrieveLevel=Study” -k “StudyInstanceUID=1.2.3” localhost 4242] works by adding into Orthanc.json:
{
“DicomModalities” : {
“getscu” : [ “GETSCU”, “localhost”, 2000 ]
}
}

1 Like