Dcmodify + absolute path to tag

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
dave
Posts: 67
Joined: Fri, 2004-11-05, 18:20
Location: Houston, Texas, USA

Dcmodify + absolute path to tag

#1 Post by dave » Thu, 2006-06-01, 19:02

How can we use dcmodify to change a tag value when there are 2 tags at the same absolute path?

Example:

<< dcmodify -v -m "(300a,03a2).(300a,03a8).(300a,0360).(300a,0362)=20" filename.dcm >> gives a path error.

Using -ma instead of -m changes both tag values - not what we want - (but maybe this uses a different search algorithm)?

There are item tags between the sequence tags... do these need to be included in the path?

We're still using DCMTK v3.5.3

Thanks,

David

dave
Posts: 67
Joined: Fri, 2004-11-05, 18:20
Location: Houston, Texas, USA

#2 Post by dave » Thu, 2006-06-01, 21:11

Ermm... I see now that the [bracketed_number] in the example section for dcmodify (http://support.dcmtk.org/docs/dcmodify.html) refers to the array offset of the item groups. Painful as it was to count all this stuff out, we got the value of the second tag changed.

Short answer: read the manual.

Thanks,

David

dave
Posts: 67
Joined: Fri, 2004-11-05, 18:20
Location: Houston, Texas, USA

#3 Post by dave » Fri, 2006-06-02, 15:54

I don't suppose there is a program in the DCMTK that displays the paths to the tags in a file?

dave
Posts: 67
Joined: Fri, 2004-11-05, 18:20
Location: Houston, Texas, USA

#4 Post by dave » Fri, 2006-06-02, 21:59

(Why do I feel like I'm talking to myself <g>)

Ok. I see that dcmdump does this with the +p --search-all flags, but it does not include the bracketed item group offset. Hmmm...

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

#5 Post by Marco Eichelberg » Sun, 2006-06-04, 20:19

Very interesting discussion :wink:
If you can think of a nice (i.e., reasonably easy to read) way of displaying the path of each attribute in a tool like dcmdump, post a proposal (or even better: implement a solution and post the code). In principle you are right: It would indeed be helpful to have a tool that shows each path. However, this is probably only an issue for the few people that deal with deeply nested structures, which almost only happen inside DICOM Structured Reporting documents.

Post Reply

Who is online

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