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

--prefer-dedicated-fmaps option doesn't work as expected #321

Closed
lucindasisk opened this issue Nov 19, 2021 · 7 comments
Closed

--prefer-dedicated-fmaps option doesn't work as expected #321

lucindasisk opened this issue Nov 19, 2021 · 7 comments

Comments

@lucindasisk
Copy link

Hi!

Opening this to note that the option to use fieldmaps for unwarping instead of b0 volumes from the diffusion scan doesn't appear to work as expected. Individual level QA reports still show susceptibility current correction as having been done using scan b0 volumes.

@julfou81
Copy link

julfou81 commented Dec 17, 2021

Same observation here with qsiprep v0.14.3 using a singularity image.
The dataset consist of DWI images in the dwi folder and two pepolar images in the fmap folder with the field IntendedFor in the son file of the pepolar images listing the the relative path to the DWI image.

Command run:

/usr/local/miniconda/bin/qsiprep /work/GestImage /work/GestImage/derivatives/qsiprep_fmap participant --participant_label Geraldine -w /work/temp_data_GestImage --output-resolution 0.8 --fs-license-file /work/freesurfer/license.txt --eddy-config /work/GestImage/derivatives/eddy_params.json --dwi-only --skip_bids_validation --dwi-no-biascorr --unringing-method mrdegibbs --prefer_dedicated_fmaps

Here is how the boilerplate looks like: no mention of SDC and no SDC was applied to the data after preprocessing:

Preprocessing was performed using QSIPrep 0.14.3, which is based on Nipype 1.6.1 (Gorgolewski et al. (2011); Gorgolewski et al. (2018); RRID:SCR_002502).

Diffusion data preprocessing
Any images with a b-value less than 100 s/mm^2 were treated as a b=0 image. MP-PCA denoising as implemented in MRtrix3’s dwidenoise(Veraart et al. 2016) was applied with a 5-voxel window. After MP-PCA, Gibbs unringing was performed using MRtrix3’s mrdegibbs (Kellner et al. 2016). Following unringing, the mean intensity of the DWI series was adjusted so all the mean intensity of the b=0 images matched across eachseparate DWI scanning sequence.

FSL (version 6.0.3:b862cdd5)’s eddy was used for head motion correction and Eddy current correction (Andersson and Sotiropoulos 2016). Eddy was configured with a q-space smoothing factor of 10, a total of 5 iterations, and 1000 voxels used to estimate hyperparameters. A quadratic first level model and a linear second level model were used to characterize Eddy current-related spatial distortion. q-space coordinates were forcefully assigned to shells. Any empty planes detected in images were filled. Field offset was attempted to be separated from subject movement. No alignment of shells was performed post-eddy. Eddy’s outlier replacement was run (Andersson et al. 2016). Data were grouped by slice, only including values from slices determined to contain at least 250 intracerebral voxels. Groups deviating by more than 4 standard deviations from the prediction had their data replaced with imputed values. Final interpolation was performed using the jac method.

Several confounding time-series were calculated based on the preprocessed DWI: framewise displacement (FD) using the implementation in Nipype (following the definitions by Power et al. 2014). The head-motion estimates calculated in the correction step were also placed within the corresponding confounds file. Slicewise cross correlation was also calculated. The DWI time-series were resampled to ACPC, generating a preprocessed DWI run in ACPC space with 0.8mm isotropic voxels.

Many internal operations of QSIPrep use Nilearn 0.8.1 (Abraham et al. 2014, RRID:SCR_001362) and Dipy (Garyfallidis et al. 2014). For more details of the pipeline, see the section corresponding to workflows in QSIPrep’s documentation.

@mattcieslak
Copy link
Collaborator

@julfou81 are you sure that the IntendedFor fields in your fieldmap BIDS are pointing to the correct image? I think you are running into a separate problem

@julfou81
Copy link

julfou81 commented Dec 17, 2021

@mattcieslak thank you for your comment! Indeed, I double-checked the dataset and I indeed made a mistake: the IntendedFor field was pointing to an image with a .nii.gz extension and in this dataset the images were actually with only a .nii extension. I relaunched the execution with the corrected IntendedFor field and now SDC is indeed planned by qsiprep's execution with --prefer_dedicated_fmaps option.

Thank you!

@mattcieslak
Copy link
Collaborator

@julfou81 just so you're aware the bug reported by @lucindasisk is still not fixed in the current release. It is lower on the priority list of bugs to fix because I'm not convinced that there is a real benefit to forcing the dedicated fmaps into topup, especially if they're full of artifacts, when there are perfectly good b=0 scans in the dwi series.

@julfou81
Copy link

julfou81 commented Dec 17, 2021

@mattcieslak Thank you for this precision. I was experimenting with that option for a specific subject for which we acquired all the diffusion volumes with only one phase encoding direction by mistake. But for the same dataset, we did also acquired SE-EPI images with reversed phase encoding directions to correct functional images with the PEPOLAR method. I was wondering if I could use this --prefer_dedicated_fmaps option to still perform SDC on the DWI images.

@psadil
Copy link
Contributor

psadil commented Sep 12, 2022

... It is lower on the priority list of bugs to fix because I'm not convinced that there is a real benefit to forcing the dedicated fmaps into topup, especially if they're full of artifacts, when there are perfectly good b=0 scans in the dwi series.

Following up on this. One use case is when we want to ensure that the inputs into topup all receive the same preprocessing (e.g., it's my impression that fieldmaps and b=0 volumes receive different treatment: #401). If --prefer-dedicated-fmaps caused just the fmaps to be used, then preprocessing would be consistent

@mattcieslak
Copy link
Collaborator

This was fixed in 0.17 and can be selected with the --denoised_image_sdc flag

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

4 participants