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

spec2nii anon option does not create de-identified nii/json outputs #205

Closed
schorschinho opened this issue Oct 9, 2023 · 5 comments
Closed

Comments

@schorschinho
Copy link

Describe the bug
I'm converting Philips spar/sdat MRS data with BIDScoin. Mapping works flawlessly, but the output nii files and json sidecars both contain PHI.
The anon option for the spec2nii2bids plugin is set to yes.
Running spec2nii anon [FILE] separately afterwards strips the PHI from the nii header extension.
Running spec2nii extract [FILE] separately afterwards then re-extracts the nii header extension into the json sidecar.

To reproduce
Call spec2nii2bids with anon set to y.

Expected behavior
The nii header extension of the output and the json sidecar should not contain PHI. Note that spec2nii in its current implementation requires separate subsequent calls to anonymize the nii header extension and the json sidecar, and I'm not sure how easy it is to implement these separate calls at this point. I have submitted a separate issue to spec2nii asking if the behavior can be made similar to that of dcm2niix (which uses the -ba argument).

Software version

  • BIDScoin version 4.1.1
  • Windows 10

Thanks for your help :)

@marcelzwiers
Copy link
Collaborator

Yes, the anonymization option of bidscoin is about rounding of acquisition dates and age (see https://bidscoin.readthedocs.io/en/latest/options.html#spec2nii2bids-plugin). I myself never work with MRS data, so I wasn't even aware that spec2nii has an anon flag too. I agree with your filed spec2nii issue, it makes most sense to pass the anon flag during conversion time, but I'm happy to add it as a post-processing step if needed (that's quite simple too).

@marcelzwiers
Copy link
Collaborator

marcelzwiers commented Oct 9, 2023

I created a small patch for you to test this out:

pip install --upgrade bidscoin[spec2niix2bids]@git+https://github.com/Donders-Institute/bidscoin@mrs_anon

@marcelzwiers
Copy link
Collaborator

Btw, as anonymization is gray zone, do you consider age (rounded in years), weight, size and sex to be personal health info that you would like to remove? These are scientifically useful metrics that in my view are not violating GDPR privacy policies.

@schorschinho
Copy link
Author

Hi Marcel,

Thanks so much for reacting so swiftly. @wtclarke has created the feature to pass anon at runtime now that'll make it into the next release.

The question of rounded age, weight, height and sex is really quite interesting. I agree that they are scientifically useful metrics, but one might argue that (in combination) they might be sufficient to identify an individual. I would probably not include them in the default removal process either, but as you say, it's a gray zone and things definitely differ between legislatures. (If I remember correctly, HIPAA considers rounded age only as PHI for individuals >89 years of age!).

Best,
Georg

@marcelzwiers
Copy link
Collaborator

Great, I consider this issue closed then (you can use the anon branch until the new spec2nii version is out)

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