[STORESCP] -rns option does nothing

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Daanen
Posts: 27
Joined: Mon, 2008-03-17, 17:41

[STORESCP] -rns option does nothing

#1 Post by Daanen »

Hi,

I want to rename dicom files received using storescp.
I try to use the following command-line

Code: Select all

storescp -q --fork -aet KOELIS -sp -rns 11112
but storescp does not start (no error message)

so I try

Code: Select all

storescp -q -aet KOELIS -sp -rns 11112
and storescp starts but files were not renamed :(

1) can someone tell me what I'mding wrong ?
2) why --fork option and -rns option are incompatible ? I think I'll need both of them in the final application !

Thanks

Vincent
[/code]

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

#2 Post by Michael Onken »

Hi,

for your above call (only -v for logging added), this happens on my system, if I send a file with storescu:

Code: Select all

onken@xxx:~/temp/# storescp -q --fork -aet KOELIS -sp -rns 11112 -v
I: Association Received in child process (pid: 3331)
I: Association Acknowledged (Max Send PDV: 16372)
I: Received Store Request: MsgID 1, (XA)
RECV: ...[...]...
W: element PatientName (0010,0010) absent or empty in data set, using 'ANONYMOUS' instead
I: creating new subdirectory for study: ./ANONYMOUS_20110719_114240590
I: storing DICOM file: ./ANONYMOUS_20110719_114240590/XA.1.2.276.0.7230010.3.1.4.1787205428.27614.1047050101.1
I: Association Release
I can see the new directory and file in the filesystem then:

Code: Select all

onken@xxx:~/temp/ANONYMOUS_20110719_114227498/# ls
XA.1.2.276.0.7230010.3.1.4.1787205428.27614.1047050101.1
onken@xxx:~/temp/ANONYMOUS_20110719_114227498/#

P.S: I'm using storescp 3.6.1:

Code: Select all

onken@xxx:~/temp/ANONYMOUS_20110719_114227498/# storescp --version

$dcmtk: storescp v3.6.1 CVS $

storescp: DICOM storage (C-STORE) SCP

Host type: x86_64-Linux

External libraries used:
- ZLIB, Version 1.2.3
Best regards,
Michael

Daanen
Posts: 27
Joined: Mon, 2008-03-17, 17:41

#3 Post by Daanen »

Hi,

I should have use the -v option.
storescp said

Code: Select all

storescp -aet KOELIS -sp -rns --fork -q -v 11112
$dcmtk: storescp v3.6.0 2011-01-06 $

storescp: DICOM storage (C-STORE) SCP
error: --rename-on-eostudy not allowed with --fork on Windows systems
When removing '--fork', I still not get images renamed. any idea ?

V

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

#4 Post by Michael Onken »

Ah, you are on windows :-)

You cannot use both together in windows, that is right. Under windows, a new storescp process is started via commandline to handle an incoming association. This way, the newly started process does not have any idea, whether the study changes (since it does not know anything about the last study,i.e. study instance uid, received).

Under Unix, the way used to start the new process is calling the fork() function within the code which gives the programmer (and therefore, the new process) total knowledge of any variables that are set in the original process.

So for now, there is no way under windows to use --fork and ----rename-on-eostudy together.

Maybe one of the other sort options work for you?

Michael

Daanen
Posts: 27
Joined: Mon, 2008-03-17, 17:41

#5 Post by Daanen »

I tried other sort options but the images are never renamed in a dicom-compliant form (8-characters filenames) as it should be..

I wrote a workaround but I'd like to test this feature ..
Can you help me on this ?

Post Reply

Who is online

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