About the streamline seeding from GM-WM interface

Hi Suyu,

Your question may or may not have been provoked by this recent discussion, but there’s the link just in case its contents are also of interest to you.

Firstly, both of the mechanisms you refer to are dealt with internally by tckgen when you use the -seed_gmwmi option. So if you’re simply looking to make use of the mechanism rather than duplicate it, all of the functionality is there ready to go.

The details:

  1. The isocontour is defined as the surface upon which the trilinear-interpolated values of the GM and WM tissue partial volumes are equivalent. Note that this is a sub-voxel definition: at each point in space, you can acquire values for all five tissue types based on trilinear interpolation of the eight surrounding voxels; the isocontour is then simply the set of all points where the values for GM and WM are equal. The set of all of these points forms a surface.

  2. Just as we can define partial volumes at any sub-voxel position in space using trilinear interpolation, we can also define the local gradient: this is the rate at which those interpolated partial volume values change if the spatial position of the point is perturbed. This gradient can then be used to estimate an appropriate direction and length in which to move the point in order to locate the isocontour.

If you’re interested, the code responsible for finding the isocontour based on an initial point near the interface is here.

Cheers
Rob