I am a newcomer of the Mrtrix. Recently, I am studying the article, titled “Anatomically-constrained tractography: Improved diffusion MRI streamlines tractography through effective use of anatomical information”. This is a very meaningful and interesting work. I am confused with the details of the streamline seeding of the gm-wm interface, which was mentioned in the Fig 3.

My question is：
1)How to define/get the isocontour between gray matter and white matter(red solid circles) ?(figure 3. d)
2) What is the “partial volume gradient”? and how to define?

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:

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.

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.