DCMDUMP and DCMODIFY Help

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
MarcusK35
Posts: 6
Joined: Tue, 2017-05-23, 07:57

DCMDUMP and DCMODIFY Help

#1 Post by MarcusK35 »

Hello,

I'm trying to do a "dcmdump" for DICOM tag 0018,9506.0008,002a with the command: "dcmdump.exe +P 0018,9506.0008,002a E:\TEST\BTO01.dcm > dicomtag.txt". When I do this, I get all the leaf elements under the 0018,9506 tag and NOT just the 0008,002a tag. I would like only the 0008,002a tag. Can someone assist with the syntax on this?

Also, based upon the info I get in the above "dcmdump", I'm trying to do a "dcmodify" on "9506.0008,002a"
and I'm trying to figure out the syntax for doing this. Right now I'm trying the following: "dcmodify.exe -m "0018,9506.0008,002a=20180207121212" E:\TEST\BTO01.dcm". I'm getting the following error: "Cannot put value into non-leaf elements!". Can someone help me with this syntax to modify the leaf element?

Thanks in advance,

Marcus

J. Riesmeier
DCMTK Developer
Posts: 2496
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: DCMDUMP and DCMODIFY Help

#2 Post by J. Riesmeier »

I'm trying to do a "dcmdump" for DICOM tag 0018,9506.0008,002a with the command: "dcmdump.exe +P 0018,9506.0008,002a E:\TEST\BTO01.dcm > dicomtag.txt". When I do this, I get all the leaf elements under the 0018,9506 tag and NOT just the 0008,002a tag. I would like only the 0008,002a tag. Can someone assist with the syntax on this?
As you can read in the documentation, dcmdump's +P option supports a very simple syntax only. Basically, you can either specify a single numeric tag or the official keyword, e.g. "+P 0010,0010" or "+P PatientName".
Also, based upon the info I get in the above "dcmdump", I'm trying to do a "dcmodify" on "9506.0008,002a"
and I'm trying to figure out the syntax for doing this. Right now I'm trying the following: "dcmodify.exe -m "0018,9506.0008,002a=20180207121212" E:\TEST\BTO01.dcm". I'm getting the following error: "Cannot put value into non-leaf elements!". Can someone help me with this syntax to modify the leaf element?
The so-called "path syntax" of dcmodify in also described in detail in the corresponding documentation. You should try the following:

Code: Select all

dcmodify -m "(0018,9506)[0].(0008,002a)=20180207121212" E:\TEST\BTO01.dcm

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest