PeerHerholz / BIDSonym

a BIDS app for pseudo-anonymization of neuroimaging data
https://peerherholz.github.io/BIDSonym/
BSD 3-Clause "New" or "Revised" License
51 stars 14 forks source link

what to do with date information in nifti header? #41

Closed Remi-Gau closed 3 years ago

Remi-Gau commented 3 years ago

Hey.

Quickly realized this is in my dataset.

>> hdr_anat = spm_vol(fullfile('raw/sub-pilot001/ses-001/anat/sub-pilot001_ses-001_acq-hires_UNIT1.nii'))

hdr_anat = 

  struct with fields:

      fname: 'raw/sub-pilot001/ses-001/anat/sub-pilot001_ses-001_acq-hires_UNIT1.nii'
        dim: [352 352 224]
         dt: [512 0]
      pinfo: [3×1 double]
        mat: [4×4 double]
          n: [1 1]
    descrip: '7T 3D GR\IR TR=5000ms/TE=2.58ms/FA=0deg/SO=IR\PFP\WE  27-Aug-2020 11:33:5.3325'
    private: [1×1 nifti]

I am not sure how this horror (27-Aug-2020 11:33:5.3325) got into my header (I am suspecting the SPM DICOM import is trying to be TOO smart) but is that something that would be flagged by BIDSonym ?

PeerHerholz commented 3 years ago

Ahoi hoi @Remi-Gau,

thanks for posting this interesting question.

Indeed, SPM is a bit more "hands-on" concerning image file headers than most other software. IIRC, @miykael even had names or so in there. However, this is definitely also an interaction with whatever folks at the scanner put in (e.g. sequence name). Hm, I think as it is right now, BIDSonym would not capture that. You would get a tsv file for each image you have containing all key-value pairs present, but the date would not be indicated as "potentially problematic". This is actually something that should be noted and I'll try to add a date format finder so that whenever something like that is present BIDSonym will flag it as "potentially problematic" in the respective tsv file. NB: it definitely won't delete/change such things as I don't want to open up the possibility of image header modification (looking at you SPM, hehe).