dcmodify questions.

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
JustSomeGuy
Posts: 56
Joined: Tue, 2007-08-07, 19:31

dcmodify questions.

#1 Post by JustSomeGuy » Thu, 2019-09-26, 21:36

I have a study on disk that is stored hierarchically.
ie.

Code: Select all

Study
   Series
       Images
when I try to point dcmodify to the study directory it will not process the subfolder recursively.
Is this because I did not provide the correct command line options?

When I try to create new UIDs for Study, Series and Instance, I end up with a new study for every instance and every instance is in a new series as well...
Isn't there some notion of consistently remapping the old study uid to the same new study uids???
There should be no hierarchical changes made in my opinion.
any UID remapped should be remapped exactly the same way for the entire folder.

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

Re: dcmodify questions.

#2 Post by Michael Onken » Fri, 2019-09-27, 11:24

Hi,

dcmodify does not work recursively. You cannot provide directory names as an argument.

dcmodify handles every file separately, i.e. it does not care about existing DICOM hierarchies and if you tell it to create a new Series Instance UID (for example), it will do the job separately for each file in the call as if you call dcmodify separately for single file.

dcmodify is a low level tool, i.e. it tries to accept any change you propose, if it's possible using the DCMTK DICOM parser/encoder. It does not check dependency with other tag values, IOD rules from part 3 of the standard or even consistency with other files.

If you want to consistently change DICOM UIDs in a hierarchy of DICOM files, you must write your own tool or script something that uses calls to dcmdump and dcmodify.

Best regards,
Michael

JustSomeGuy
Posts: 56
Joined: Tue, 2007-08-07, 19:31

Re: dcmodify questions.

#3 Post by JustSomeGuy » Fri, 2019-09-27, 17:42

Its very misleading to provide these parameters knowing they don't do what a person would think they should.
I guess there is room for improvements.
Thanks.

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

Re: dcmodify questions.

#4 Post by Michael Onken » Mon, 2019-09-30, 08:48

Hi,

until now I was quite optimistic that the current documentation of dcmodify is clear on that it works on single files. The word directory, recursive, or something that points into that direction is not found at all and all other DCMTK tools directly state if they support directories as an argument.

I personally think the documentation for the Series/Study UID options are good enough too but I've heard a similar complaint to yours before.

So long story short: I will add a related sentence for both issues to the documentation during the next days. Thank you for the sugggestion.

Best regards,
Michael

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest