Upsampling bold output in fmriprep

Hi,

I’m trying to upsample the output of fmriprep to match that of the T1w input. I tried running
fmriprep-docker $bids_dir $out_dir participant --participant_label $sub_id --fs-license-file ${FREESURFER_HOME}/license.txt --fs-no-reconall --n_cpus 4 --output-spaces T1w --ignore {fieldmaps sbref} but the output was still in the regular fov. I’d like to get it into the T1w input’s fov. When I tried running it with --template-resampling-grid it said this option is deprecated. I’m using fmriprep v1.5.0. Does anyone know how I might be able to do this? It’s ok if I do it after fmriprep runs as well. Thank you very much.

Noah

Hi, could you describe your use case more? I would generally recommend against upsampling functional data.

What I’m trying to do is create an activation mask of the eventual output and combine it with the T1 image so it’s fused into a single image rather than two separate images. So the pipeline would be fmriprep -> first level analysis -> combine statistical output with T1w image (I use something like fslmaths zstat1.nii.gz -thr 5 -bin -mul 600 -add T1w.nii.gz Function_Activation_w_T1w.nii.gz ). It needs to be some way to mark the activation of the functional stats on the T1w image. For instance, I could just use a paint brush and color over the activation areas by hand but that’s not optimal. Thank you very much for the quick response.

You can plot statistical maps on a T1w background with pretty much any plotting tool, without matching voxel sizes.

As just one example, see Nilearn’s plot_stat_map function.

I suppose a better way to put it is that I’d like to increase the voxel intensity of the T1w image that correspond to the functional activation (when overlayed). I don’t want to have to use the functional activation map. I realize this is an unusual use so any help is greatly appreciated.

I see. You might then use something like resample_to_img with the T1 image and the statistical map.

I would just avoid resampling the functional image before analyzing it.

1 Like

Thank you very much! I’ll definitely take that advice. And thank you in general for this nice package

Anyone interested in more flexibility to setup the output gridding/surfaces in both standard and nonstandard spaces should check out this RFC https://github.com/poldracklab/fmriprep/issues/1604

@effigies, I was also thinking of upsampling my bold images. I have one dataset with different voxel resolution than my current dataset, and the plan is to compare voxel-by-voxel connectivity between datasets. So I need to find a common space. The old dataset is in T1w space, so I thought of brining the bold images of my current dataset to T1w space as well, otherwise I don’t see how I can make a voxel-by-voxel comparison. Would you also recommend against upsampling in this case?

I’m also wondering whether upsampling with fmriprep would be in princple possible.

I see newer releases of fmriprep have the option to ask for specific resolutions of the --output-spaces. Yet, --output-spaces T1w:res-1 has no effect, the space-T1w_preproc_bold.nii.gz files are still in their native resolution.

I understand the potential caveats of upsampling data beyond their native resolution, but it still might make sense in some scenarios (we’d like to compare data reliability for different sampling grids and preprocessing scenarios systematically in our dataset).

Besides this, fmriprep has given us really excellent results so far and we would really like to stick with it! Is the only option to upsample currently to manually compose the motion correction and scanner-to-T1w transforms?

Many thanks in advance

Also, some people have argued that upsampling can improve spatial detail without impairing data quality, e.g.