# Fibre cross-section metric

Hi!
I’m reading the new paper about Fixel Based Analysis (by @Dave) and I found myself a little bit confused with the way the fibre cross section measure is calculated in the FBA tutorial in MRtrix.

The paper says “FC is estimated from the warp field that maps from template to subject space” because the Jacobian tells you if the fibre bundle is shrinked or expanded (smaller or bigger with respect to the template).
In the MRtrix tutorial for FBA it is suggested to calculate the FC using the warp2metric command with the warp from subject to template as the input (the reverse one), so I have some questions:

Does this command “invert” the warp in the input?

Or, Does it invert the output in some way?

Thanks in advance for helping me to understand this.

Hi,
I can understand how this might be confusing. I’ve named the warps in the tutorial to describe the direction the images are warped (i.e. what the transformation can be used for). So to transform images from subject space to template space, the warps you need are called subject2template.

However, in the paper it refers more technically to how that transform is defined. To warp a subject image into template space, you need to define for every template voxel, a mapping that points to the corresponding point in subject space (i.e. each warp image voxel (in the template space) stores a x,y,z vector to the position subject space, defined in scanner coordinates). As mentioned in the paper this is sometimes called a ‘reverse’ or ‘pull-back’ warp. Note the corresponding point in subject space is very unlikely to be exactly in the middle of a voxel, and so the subject image must be interpolated at this point. This interpolated value is then ‘pulled back’ and stored in the output image voxel (in template space). This interpolation is why a reverse pull-back transformation must always be used to warp images, and you can’t ‘push’ an image forward (i.e. it’s how all warps in all packages are applied, and not specific to FC).

So in short the subject2template warps in the tutorial transform subject images to template space by defining the mapping from template to subject space (confusing I know).

Great to see people trying to understand the details, and not blindly following the instructions!

Cheers,
Dave

1 Like

Thank you very much @Dave for your detailed explanation.

One of the reasons of my confusion was that I was thinking about the warp to transform the subject to the template as a “function” from the subject space to the template space, but actually this warp is defined using a “function” from the template space to the subject space and that one is the “reverse” that you talk about in the paper and no the “inverse” (template2subject) one.

I think I just re-wrote what you said but I want to know if I am getting the idea

Yes that is correct. The subject2template warp in the FBA instructions is the ‘reverse’ warp that is mentioned in the paper.

To get a feel for what is going on, you can load the warps in `mrview` at the same time as the subject and template image. Make sure the ‘snap to image grid’ button is off, so that images are displayed relative to each other in scanner space. You’ll note that the subject2template warp is defined on the same grid as the template image.

This is assuming both subject and template have different transforms in their headers (as shown by `mrinfo`). If both subject and template have the same transform, then all images including the warps will be in the same scanner space location and overlap in `mrview`.

Note that when viewing warps in mrview they will be rendered as RGB. This is because `mrview` detects 3 components in the 4th dimension and assumes it’s a vector map (e.g. tensor primary eigenvector image). You can change this to grey scale, however I find it quite useful for visualising the transformation (red: left-right transformation, blue: inferior-superior: green: anterior-posterior).

Cheers,
Dave

1 Like