TCKDFC question

Hi All,

I am new to MRtrix.

mrtrix.readthedocs.io/en/latest/reference/commands/tckdfc.html

describes the new tool tckdfc but says only that preprocessed fmri data should be given as input.

Can anyone please clarify what kind of preprocessed fmri data is acceptable?

i.e., should it be standard space?
Is preprocessed data from any pipeline okay (e.g., fmriprep)?
Should it be volumetric *.nii files or will cifti files work?

Thanks,

Dianne

Here’s what I figured out about my own question. Perhaps it will help someone else:

Input images:

  • tract file: any *.tck file (including specific tracts extracted from the giant mass of streamlines).
  • bold image: A preprocessed 4D functional image registered into the space of the B0 images.

The smaller the track image, the faster it runs.

static is WAY faster than dynamic (dynamic with the BATMAN tutorial data, a million streamlines and the T1 template took roughly 30 minutes on my Mac Pro)

BOLD image

I used a 4d volumetric fmriprep output with 250 timepoints as my bold image. I coregistered the bold image to the B0 image as suggested by the Calamante 2017 paper:

Create transform matrix:
flirt -in bold.nii.gz -ref mean_b0_preprocessed.nii.gz -out bold2b0.mat

Generate coregistered image (bold coregistered to B0):

flirt -in bold.nii.gz -applyxfm -init bold2b0.mat -out bold_coreg.nii.gz -paddingsize 0.0 -interp trilinear -ref mean_b0_preprocessed.nii.gz

Create mif image (I don’t think I have to, but I wanted to try):

mrconvert bold_coreg.nii.gz bold_coreg.mif

TKDFC Requirements

You must specify:

  • -static or -dynamic
  • the template file (the space the output should be in),
  • the tck file (you can actually choose any *.tck file you want)
  • the coregistered bold image
  • the output name

Here’s a minimal tckdfc command that does not complain:

tckdfc -static -template T1_coreg.mif sift_1mio.tck bold_coreg.mif tdfc_out.mif

I also tried a different tck file generated during the Batman tutorial. It worked fine:

tckdfc -static -template T1_coreg.mif cst.tck bold_coreg.mif tdfc_cst.mif

The result is anatomically constrained to the WM (makes sense, so is the tck file in the Batman tutorial).

If you choose dynamic, you must supply a shape and number of steps for the sliding window:

  • Valid shape choices are: rectangle, triangle, cosine, hann, hamming and lanczos.
  • A number of steps (size of sliding time window. I bet bigger values run faster but produce more course time results). Really, I chose at random for the following test:

tckdfc -dynamic hamming 3 -template T1_coreg.mif sift_1mio.tck bold_coreg.mif tdfc_dynamic.mif

The resulting dynamic output file has the same number of time points as the input fmri file. Careful, these dynamic files can be REALLY big (mine in this example was 10 GB). You can zip up a mif file…and save a lot of space (in my case, down to 761 MB). However, it would probably have been better to use a lower resolution template image.

Hi Dianne,
Sorry for the slow reply - I don’t regularly check this, and just read it by chance.

As you worked it out, the BOLD image needs to be a volumetric data (in any format that MRtrix can read) co-registered to the B0 data, and that has been pre-processed to a point that is ready for the correlation analysis done with FC.

Regarding the number of steps, there is no easy answer as to how to chose the width of the sliding window. This paper (https://www.ncbi.nlm.nih.gov/pubmed/25818688) gives you some indication (and that is why we used ~1min window in our paper).

You are correct that files can be very big if you use very high super-resolution, as the output needs to be float, and will end up with a very high matrix size in (x,y,z) as well as, typically, a large number of volumes in the time dimension (see discussion in “Practical issues and implementation variants” on page 3771 of the original paper: https://www.ncbi.nlm.nih.gov/pubmed/28447220).

Have fun with the method! :slight_smile:

Best regards,
Fernando