movescu - problem with storage to loca/network drive

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
bkasmai
Posts: 20
Joined: Tue, 2009-07-28, 11:48

movescu - problem with storage to loca/network drive

#1 Post by bkasmai »

It appears that the following script is working as shown below with output:

movescu -v -S -k 0008,0052=STUDY -aet MY_PC -aec OUR_PACS 10.145.95.154 104 -k 0020,000D=1.2.840.113845.11.1000000001951524609.20220512122506.3581149 -k 0010,0020=1234567
I: Requesting Association
I: Association Accepted (Max Send PDV: 64988)
I: Sending Move Request (MsgID 1)
I: Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0052) CS [STUDY] # 6, 1 QueryRetrieveLevel
I: (0010,0020) LO [0427192] # 8, 1 PatientID
I: (0020,000d) UI [1.2.840.113845.11.1000000001951524609.20220512122506.3581149] # 60, 1 StudyInstanceUID
I:
I: Received Move Response 1 (Pending)
I: Received Move Response 2 (Pending)
I: Received Final Move Response (Success)
I: Releasing Association

However when I add "-od h:\dcmtk-storage" to store the study to a local storage h:\dcmtk-storage i get the following error:

movescu: DICOM retrieve (C-MOVE) SCU
error: --output-directory only allowed with --port

What am I doing wrong? Any help on this will be appreciated.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: movescu - problem with storage to loca/network drive

#2 Post by Michael Onken »

Hi,

When using C-MOVE in DICOM, the images are transferred on a second connection via C-STORE. By default, movescu only takes care of the C-MOVE connection. The PACS starts the second connection to an AE Title that the C-MOVE client (movescu) provides. By default movescu tells the PACS to send the images to AE Title "MOVESCU". You can change it by using movescu option "-aem" to MY_PC or whoever should receive the images.

Per default movescu does not handle that second connection, so it will not receive the images, thus, it does not make sense to specify an output directory. If you want to use movescu to handle the incoming C-STORE connection, movescu needs to start a storage server at the same time. That is done by using the --port option, where you can provide the desired listening port for movescu.

Note that in order to let the PACS connect to your system, the PACS must know the AE Title you provide as move destination (via -aem option). If the PACS does not know who that AE Title is (IP address or host name as well as TCP port), it will not be able to connect to it to send the images. There is an own DICOM status code that the PACS should return in that case: Move Destination Unknown.

Best regards,
Michael

P.S: If you search this forum you will find various flavors of this question (with answers;).

bkasmai
Posts: 20
Joined: Tue, 2009-07-28, 11:48

Re: movescu - problem with storage to loca/network drive

#3 Post by bkasmai »

Thank you very much for your prompt reply. As per your suggestion i launched storescp in another cmd window and the the images started arriving in the folder where I launched storescp. Not sure how i could structure the thousands of imported images into folders with names reflecting the study using perhaps the patient id or something different.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: movescu - problem with storage to loca/network drive

#4 Post by Michael Onken »

There are various storescp options regarding output names:

Code: Select all

sorting into subdirectories (not with --bit-preserving):

  -ss   --sort-conc-studies  [p]refix: string
          sort studies using prefix p and a timestamp

  -su   --sort-on-study-uid  [p]refix: string
          sort studies using prefix p and the Study Instance UID

  -sp   --sort-on-patientname
          sort studies using the Patient's Name and a timestamp

filename generation:

  -uf   --default-filenames
          generate filename from instance UID (default)

  +uf   --unique-filenames
          generate unique filenames

  -tn   --timenames
          generate filename from creation time

  -fe   --filename-extension  [e]xtension: string
          append e to all filenames
Also option -od works with storescp as well.

BR Michael

bkasmai
Posts: 20
Joined: Tue, 2009-07-28, 11:48

Re: movescu - problem with storage to loca/network drive

#5 Post by bkasmai »

Thank you. problem solved!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest