Diagnose tensor orientation problems
Sometimes when processing diffusion MRI data, the DWIs come to us flipped or in a different coordinate system than the b-vectors. This issue manifests itself in orientation problems with the fit tensors, which can be very subtle and hard to detect.
There are two types of mis-orientations:
- Permutations, where e.g. X has been exchanged with Y. These are easy to detect using an RGB-mapped visualization of the tensor field, or even by examining the DWIs if you know the b-vectors.
- Flips, where the images have been mirrored in e.g. X. These are easy to detect using a tensor ellipse visualization or by looking at a tractogram, a fair bit harder to spot by looking at a field of the off-diagonal elements of the tensors, and impossible to spot in an RGB visualization of the tensor field due to the mirror symmetry of the colormap.
Either type can be corrected by transforming each individual tensor in the tensor field, without changing its position. $G/bin/mritensormult can perform general transformations of tensors.
It's cheapest to correct orientation problems by transforming the DWIs before you even fit tensors. In this case, you actually transform the entire image; that is, you change the positions of the various voxels. Various special-purpose tools for correcting orientation problems at the DWI stage have been hacked together in the past, but (as far as Jadrian knows) nothing general-purpose exists yet.
Since generating streamtubes takes a long time, it is ideal to detect orientation problems just by looking at the tensors, before generating the tubes. However, the effects of incorrect orientation are far more apparent in the tube visualization than in the tensor map.
Before Generating Tubes
- Generate RGB-coded tensor maps with mriatlas:
cdinto the directory of the processed brain you'd like to diagnose.mriatlas -o tensors.pdf voxel_models/tensors- Open up the resulting tensors.pdf in your favorite PDF viewer.
- The color coding is: red = X, green = Y, blue = Z.
- mriatlas specifies slices by the plane's equation, e.g. x = 30. The named dimension is therefore the through-plane direction in the slice you're looking at.
- Check for orientation problems:
- Look at a slightly para-sagittal section; this section should contain the corpus callosum (going through-plane) and cingulum bundle (superior to the CC, running anterior-posterior). Verify that the CC is the appropriate through-plane color.
- If it's the wrong color, you have a permutation.
- Look at a coronal section and make sure that cingulum (which should now be running through-plane) is the appropriate color.
- Again, an incorrect color indicates a permutation.
- Look at a slightly para-sagittal section; this section should contain the corpus callosum (going through-plane) and cingulum bundle (superior to the CC, running anterior-posterior). Verify that the CC is the appropriate through-plane color.
Lots of other groups seem to use planes of diffusion ellipses to diagnose orientation problems, but we don't currently have a way to generate those from tensors in MRIimage format.
After Generating Tubes
- Generate tubes with
$G/bin/tubegen(check a diffusion processing pipeline Makefile to see how). - View them with Brainapp.
- Check for orientation problems:
- Look at a front view of the tubes through the callosum and make sure they complete a U the goes to the superior cortex.
- If it's broken, you have a flip in either the superior-inferior direction or the left-right direction.
- Look at a top view of tubes and make sure that splenium and forceps complete a U that goes anterior and posterior from the callosum.
- If it's broken, you have a flip in either the anterior-posterior direction or the left-right direction.
- Look at a front view of the tubes through the callosum and make sure they complete a U the goes to the superior cortex.
Automatic Diagnosis
Automatic diagnosis is beyond our grasp at the moment but in principle it's not impossible, given certain assumptions about the structure that generated the data (that is, that it's a brain). This might be a neat project for someone.