On the use of fmriprep, qsiprep alignment to MNI152NLin2009cAsym space with different image sizes

After I preprocessed the data using qsiprep and fmriprep, I noticed that the size of the images after the alignment was different.Why does this happen?
raw dwi: 14014092
raw fmri: 10410472 222
preprocessed dwi: 9711698 222
preprocessed fMRi: 9711597 222

docker run --rm --gpus all --name qsiprep_sub-1001 \
  -v /home/user/software/license/license.txt:/opt/freesurfer/license.txt:ro \
  -v /home/user/zy/HCP_BIDS/:/data:ro \
  --gpus 2 \
  -v /home/user/zy/eddy_params.json:/sngl/eddy/eddy_config.json:ro \
  -v /home/user/zy/qsiprepout/:/out \
  qsiprep:0.17.0   /data /out participant \
  --eddy-config /sngl/eddy/eddy_config.json \
  --skip_bids_validation \
  --output-resolution=2 \
  --participant_label sub-1001  \
  --n_cpus=4 \
  --omp_nthreads=4 \
  --distortion-group-merge average 
docker run  --rm --name fmriprep_2045 \
-v ${fsl_license}:/opt/freesurfer/license.txt:ro \
-v ${input_dir}:/data:ro \
-v ${output_dir}:/out \
nipreps/fmriprep:latest \
/data /out participant \
--participant_label {sub-2045,sub-1099} \
-w /work \
--skip_bids_validation \
--n-cpus 23 \
--omp-nthreads 23

Hi @yongzhang,

For DWI, you set your --output-resolution=2 which is different than your original resolution. For fMRI, you are probably looking at an image that has been spatially normalized (e.g., MNI space), which involves regridding.

Also, QSIPrep outputs are in subject space (but AC-PC aligned), not MNI space.


Thanks for the reply. fmriprep’s default ouput-space is MNI152NLin2009cAsym 2mm (the output file looks like this).

Also, QSIPrep outputs are in subject space (but AC-PC aligned), not MNI space.
This doesn’t affect my ability to run mrtrix_multishell_msmt_ACT-hsvs, right? What I’m not sure about is how qisprep aligns the raw mask to the same size as the preprocessed image(https://neurostars.org/t/problems-with-the-generation-of-templates-in-the-get-atlases-folder-in-the-execution-of-qsirecon/26293?u=yongzhang)

No it will not affect this. QSIRecon expects to use QSIPrep outputs which are AC-PC aligned, so it will run as intended.

Thank you very much for your reply! I’d like to ask which function is used to transform the inside of the red box of my picture to look like this (it’s the process of mask making inside qisrecon, I don’t see a specific command.txt from the work folder). In that case, I can align this mask to the fmri as well and it doesn’t matter that the fmri and dwi are different sizes, right?

I’d need to find a working directory of a run that uses this workflow, which I do not have on me at the moment. I know the atlases are not in the GitHub repo, but they are in /atlas/qsirecon_atlases/ within the container.

The command is probably something like this:

antsApplyTransforms --default-value 0 --dimensionality 3 --float 0 \ 
--input ${ATLAS_IN_MNI} --interpolation MultiLabel \ 
--output $OUTPUT --reference-image ${PREPROC_DWI_IMAGE} \ 
 --transform sub-XXX_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5