dicom-anonymizer icon indicating copy to clipboard operation
dicom-anonymizer copied to clipboard

Draft: Delete subelements with unsupported VR

Open dimrozakis opened this issue 2 years ago • 1 comments

I faced errors while trying to anonymize dicoms that had an element with VR of SQ that included an element with VR of UN.

In this PR, I replace the exception that was raised in this scenario with a warning and a fallback to deleting the offending sub-element instead. What do you think about this change? The argument is that if in doubt, it's better to anonymize "harder" (delete instead of replace) rather than to fail without any recourse for the caller.

dimrozakis avatar Nov 30 '22 17:11 dimrozakis

Hi @dimrozakis and thanks for your PR.

Instead of modifying the behavior of dicom-anonymizer, what do you think about handling the UN VR ? I think it could be handled the same way as we handle Short Text (ST) VRs: by replacing them with empty strings both for the emptying and the replacing.

I'm looking forward hearing your thoughts about this. Paul

pchoisel avatar Dec 09 '22 09:12 pchoisel

Hi Paul (@pchoisel).

I'd like to bring my colleague @pchristos in to this discussion since he has now assumed responsibility for our project that uses the fork of dicom-anonymizer which includes this change. @pchristos what are your thoughts on this PR and @pchoisel suggestion?

dimrozakis avatar Dec 20 '22 03:12 dimrozakis

Hi @dimrozakis and @pchristos, I wish you and your team a happy new year !

Do you have any news on this topic ? Could you by any chance share the file(s) that create this error so we can use it in non-regression tests once this case is settled ?

pchoisel avatar Jan 04 '23 10:01 pchoisel

Hi @dimrozakis and @pchristos,

To follow-up on this topic, we are going to implement more VR support in the dicom-anonymizer, including the UN VR. This should solve your problem.

pchoisel avatar Jan 16 '23 15:01 pchoisel

Hi @dimrozakis and @pchristos,

This PR: https://github.com/KitwareMedical/dicom-anonymizer/pull/38 should have fixed your problem.
Can you confirm ?

Thanks,

pchoisel avatar Jan 24 '23 16:01 pchoisel

Hi @dimrozakis and @pchristos,

I'm closing thie PR for now. If https://github.com/KitwareMedical/dicom-anonymizer/pull/38 didn't solve your issue, feel free to re-open an issue or a PR.

pchoisel avatar Oct 03 '23 15:10 pchoisel