rordenlab / dcm2niix

dcm2nii DICOM to NIfTI converter: compiled versions available from NITRC
https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage
Other
881 stars 228 forks source link

Consider excluding additional DICOM fields in JSON sidecar with anonymization flag (BIDS format) #732

Closed afamiliar closed 1 year ago

afamiliar commented 1 year ago

Running the dcm2niix command with anonymized bids sidecar enabled generates a JSON file with DICOM metadata (i.e., the anonymized sidecar). Some of the resulting DICOM fields are still considered PHI per DICOM-NEMA standards, accordingly you may consider removing the following tags from being placed into the anonymized sidecar:

neurolabusc commented 1 year ago

@afamiliar at the creation of BIDS there was a lot of discussion regarding how to protect privacy while also allowing tools to capture machine-specific variation and allow audit/support for problematic cases. It was decided that these fields provided sufficient privacy protection when other fields were excluded (e.g. patient details, scan date, etc). The original decisions were made by a small team, with many topics beyond our core expertise. Further, technology to identify people and legislation to protect personal data have advanced a lot since these decisions were made. If you have a clear sense of how to strike this balance, I think you should make a proposal to the BIDS steering group for a formal discussion and implementation in the BIDS specification. dcm2niix supports the BIDS specification. Therefore, while I think this is an important topic, the dcm2niix issue tracker is not the appropriate venue (e.g. you are not advocating for a change to dcm2niix, but rather implementations of BIDS such as spm, dcm2niix and dicm2nii.

I actually think the DICOM standard describes E.3.8 the costs/benefits of these fields well: Information about the identity of the device that was used to perform the acquisition is recognized as having a potential for leakage of identity because it may constrain the number of possible individuals that could be the imaging subject, though only if there is access to other information about the individuals concerned to match it against. However, there are applications that require such device information to perform the analysis or interpretation.

mharms commented 1 year ago

Just a thought, which is easy for me to say, since I wouldn't be implementing it, but if you choose, I think you could simply add a second optional anonymization flag which would exclude all the fields outlined above, completely independent of BIDS. It would just a flag/option available within dcm2niix that would exclude additional fields from the sidecar json.

afamiliar commented 1 year ago

thanks @neurolabusc for the quick and informative response. your point that this is a BIDS-level consideration (not necessarily an issue with dcm2niix implementation) is well taken. I didn't know that BIDS spec had de-identification considerations beyond date shifting. For our use case (clinically acquired data from pediatric patients), we take the conservative route of absolute minimized risk in terms of de-identification, and because our datasets are multi-institutional we have to encompass each site's regulatory rules including whether they prohibit institution-level information being shared (& so again better off just being conservative overall). This is why we follow the DICOM-NEMA Part 15 table for handling DICOM metadata. Our users suffice with device manufacturer and model information though I can appreciate there are some camps that may need serial number (not sure what the BIDS argument for free-text fields such as ImageComments would be though...).

I suppose there could be implementation of DICOM anon packages that follow this specific NEMA compliance specification, or as you mentioned bring this to the BIDS spec level (perhaps in my next life). Our team will move forward with using the flag for sidecar anonymization with dcm2niix and operate on the resulting JSONs to further remove those fields.

Thank you for your consideration of the topic :)

mharms commented 1 year ago

Depending on the sequence, the ImageComments field can contain valuable information. For example, the estimated motion parameters in the vNavs that accompany the ABCD/MGH T1w/T2w structurals are reported in the ImageComments field.