New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tags duplication in meta and in DCM body #1740
Comments
Hm, this is of course invalid DICOM, but I don't understand what you mean by "the one in the file meta". Meta tags are all group 2 tags, so both are are in the file meta, as far as I understand. I can see that it is shown in the dataset if using dcmdump, but this is probably not correct. |
I am sorry my bad. |
No problem. Yes, I think the tag gets overwritten by the last one, so that one will be used. I'm not sure how expansive changing that behavior would be, and if it even makes sense to do this, but in principle I agree that in such a case the first tag shall be taken. |
Perhaps #820? I posted some 'fixer' code there which possibly could be adapted for this case. Maybe the fixer callback could somehow keep the first and remove the second -- I haven't actually looked into it in detail. |
Thank you, that is exactly what I meant! Well, that fixed the crash that happened before that in this case, and got implicit/explicit transfer syntax mixup sorted, but in the current case this does not help. But maybe using the fixer could be enough here... |
Hello!
I came across this problem with a particular DICOM file.
The 0002,0010 tag occurs twice in the dataset.
If you do:
The output will be:
If you do:
Both of the tags are deleted.
In this particular case the one that's in the file meta should be trusted.
I could use the del to delete them both and rewrite, but to do that I need to know the value of the tag in Meta to write the correct one.
I am not sure how to deal with this kind of cases correctly.
I've attached the anonymized dataset to this message.
Thank you!
badTSUID.zip
The text was updated successfully, but these errors were encountered: