Handling of renamed tags
Moderator: Moderator Team
Handling of renamed tags
Hi,
with dcmtk 3.6.0, a lot of tags have been renamed (because of the renaming in the DICOM standard). Is there a possibility to have both the new and old tag names for lookup?
Background: we have a lot of code (mostly scripting) that uses the old tag names for lookup, and it would be good to have a lookup for both for the new and the old names (with an additional warning logged) to avoid to break existing code. Adapting all code at once is not an option...
Thanks,
Andreas
with dcmtk 3.6.0, a lot of tags have been renamed (because of the renaming in the DICOM standard). Is there a possibility to have both the new and old tag names for lookup?
Background: we have a lot of code (mostly scripting) that uses the old tag names for lookup, and it would be good to have a lookup for both for the new and the old names (with an additional warning logged) to avoid to break existing code. Adapting all code at once is not an option...
Thanks,
Andreas
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Not only the attribute names have been renamed between DCMTK 3.5.4 and 3.6.0 in order to be consistent with the official keywords of the standard, but also the names of some SOP Classes and Transfer Syntaxes.
The changes of the attribute names have been documented in the DCMTK Wiki - as you probably already noticed.
To answer your question: Currently, the DCMTK does not support multiple names for the same tags, because the last processed tag definition (either from the built-in dictionary or from the external dictionary files) "wins". This allows for example for renaming tags as it is used for the DICONDE standard (e.g. PatientName is called ComponentName). Also for the output of the tag name: Which one should be used if there were more than one?
The changes of the attribute names have been documented in the DCMTK Wiki - as you probably already noticed.
We also discussed this internally when we did the name changes. However, we thought that this is a one-time change and the release 3.6.0 is a major release of the DCMTK - after about 5 years. There already have been name changes in the past but neither so many for a single release nor so prominent examples like "PatientsName" -> "PatientName".Is there a possibility to have both the new and old tag names for lookup?
To answer your question: Currently, the DCMTK does not support multiple names for the same tags, because the last processed tag definition (either from the built-in dictionary or from the external dictionary files) "wins". This allows for example for renaming tags as it is used for the DICONDE standard (e.g. PatientName is called ComponentName). Also for the output of the tag name: Which one should be used if there were more than one?
Thanks - I was afraid that this would be the answer. I have seen that the last processed tag definition overwrites the old one, I was just checking if there was some option I did not see.
About the tag names: we would need the lookup only in the direction from old tag names to tags; the other direction should always give the correct (aka new) names. Usually, this direction is used for display only, while the other direction is used for tag lookup in scripts.
About the tag names: we would need the lookup only in the direction from old tag names to tags; the other direction should always give the correct (aka new) names. Usually, this direction is used for display only, while the other direction is used for tag lookup in scripts.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Yes, thanks, that is definitely an option for the code we have access to. The problem is that there is a lot of code that we do not have direct access to, and we don't want to break the code of other developers. A deprecation warning for some transition time should do the job. We probably will add this ourselves...
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest