sina-mansour / UKB-connectomics

This repository will host scripts used to map structural and functional brain connectivity matrices for the UK biobank dataset.
https://www.biorxiv.org/content/10.1101/2023.03.10.532036v1
62 stars 7 forks source link

tcksample 4D image input #29

Closed Lestropie closed 1 year ago

Lestropie commented 2 years ago

Related to #21, but that issue now has a number of different topics embedded.

https://github.com/MRtrix3/mrtrix3/pull/2451 has been cherry-picked into the ukb branch. You can use mrcat -axis 3 to combine all of the 3D quantitative image metrics of interest into a single image series, and then execute tcksample on that to produce a 2D matrix, with one row per streamline and one column per 3D image volume metric. From there, at least for now, you can use a small Python script to extract one column at a time to feed as input to tck2connectome.

Particularly with the use of tcksample -precise, this should reduce overall computation.

\What would be ideal is if you could then feed this matrix file to tck2connectome and have it generate multiple connectome matrices in one invocation. I will next look into how much effort / redesign might be involved in this. But try making use of the functionality here in isolation and see if it reduces total computation time.