Provide a new API for DcmItem to delete a private attribute#36
Provide a new API for DcmItem to delete a private attribute#36malaterre wants to merge 1 commit intoDCMTK:masterfrom
Conversation
Extend DcmItem with findAndDeletePrivateElement to allow user to delete a private tag directly (reservation number is computed internally).
1e8ee38 to
abb31ee
Compare
|
@eichelberg / @jriesmeier could you comment on this ? Bad code ? Should refactor existing findAndDeleteElement to take a DcmTag ? other ? thx |
|
Thank you for your proposal. However in my opinion, a findAndDeletePrivateElement() helper function should not only support the "dynamic use" of private element numbers, but also something like (0011,1010,"MY PRIVATE CREATOR"), i.e. fully specified element numbers. A flag switching between both modes would also be nice. Also, the call of "privTag.getElement() >= 0x1000" makes no sense if you want to check for attribute tags (gggg,00xx), where "xx" is between "00" and "FF". Furthermore, I am not really convinced on how you've implemented the while loop, and that and how you call findAndDelete()... |
|
Hi Matthieu, since you explicitly asked for my feedback - I am also not happy with the PR as it is now:
In general, however, I think a method that enables a user to "get rid" of a group of private elements by passing the tag of the private creator, or possibly the group number and the private creator string, would be useful to have. |
Extend DcmItem with findAndDeletePrivateElement to allow user to delete
a private tag directly (reservation number is computed internally).