3

I am new in DICOM and DCMTK. I was trying to retrieve dcm files from a public test server (http://www.dicomserver.co.uk) with movescu command. But it's not working. I was able run findscu successfully but that's only to get data. Here's what I have tried:

findscu -v -P --call COMMON --patient --key 0008,0052=PATIENT --key 0010,0020="PAT004" www.dicomserver.co.uk 104

It works but same thing doesn't work for movescu like this:

movescu -v -P --call COMMON +P 104 --patient --key 0008,0052=PATIENT --key 0010,0020="PAT004" www.dicomserver.co.uk 104

The output:

I: Requesting Association
I: Association Accepted (Max Send PDV: 65524)
I: Sending Move Request (MsgID 1)
I: Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0052) CS [PATIENT]                                #   8, 1 QueryRetrieveLevel
I: (0010,0020) LO [PAT004]                                 #   6, 1 PatientID
I:
W: Move response with error status (Failed: UnableToProcess)
I: Received Final Move Response (Failed: UnableToProcess)
I: Releasing Association

I am not running any local DICOM server or anything else. What is the right way to achieve this?

Nafis Abdullah Khan
  • 2,062
  • 3
  • 22
  • 39

2 Answers2

3

According to the DICOM standard (PS3.4), you have to specify the unique key of the PATIENT level for the C-MOVE request. Patient's Name (0010,0010) shouldn't be "*" (which is "Wild Card Matching" for the query phase) but Patient ID (0010,0020) should have the real value, i.e. one of those Patient IDs that you have queried using "findscu".

By the way, did you also start a Storage SCP on your system to listen on port 104? See online documentation of http://dicomserver.co.uk/. If not, you could start "movescu" with the additional command line option "+P 104" (because this tool has a one build in).

J. Riesmeier
  • 1,641
  • 10
  • 14
  • I have followed this tutorial and also tried running with a dcmqrscp process in parallel with movescu with no luck. Also I think movescu has an option to launch an storage scp automatically if I mention with --port 104 or something like that. Anyhow, please enlighten me with anything I need to make it work. http://support.dcmtk.org/redmine/projects/dcmtk/wiki/Howto_PACSDebuggingWithDCMTK – Nafis Abdullah Khan Feb 08 '18 at 12:50
  • 1
    Option +P is identical to --port (just the short variant). Did you follow my above advice? E.g. something like "movescu -v dicomserver.co.uk 104 +P 104 -P -k 0008,0052=PATIENT -k 0010,0020=007" should work if there is a patient with the Patient ID "007" on the server. – J. Riesmeier Feb 08 '18 at 13:02
  • For the "movescu" call, you need to use Patient ID (0010,0020), not Patient's Name (0010,0010), since this is the unique key on the PATIENT level. (I also updated my above answer in this regard.) – J. Riesmeier Feb 08 '18 at 13:04
  • sorry for late response. I have edited my question again. Please kindly check. Would be great if you can mention the full working command in your answer. – Nafis Abdullah Khan Feb 08 '18 at 13:16
  • 1
    Your current "movescu" command line works for me. Did you check whether your system can be reached on port 104 from the Internet? That means, you have to open your firewall for incoming connections on this port (if enabled). – J. Riesmeier Feb 08 '18 at 14:18
  • Can I use any other port like +P 3000? – Nafis Abdullah Khan Feb 08 '18 at 14:19
  • 1
    Not when using "dicomserver.co.uk" (as explained on the web page), only 104 and 11112. – J. Riesmeier Feb 08 '18 at 14:22
  • Nope. I've allowed the movescu executable for any connections, ports, etc. still not working – Nafis Abdullah Khan Feb 08 '18 at 14:36
  • I am using windows 10. I tried removing the firewall rules, then executed again, a popup appeared to allow firewall for movescu.exe and I allowed for both public and private networks. – Nafis Abdullah Khan Feb 08 '18 at 14:46
  • I also tried in Ubuntu 16.04. I opened the port with sudo ufw allow 104. I had to enable it first though. Still same thing! Please help! – Nafis Abdullah Khan Feb 08 '18 at 19:59
  • Am I suppose to run a DICOM server in my PC? – Nafis Abdullah Khan Feb 08 '18 at 20:00
  • 1
    Maybe, there is another firewall (e.g. in your company, institute or a router) blocking incoming connections. On Unix systems, you should rather use port 11112 instead of 104 (since it requires no additional privileges). Alternatively, you might want to use C-GET instead of C-MOVE since C-STORE works then on the same network connection. – J. Riesmeier Feb 09 '18 at 10:29
1

In case someone still has trouble with this issue:

  • each query has to include StudyInstanceUID + SeriesInstanceUID + PatientID
  • Because the retrieval process makes the PACS create an SCP session towards what's running movescu it needs to know how to approach it. AE is the name (of the machine) being sent and default is MOVESCU (can be changed with aec/aet flags flags, but PACS hosts file must have that ip-to-name mapping)
  • By default this protocol runs on port 104, which is restricted. you can either change this with +P flag to a port higher than 1024 (have not tried to verify PACS recieves this port number) or just run movescu with sudo/root
  • I don't know what is the default store directory, but this can be defined with -od flag.

working example:

sudo /usr/bin/movescu -v -od /path/to/dir PACS_IP 104 -k StudyInstanceUID=1.2.3.4.5 -k SeriesInstanceUID=1.2.3.4.5 -k PatientID=12345 +P 104

Daniel
  • 131
  • 1
  • 1
  • 7
  • Your answer contains various inaccuracies: the required keys depend on both the Q/R information model and the Q/R level, by default movescu does not open an incoming port (especially not 104), the default output directory of movescu is documented for option -od (it is the current directory), your "working example" is missing the mandatory Q/R level (apparently you want to retrieve on "SERIES" level). – J. Riesmeier Aug 28 '20 at 16:07