PET support: have pypet2bids preserve certain metadata fields
dlevitas opened this issue · comments
When converting DICOM images to NIfTI format with dcm2niix
, the default is to remove specific metadata fields that may otherwise help identify subjects (ba -y
). These fields include:
SeriesInstanceUID
StudyInstanceUID
ReferringPhysicianName
StudyID
PatientName
PatientID
AccessionNumber
PatientBirthDate
PatientSex
PatientWeight
AcquisitionDateTime
When ezBIDS has access to these fields, it can use them to better organize and discern BIDS information regarding the dataset. For example, AcquisitionDateTime
is used to determine whether data is from separate subjects, or the same subject but different scan sessions. Other fields such as PatientSex
can be included in the participants.tsv
file. Before ezBIDS finalizes data to BIDS, it removes these metadata fields.
Currently, pypet2bids
removes these fields before ezBIDS can access them. Since ezBIDS already remove these fields, just later on, it would be nice if there was an option in pypet2bids to preserve the fields for ezBIDS, which will them delete them once it has gathered the relevant information.
@bendhouseart would this be feasible?
Yes, I think the easiest approach is going to be to accept an ezbids flag --ezbids
and then just sprinkle that conditional where suitable. That said, I'd like us to think on this for a bit so that we make a full accounting of what we would like to get out of it.
I really need to try more ecat conversions with ezbids to see how well that holds up.
To be honest, the most helpful metadata field is the AcquisitionDateTime
, which is used to help discern whether two data folders belong to separate subjects, or the same subject but separate scan sessions.
If there's a risk of adding --ezbids
, we can simply recommend to PET users that ses-
(e.g. ses-01
) be explicitly stated in either the folder path or file name. ezBIDS can detect and use that information for BIDS information, including sub
, entity labels, etc.
After further thought, I don't think we should include an --ezbids
flag option in pet2bids
. So long as pet2bids
can provide AcquisitionTime
(and other non-identifying information), that will be suitable.