Handle field maps and slice timing #1

Closed
mslw wants to merge 0 commits from fmap into main
Owner

Using BLAKE3 checksums (b3sum Rust crate):

8ebbcfed439fd8ce40e2ae7f90794de04e93f9dcc4dafaa65f228b0bbbf28ffe  out/niworkflows/sub-001/func/sub-001_task-MGT_run-01_bold.nii.gz
8ebbcfed439fd8ce40e2ae7f90794de04e93f9dcc4dafaa65f228b0bbbf28ffe  /data/group/psyinf/datalad-compute-tests/narps/derivatives/ds001734/sub-001/func/sub-001_task-MGT_run-01_space-MNI152NLin6Asym_res-2_desc-preproc_bold.nii.gz

We can reproduce exactly the output of fMRIPrep, for a dataset with STC and field maps.

This requires having 3dTshift available, both AFNI and fMRIPrep containers can be used. There remains some ugliness related to skipped volumes for STC (to be parsed from a file, now hardcoded), but overall this proves the concept and future changes will focus on discovering inputs and enabling / disabling the STC and fmap parts.

Story in commits (see commits tab - this has been force pushed, and Forgejo's conversation view does not show new commits).

Using BLAKE3 checksums ([b3sum](https://crates.io/crates/b3sum) Rust crate): ``` 8ebbcfed439fd8ce40e2ae7f90794de04e93f9dcc4dafaa65f228b0bbbf28ffe out/niworkflows/sub-001/func/sub-001_task-MGT_run-01_bold.nii.gz 8ebbcfed439fd8ce40e2ae7f90794de04e93f9dcc4dafaa65f228b0bbbf28ffe /data/group/psyinf/datalad-compute-tests/narps/derivatives/ds001734/sub-001/func/sub-001_task-MGT_run-01_space-MNI152NLin6Asym_res-2_desc-preproc_bold.nii.gz ``` We can reproduce exactly the output of fMRIPrep, for a dataset with STC and field maps. This requires having `3dTshift` available, both AFNI and fMRIPrep containers can be used. There remains some ugliness related to skipped volumes for STC (to be parsed from a file, now hardcoded), but overall this proves the concept and future changes will focus on discovering inputs and enabling / disabling the STC and fmap parts. Story in commits (see commits tab - this has been force pushed, and Forgejo's conversation view does not show new commits).
Instead of hardcoding the bold metadata relevant for the workflow,
we will read the BIDS metadata using PyBids.

This has its own problems. First, because of inheritance principle,
we do not know in advance which file(s) will be needed to read the metadata:
is it a sidecar, or a top-level file? Not having to know upfront is helpful
in terms of ease-of-use, but can be a problem if the json files are annexed
and we have to specify the file requirements upfront (e.g. for compute) anyway.

Second, Initializing BIDSLayout object takes time, several seconds or more for
larger datasets, even when skipping validation.
mslw changed title from WIP: Handle field maps and slice timing to Handle field maps and slice timing 2024-10-24 17:07:07 +00:00
mslw closed this pull request 2024-10-25 08:56:51 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mslw/fmriprep-resampling!1
No description provided.