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 sampling strategy #25

Closed Lestropie closed 2 years ago

Lestropie commented 2 years ago

In tcksample, there are two possible ways in which to sample values from an underlying image:

The latter may be a little more computationally expensive, but it may also be preferable to reduce interpolation effects.

sina-mansour commented 2 years ago

Adding the -precise function increased the total runtime from ~70 seconds to ~270 seconds (~3 extra minutes). I'll keep the -precise for now.

I'll report the exact runtimes from the first 100 UKB instances (using the finalized pipeline #21). We may then decide to revert this change in case the batch execution duration estimate does not meet our preferences.

Lestropie commented 2 years ago

Yes, -precise is usually ~ 3-4 times more expensive when I use it in tckmap. But, if the proposed modification to tcksample were implemented whereby the input image could be 4D and the output would be a matrix with one column per image volume, the determination of streamline-voxel intersections would only need to be computed once; the weighted mean per streamline could then be computed for all metrics since they all reside on the same voxel grid. So one proposal would be to switch to -precise in tcksample if I find the time to implement 4D image support in tcksample.