Skip to content
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

dropping fields I asked it to keep #10

Closed
dmd opened this issue Jan 12, 2021 · 5 comments
Closed

dropping fields I asked it to keep #10

dmd opened this issue Jan 12, 2021 · 5 comments

Comments

@dmd
Copy link
Contributor

dmd commented Jan 12, 2021

dicom-anonymizer seems to be deleting some dicom fields, even if asked to keep them:

$ dcmdump input.dcm | grep 0029,0010
(0029,0010) LO [SIEMENS CSA HEADER]                     #  18, 1 PrivateCreator

$ dicom-anonymizer input.dcm output.dcm -t '(0x0029,0x1010)' keep
100%|███████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 18.67it/s]

$ dcmdump output.dcm | grep 0029,0010

$
@laurennlam
Copy link
Contributor

It's possible that this tag is a private tag. Private tags are always deleted for anonymization.
cf line 247 of simpledicomanonymizer.py

@dmd
Copy link
Contributor Author

dmd commented Jan 12, 2021

Yes, it is. That's annoying, as it breaks conversion to Nifti later

@laurennlam
Copy link
Contributor

Hi @dmd, Sorry for the late answer. So, after checking, it seems that all private tags are mandatory removed.
We can pass through that but, I want to warn you about possible changing:

  • Private tags have a "Private creator" such as (0029, 0020). These private tags are heads of blocks that contain sub private tags (0029, 1008), (0029, 1009),...).
  • if you want to keep a private creator, then all subtags will be removed and you'll have to manually define which one you want to keep/modify
  • if you manually define that you want to only keep a sub element, then you will have a Private Creator then. Sub private element of a block cannot "lives" without a creator.
    Does this sound good to you ?

@dmd
Copy link
Contributor Author

dmd commented Jan 28, 2021

Yes, that's reasonable!

@laurennlam
Copy link
Contributor

#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants