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.
movescu - problem with storage to loca/network drive
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2051
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: movescu - problem with storage to loca/network drive
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;).
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;).
Re: movescu - problem with storage to loca/network drive
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.
-
- DCMTK Developer
- Posts: 2051
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: movescu - problem with storage to loca/network drive
There are various storescp options regarding output names:
Also option -od works with storescp as well.
BR Michael
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
BR Michael
Re: movescu - problem with storage to loca/network drive
Thank you. problem solved!
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 1 guest