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

PET integration #92

Closed
dlevitas opened this issue Sep 22, 2023 · 7 comments
Closed

PET integration #92

dlevitas opened this issue Sep 22, 2023 · 7 comments

Comments

@dlevitas
Copy link
Collaborator

dlevitas commented Sep 22, 2023

Met earlier today with @bhatiadheeraj @bendhouseart @mnoergaard to discuss enabling PET conversion with ezBIDS. The biggest hurdle is identifying and enabling users to enter the relevant metadata information, as specified by BIDS. Complicating this problem is the fact that certain metadata fields (InjectedRadioactivity, InjectedMass, InjectedMassUnits, SpecificRadioactivity, etc) vary from sequence to sequence.

After discussions, there appear to be two valid ways forward.

1). Enable metadata spreadsheet injection with PET2BIDS. The format for such spreadsheets is as follows:

  • columns must be metadata keys (e.g., Manufacturer)
  • row(s) must be the metadata key values (e.g., Siemens)
  • spreadsheet filename must explicitly specify which data it corresponds to (e.g., sub-01_ses-01_pet.csv)

Once detected by PET2BIDS, all relevant and present metadata can be added to the sidecars if not detected within.

2). ezBIDS will parse the data sidecar(s) for the relevant metadata and alert users if required (and recommended?) metadata is missing. This can be partially done on the Series Mapping page (to save time), and on the Dataset Review page (for metadata fields that vary at the individual sequence level).

I feel that option 1 will best alleviate time for users, but we can build option 2 as a fail-safe (manual, but thorough).

@bendhouseart @mnoergaard: can you provide us a list of the metadata fields that vary from sequence to sequence?

@bendhouseart
Copy link
Contributor

Per point 1, we've already got some documentation up concerning how to "best" format pet spreadsheets here.

And in response to your question, some of the fields that can vary between patient and scan are as follows:

InjectedRadioactivity
InjectedMass
SpecificRadioactivity
metabolite_parent_fraction
metabolite_polar_fraction
whole_blood_radioactivity
plasma_radioactivity
PlasmaFreeFraction
TimeZero
# note times below are relative to TimeZero
# they're often consistent but may vary across subjects/sessions
time
ScanStart
FrameTimesStart
InjectionStart
InjectionEnd

I'm not too sure about things like TubingType, TubingLength, etc as I personally haven't seen much data containing those measurements.

@dlevitas
Copy link
Collaborator Author

Thanks, @bendhouseart.

Currently, it's possible to use ezBIDS with PET data and get a BIDS dataset, though even when providing formatted spreadsheets (option 1), the validator throws several errors about certain metadata values not set with the correct type. This might be a pet2bids issue...

Will soon begin working on option 2.

@bendhouseart
Copy link
Contributor

@dlevitas I would suggest running pet2bids with the --silent flag, it leads to improved mental health. I'm slowly chipping away at adding in the schema and other small quality of life fixes, however, just silencing the error messages and warnings is plenty considering you are following up the conversion with the bids-validator.

@dlevitas
Copy link
Collaborator Author

@bendhouseart I've aded additional PET support, mainly the ability to edit sidecar metadata.

@dlevitas
Copy link
Collaborator Author

dlevitas commented Feb 6, 2024

@bendhouseart @mnoergaard

Given the recent PRs (#108 #110), ezBIDS now has BIDS conversion support for PET data. I will therefore go ahead and close this issue.

To summarize, the PET support consists of several features:

1). Support for both PET (NIfTI/JSON) and blood (JSON/TSV) data
2). Ability to upload DICOM, pypet2bids transformed data (e.g. NIfTI/JSON/TSV), and/or ECAT-formatted (.v, .v.gz) data
3). Improved JSON sidecar metadata support, including Excel spreadsheets, and/or ezBIDS metadata interface (organized according to the BIDS specification).

If any issues arise pertaining to PET BIDS conversion, a new issue can be opened.

@dlevitas dlevitas closed this as completed Feb 6, 2024
@mnoergaard
Copy link

Many thanks for pushing these important efforts forward, @dlevitas and team!

@mnoergaard
Copy link

Just tested this locally and seems to be working like a charm! Fantastic! Great work @dlevitas and team!

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

3 participants