nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
631 stars 293 forks source link

Wrong output dimensions #3228

Open adamnarai opened 7 months ago

adamnarai commented 7 months ago

What happened?

I run fMRIPrep on functional data with spatial dimensions 104x104x54 (2x2x2.5 voxel size) with --output-spaces MNI152NLin6Asym:res-native and got the results with dimensions 75x94x64 (2x2x2.5 voxel size). I expected the first two dimensions to be the same as MNI152NLin6Asym with 2mm resolution (91x109x91). Is this normal? Is there some cropping in the pipeline?

What command did you use?

fmriprep-docker $BIDS_PATH $OUT_PATH participant --participant_label $1 -w $WORK_PATH --fs-license-file $FS_LICENCE_PATH --output-spaces MNI152NLin6Asym:res-native run:res-native fsaverage6 --cifti-output 91k --ignore slicetiming sbref --write-graph

What version of fMRIPrep are you running?

23.2.0

How are you running fMRIPrep?

Docker

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

No response

Additional information / screenshots

No response

effigies commented 7 months ago

The BOLD FoV for res-native is determined by resampling the MNI brain mask to the target resolution, cropping and padding by a couple of voxels in each direction. You can use MNI152NLin6Asym:res-2 to get outputs in exactly the same resolution and field-of-view as the template.

adamnarai commented 7 months ago

Thanks for the info! However, I'm still curious, since we previously run an earlier fMRIPrep version (23.0.2) on the same dataset with similar parameters (--output-spaces MNI152NLin6Asym:res-native run:res-native fsaverage6 --cifti-output 91k --use-aroma --aroma-melodic-dimensionality 100 --nthreads 8) and got the output with dimensions 91x109x73 (2x2x2.5 mm voxel size). This is the main reason we are surprised that it is now 75x94x64 (2x2x2.5 mm voxel size) in the latest fMRIPrep version for the same data.

effigies commented 7 months ago

Hmm. I'm not sure exactly what we're doing differently for generating the resampling reference. I did do a significant rewrite that would have provided an opportunity for slightly different FOV masks, but I have tested the new code fairly extensively. Does the alignment of the final BOLD volume with the template still look reasonable?

adamnarai commented 7 months ago

Yes, I tested the alignment with MNI152NLin6Asym_res-02 and it looks fine. The scull is partially cropped, but the whole brain is within the FOV.