Extract private binary data from dicom file

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
suluco
Posts: 5
Joined: Fri, 2009-11-20, 08:26

Extract private binary data from dicom file

#1 Post by suluco »

Is it possible with one of the shipped DCMTK commandline-tools to extract private binary data from a dcm file?

For example:
A private tag has been written to an existing dcm-file using dcmodify.exe

Code: Select all

 dcmodify.exe -if "(0029,1030)=BINARYFILE" DICOMFILE
What would be the other way around to extract the binary-file from the resulting DICOMFILE?

Hafiz Rafeeq
Posts: 8
Joined: Tue, 2017-10-10, 09:44

Re: Extract private binary data from dicom file

#2 Post by Hafiz Rafeeq »

i did the same thing a few days ago.. i don't know about command line tools though.

viewtopic.php?f=1&t=4643

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

Re: Extract private binary data from dicom file

#3 Post by Michael Onken »

Hi,

you can use dcmdump. Option +L makes sure all tags (i.e. also those with very long tag values) will be dumped.
In general you can send dcmdump output to a file (dcmdump DICOMFILE > output.txt).
If you want to extract only selected tags, you can additionally use dcmdump's +P option to select the tag of interest, e.g.
dcmdump +L +P "(0029,1030)" DICOMFILE. You can also repeat +P multiple times to select more than one tag.

I don't see another way to extract the private data using the commandline tools.

Best,
Michael

Post Reply

Who is online

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