QSIPrep transform T1 to ACPC when not using anatomical workflow

Hello,

I am using QSIPrep (0.14.2) to process data for which I cannot use the anatomical workflow (that is, I run with dwi-only). However, I have to make a brain mask to continue with analysis. I have tried MrTrix dwi2mask with unsatisfactory results, so I want to use the T1 image, for which I can make a reliable mask. However, the T1 image is not in the same space as the preprocessed DWI, since QSIPrep aligns to ACPC.

I have all of the QSIPrep intermediary files. Is there one in there that will give me the transform from native-to-ACPC space? I have tried using the transform in /scratch/qsiprep_wf/single_subject_XX_wf/dwi_preproc_wf/b0_anat_coreg/acpc_reg, but the results are not great. Here is the command I tried:

antsApplyTransforms -i $T1_skullstripped -d 3 -e 3 -o test.nii.gz \
 -r $QSIPrep_SubDir/dwi/*dwiref.nii.gz -t /scratch/qsiprep_wf/single_subject_XX_wf/dwi_preproc_wf/b0_anat_coreg/acpc_reg/transform0GenericAffine.mat 

Here is the result (realigned T1 in red, background is dwiref):

Is there something else I should try? Thanks in advance.

Best,
Steven

Update: it looks like the transformation in the /scratch/qsiprep_wf/single_subject_XX_wf/dwi_preproc_wf/b0_anat_coreg/itk_to_rigid worked better.

Glad you found this! Could you open an issue on qsiprep? I need to start saving the t1w to acpc transform in the derivatives