Exclusion of T1w image in QSIPrep

Hi all,

I ran QSIPrep on the same DWI dataset twice: once including T1w images and once without T1w. The resulting diffusion maps look very similar visually, but voxel-wise values differ noticeably when compared numerically.

My understanding is that most preprocessing is done in native DWI space and that T1w is registered to DWI, so I wouldn’t expect large changes in diffusion-derived metrics purely from including T1w.

Could you clarify:

  • What mechanisms (e.g., masking differences, distortion correction constraints, interpolation, bias field estimation) might explain these voxel-wise differences?
  • Are such differences expected?
  • For microstructural modeling, is including T1w generally considered more robust?
  • In some cases, could it actually be preferable to exclude T1w to better preserve native diffusion signal?

Same raw DWI data, same fieldmaps, same QSIPrep version/settings (except T1 inclusion).

Thanks!

Hi @Tal_Finkelman and welcome to neurostars!

For context it would help if we knew the version and command you used for processing, so for future posts please use the Software Support post template.

Not quite. The T1w is registered to ACPC orientation, and then the DWI is registered DWI–>T1w–>ACPC.

Neither would I! Did you use QSIRecon? What version/command/recon-spec? It would also help to know how you quantified these differences.

Again, not sure how you quantified these differences or how severe they are from you post. This could just be differences in the ACPC reorientation. The masking is estimated directly on DWI (shouldn’t change), fmap SDC is not affected by inclusion of T1w, and bias correction is done directly on DWI image.

It shouldn’t matter generally.

In any case QSIPrep reorients the signal to ACPC. It’s just a matter of whether it goes directly there or whether it is informed via the T1w image. The T1w-informed transformation should be more robust for that process generally. But if the t1w image is bad, or in different coordinate spaces for whatever reason (not common), then the coregistration could go awry.

Best,
Steven

Hi Steven,

Thank you!

here is the code I’m using, the version is 1.0.1.dev0+gee9aa2e.d20250115.

  qsiprep \
  "$ {DATADIR}" "$ {OUTPUTDIR}" participant \
  --participant-label "${SUBJECT#sub-}" \
  --output-resolution 1.5 \
  --nthreads 16 \
  --omp-nthreads 4 \
  --mem 32000 \
  --work-dir "$ {WORKDIR}/$ {SUBJECT}"

I did not use QSIREcon, I used pyafq. The maps I was comparing are the SUB_space-ACPC_desc-preproc_dwi.nii.gz output of qsiprep.

I assesed the differences by calculating: (MATLAB)
1- The normalised voxel values difference: (result = 0.8)
norm(double(nii1(:)) - double(nii2(:))) / norm(double(nii1(:)));
and when I look at absolute difference I get a mean difference of 299.6 and max value of 2e4

2- Correlation per volume: (mean r value = 0.65)

for v = 1:nVols
    vol1 = double(nii1(:,:,:,v));
    vol2 = double(nii2(:,:,:,v));
    r_vol(v) = corr(vol1(:), vol2(:));
end

and 3- image similarity per volume: (mean similariry = 0.14)

for v = 1:nVols
    ssim_val(v) = ssim(nii1(:,:,:,v), nii2(:,:,:,v));
end

The transform matrix, image size and resolution of the two images are the same.

The only difference between the two runs is an --anat-modality none\ line in the qsiprep command.

Can these differences originate from the ACPC reorientation?
Doesn’t the DWI–>T1w registration involve interpolation? Can it explain the difference?

Thank!

Hi @Tal_Finkelman,

In the future please format your code text for readability using tickmarks or the </> button in the text editor. You can see I edited your prior post for you this time.

In the future, please report what version of the container you downloaded, the versioning that is reported in the logs isn’t accurate. But I am guessing this is 1.0.2?

In the future please also include the apptainer run or docker run preamble.

Just so you know, QSIRecon can run PyAFQ.

The movement from DWI to ACPC always happens in one step, whether that is directly from DWI–>ACPC (in the case of no T1w) or DWI–>T1w–>ACPC (in the case of T1w). The transforms are composed together in the case of T1w so registration still only happens once. So there is not a difference in the number of interpolation steps.

If you are comparing voxel to voxel and the registrations are different, then yah that would cause differences.

In either case, I don’t think this difference you are observing is practically meaningful. That is, if you are looking at bundles, then how good each subject is ACPC aligned doesn’t matter because you’ve already abstracted to participant-specific bundles. And if you are doing something mass univariate, then the spatial normalization to MNI will take care of misalignments from ACPC anyway.

Now if somehow the inclusion/exclusion of T1w in the processing is leading to aberrant or different microstructural estimation within bundles, that would be a concern.

Best,
Steven

Hi Steven,

Thank you for the explanation. Next time, I’ll make sure to write and version the code properly.

Just to be sure- there isn’t a way to avoid moving the DWI to ACPC space, is there?

Thanks,
Tal

Hi @Tal_Finkelman,

No, there is no way to disable that at the moment.

Best,
Steven