How to keep fmriprep output-space to native EPI

I am analysing an openneuro fMRI dataset that includes native EPI-space ROIs with headers that are co-registered to the subject’s anatomical T1w image. Is it possible to get fmriprep to output native-space EPI with a co-registered header? I have been playing with the output-space options and the closest I can get is T1w, which is resliced.

For instance, in the dataset I’m working on the ROI masks are shape (64, 64, 50), as is the raw BIDS data, but the fmriprep’d EPIs come out as (55, 60, 51).

1 Like

This is currently not supported. It would not be too hard to add (and we would support such contribution), but I am worried it would have limited use.

For you particular usecase (if you are certain the mask files are in T1w space - they just need reslicing) you can either reslice the mask to match the output of FMRIPREP with or extract the timeseries using https://nilearn.github.io/modules/generated/nilearn.image.resample_to_img.html (remember to pick the right interpolation) http://nilearn.github.io/modules/generated/nilearn.input_data.NiftiLabelsMasker.html (which should respect the header transformations)

We are actually working on related topics. If you look at https://github.com/poldracklab/fmriprep/pull/1334#discussion_r226676575, your case would be supported by a new keyword orig added to the tentative argument name --output-reference (or something along the lines).

But, although that would add a mechanism to the command line to specify the original EPI space as reference, we would also need to implement such behavior. As Chris was mentioning before, that is not implemented yet.

We would be very happy to walk you through the process of contributing the feature. Let us know if you feel you can/want take on it.

Hi - I’m not sure that my question was worth opening up a new topic since I’m seeing a lot of related questions.

We currently have the flag --output-space fsnative which I have attempted to use and it will run the processing all through to the end without any errors. However, it does not provide with a bold preprocessed image in native space. I can see the bold images in the log being processed in native space but there is no nii file for me to use. Is this expected? If so, how can I get it to produce these images?

Thanks in advance.

Hi @Zeynab,

I think this question belongs in this thread, although I’ll add some clarifications.

The original poster requested processed BOLD files in their original native space. Support for that is still missing in fMRIPrep. We could push its priority up if the community requires so.

The second clarification is about fsnative space. That corresponds to “FreeSurfer native” space, which is a surface space. You might expect GIfTI files (.gii) with the space-fsnative entity among the functional derivatives.

For your records, this is the feature request in our repo.

2 posts were split to a new topic: Moving images from MNI to BOLD/EPI/native space