KitwareMedical / dicom-anonymizer

Tool to anonymize DICOM files according to the DICOM standard
BSD 3-Clause "New" or "Revised" License
104 stars 47 forks source link

X tags of VR == 'DA' not getting deleted #56

Open smjoshiatglobus opened 1 year ago

smjoshiatglobus commented 1 year ago

I found this while looking at pytest failures for "color3d_jpeg_baseline.dcm" file from pydicom's test files. The element (0020,0244) was not getting deleted. The tag is listed in X_TAGS.

The code for delete_element calls replace_element_date for VR=='DA', even if the element is supposed to be deleted. I cannot figure out why that is all right. Please help!

In addition to 'X', I see 'K' and 'C' listed in that row of PS 3.15: Table E-1.1. What do these mean?

smjoshiatglobus commented 1 year ago

I found Section E.3.6. Note 2 in that section says that it is all right to set dummy values for dates. Is that the rationale behind this code logic?

pchoisel commented 10 months ago

That's a good point, I can also see the issue now that we merged #60 I will investigate

smjoshiatglobus commented 10 months ago

PR #64 does not fix this issue, just puts in temporary exclusion of elements of type DA. This has enabled testing of all other tags for test files that were originally failing the test.