Closed Lestropie closed 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.
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
.
In
tcksample
, there are two possible ways in which to sample values from an underlying image:For each streamline vertex, perform trilinear interpolation upon the image values at that precise point; average these across all vertices in the streamline.
Map a continuous representation of the discretely-sampled streamline; see Appendix 3. This produces, for each streamline, a set of voxels that are traversed, along with the length of the intersection between the streamline and each voxel. So from there you can perform a weighted mean, with voxels where the streamline intersection is longer contributing more to the mean calculation. (Activate using
-precise
option)The latter may be a little more computationally expensive, but it may also be preferable to reduce interpolation effects.