Reputation: 1816
I'm working with DICOM images and use DCMTK to make some process.
My problem here is that I have to retrieve only certain tags of batch of images. But the process take too long.
I'm using dcmdump -M -L +P '0010,0020' +P '0010,0010
-M
do not load very long values (e.g. pixel data)-L
print long tag values shortened (default)+P
print the textual dump of tag, this option can be specified multiple timesBut the "dumping" of a single file take ~1sc
. It's because all tags are still loaded but then the +P
is searching through all tags.
I only have a few tags to retrieve. Is there any possibilities to only load certain specific tags to reduce the time necessary to dump a file?
Maybe DCMTK is not the right tool to use. I'm open to everything.
Upvotes: 2
Views: 1576
Reputation: 892
The gdcm package has a command line tool to do exactly what you want
http://gdcm.sourceforge.net/html/gdcmscanner.html
In order to display all the values for Patient Name (0010,0010) for files in the current directory.
gdcmscanner -t 10,10 -d . -p
It only loads the bits you ask for. It is fast.
Upvotes: 5