StoreSCP an file extension ?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
AndreBehrendt
Posts: 4
Joined: Thu, 2005-02-24, 09:54

StoreSCP an file extension ?

#1 Post by AndreBehrendt »

Hello,

i use the StoreSCP to recive files in JPEG Lossless format.
But the files are not stored with a .dcm extension, i need the .dcm extension.

Can any one help me?

thanks
André

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1446
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

There is no command line option that would allow you to do this. However, the change is simple. The code that generates the filename is in file dcmnet/apps/storescp.cc. Look for the two lines starting with "sprintf(imageFileName" and change the filename generation routine as you like. Recompile, done.

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#3 Post by Jörg Riesmeier »

Alternatively, you could also use the command line option --exec-on-reception (-xcr) to call a program or script in order to rename the file, e.g. on Unix:

Code: Select all

storescp -v -xcr "mv #f #f.dcm" 9876

AndreBehrendt
Posts: 4
Joined: Thu, 2005-02-24, 09:54

#4 Post by AndreBehrendt »

Hello,

thaks, i have change it to "%s%c%s.%s.dcm" and it works.

but i will use a filename by a counter e.g.

000001.dcm
000002.dcm
000003.dcm

or the counter from the +uf option at the begin of the filename.

can anybody help me?

Thanks.

Thomas Wilkens
DCMTK Developer
Posts: 117
Joined: Tue, 2004-11-02, 17:21
Location: Oldenburg, Germany
Contact:

#5 Post by Thomas Wilkens »

I dont understand your question.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Baidu [Spider], Bing [Bot] and 1 guest