GE Direct Fieldmap misalignment with target EPI

Summary of what happened:

Hey fmriprep-ers,

Would appreciate any help/guidance you can offer!

I have some multi-band fMRI data with a corresponding field map (in Hz) directly generated from GE scanner (as well as the accompanying magnitude file).

The odd part here is the major offset of the fieldmap and EPI target images (showing only the fieldmap reference; says I am only allowed to embed one media image… happy to add the BOLD reference image, examples of the raw fieldmap/magnitude files, and/or others to the comments, if I can)

For context, the original magnitude files had a ghosting issue (which was negatively impacting the SDC in FMRIPREP), our MR Physicist recommended prepending SSWarp to skull strip the ghosting out of the magnitude files prior to running FMRIPrep.

Perhaps this is what is causing the issue, open to other suggestions on how to handle the ghosting! The problem was fixed ~half way through data collection, so this is only impacting half our scans. Will try to add before/after of this step in comments, if possible.

Command used (and if a helper script was used, a link to the helper script or the command generated):

fmriprep-docker /data /out --fs-license-file /usr/local/freesurfer-current/license.txt --longitudinal --participant-label 1018

Version:

version = “23.2.0”

Environment (Docker, Singularity / Apptainer, custom installation):

Docker;
docker run --rm -e DOCKER_VERSION_8395080871=25.0.3 -it -v /usr/local/freesurfer-current/license.txt:/opt/freesurfer/license.txt:ro -v /Volumes/Vol6/LOKI/Imaging_Data/BIDS_Raw:/data:ro -v /Volumes/Vol6/LOKI/Imaging_Analyses/TD_Task_Analyses/:/out nipreps/fmriprep:23.2.0 /data /out participant --longitudinal --participant-label 1018

Data formatted according to a validatable standard? Please provide the output of the validator:

docker run -ti --rm -v /Volumes/Vol6/LOKI/Imaging_Data/BIDS_Raw/:/data:ro bids/validator /data
bids-validator@1.14.0
(node:1) Warning: Closing directory handle on garbage collection

	1: [WARN] Not all subjects contain the same sessions. (code: 97 - MISSING_SESSION)
		./sub-1185/ses-03
			Evidence: Subject: sub-1185; Missing session: ses-03
		./sub-1229/ses-02
			Evidence: Subject: sub-1229; Missing session: ses-02
		./sub-1229/ses-03
			Evidence: Subject: sub-1229; Missing session: ses-03
		./sub-1287/ses-02
			Evidence: Subject: sub-1287; Missing session: ses-02
		./sub-1287/ses-03
			Evidence: Subject: sub-1287; Missing session: ses-03

	Please visit https://neurostars.org/search?q=MISSING_SESSION for existing conversations about this issue.

	2: [WARN] The Authors field of dataset_description.json should contain an array of fields - with one author per field. This was triggered based on the presence of only one author field. Please ignore if all contributors are already properly listed. (code: 102 - TOO_FEW_AUTHORS)

	Please visit https://neurostars.org/search?q=TOO_FEW_AUTHORS for existing conversations about this issue.

        Summary:                    Available Tasks:               Available Modalities: 
        3738 Files, 133.52GB        habi                           MRI                   
        79 - Subjects               cond                                                 
        3 - Sessions                vext                                                 
                                    dext                                                 
                                    rest                                                 
                                    reca                                                 
                                    rein                                                 
                                    resting                                                                   

	If you have any questions, please post on https://neurostars.org/tags/bids.

Relevant log outputs (up to 20 lines):

No errors; the only log file included (fmriprep.toml). Here is part of the [workflow], happy to provide any other info.

anat_only = false
aroma_err_on_warn = false
aroma_melodic_dim = 0
bold2t1w_dof = 6
bold2t1w_init = "register"
cifti_output = false
fmap_bspline = false
force_syn = false
hires = true
ignore = []
level = "full"
longitudinal = true
run_msmsulc = true
medial_surface_nan = false
project_goodvoxels = false
regressors_all_comps = false
regressors_dvars_th = 1.5
regressors_fd_th = 0.5
run_reconall = true
skull_strip_fixed_seed = false
skull_strip_template = "OASIS30ANTs"
skull_strip_t1w = "force"
slice_time_ref = 0.5
spaces = "MNI152NLin2009cAsym:res-native"
use_aroma = false
use_syn_sdc = false
me_t2s_fit_method = "curvefit"

Screenshots / relevant information:


The folder structure is:


└── ses-01
├── anat
│ ├── sub-1260_ses-01_acq-MPRAGE_T1w.json
│ └── sub-1260_ses-01_acq-MPRAGE_T1w.nii.gz
├── fmap
│ ├── sub-1260_ses-01_fieldmap.json
│ ├── sub-1260_ses-01_fieldmap.nii.gz
│ └── sub-1260_ses-01_magnitude.json
│ ├── sub-1260_ses-01_magnitude.nii.gz
└── func
├── sub-1260_ses-01_task-cond_bold.json
├── sub-1260_ses-01_task-cond_bold.nii.gz
├── sub-1260_ses-01_task-cond_events.tsv
├── sub-1260_ses-01_task-habi_bold.json
└──sub-1260_ses-01_task-habi_bold.nii.gz
├──sub-1260_ses-01_task-habi_events.tsv

In the summary report, it mentions using:
Susceptibility distortion correction: FMB (fieldmap-based) - directly measured B0 map

It’s a bit hard to see in the screenshot, but in the fmap reference, you can see the green outline is shifted up, as compared to the fmap. The SDC seemed to do pretty much nothing at all… the “distorted” and “corrected” images are essentially the same, with the only obvious difference bing the corrected images are brighter, per se. Will try to add images in a reply.

Here is the BOLD reference in the alignment (corresponding the the fmap reference in the original post)

Here is the original magnitude file with ghosting:

and the output of SSWarp after skullstripping, which was the input for fmriprep

And finally, here is the direct fieldmap image

Hi @saraheyn and welcome to neurostars!

In the future, please open software related issues under the Software Support category, which prompts you for important information we can use in addressing your issue. Please fill in some of the missing information by editing your post. I am particularly interested in:

  1. Your version
  2. Your command
  3. BIDS validation report
  4. How well SDC performed

Best,
Steven

Hi @Steven ,

Appreciate the heads up, sorry for the mis-categorization. I added all the relevant info in the edited post, although I had to remove all but one image again.

In sum, the alignment is not good but the SDC correction seems to do nothing at all (i.e. the distorted and corrected images don’t appear much different; include the corrected image below, but can’t include the distorted for comparison; can add to a reply if that would be helpful). Is the mis-alignment something to worry about?

What did the SDC look like with the fmaps before masking them?

@Steven It definitely looks funky… You can see it distorting a gap in the top right brain, and some distorted gaps in the parietal lobe in the middle left brains.

I am wondering if it has something to do with how fmriprep is preprocessing the fmaps?

When I pull the sub-<>/ses-<>/fmap/ sub-<>_ses-<>_fmapid-b0mapfmap0_desc-magnitude_fieldmap.nii.gz from the outputs…

the original fmap input had NO ghosting, NOT skull-stripped prior to fmriprep:

the original fmap input HAD ghosting, NOT skull-stripped prior to fmriprep:

the original fmap input HAD ghosting, WAS skull-stripped prior to fmriprep:

So clearly something is going wrong with the preproc of the magnitude file if I am inputting a pre-skull-stripped image. Any ideas??

This could be related to colorscale or range but B0map looks flat to my eyes. Could you please confirm the B0map acquisition, especially for EchoTime1 and EchoTime2 using dcm2niix (v1.0.20220720 or later)? See this page, https://github.com/mr-jaemin/ge-mri/tree/main/B0fieldmap

I previously tested GE B0map with fMRIPrep 21.0.4

@Brice might have some insight.

Hi @saraheyn ,

Your fieldmap in Hertz looks a bit weird.
If this is a 2D B0Map it should be configured as a basic “2D Fast GRE” but the 3D B0Map basic “3D Fast SPGR”. When this is misconfigured, some ghosting has been observed. However, the field map values in the brain should be remains correct as long as I know (you can check the values inside the brain it should be by default in the range [-217 217] Hz for 2D B0Map and [-220 220] Hz for 3D B0Map). It might worse checking that.

I am not familiar with fMRIprep, but it might worst checking if fsl_prepare_fieldmap handles it correctly.

fsl_prepare_fieldmap GEHC_FIELDMAPHZ 3dB0map_fieldmaphz mag_3dB0map output DeltaTE
(requires FSL 6.0.7.1 or later)

This is just suggestions.