Diagnose tensor orientation problems: Difference between revisions

From VrlWiki
Jump to navigation Jump to search
Jadrian Miles (talk | contribs)
New page: Sometimes when working with Diffusion MRI data, our DWIs come to us flipped or in a different coordinate system than the b-vectors. This issue manifests itself in orientation problems...
 
Jadrian Miles (talk | contribs)
No edit summary
Line 1: Line 1:
Sometimes when working with [[Diffusion MRI]] data, our 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.
Sometimes when [[Diffusion Processing Pipeline|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.


== Manual Diagnosis ==
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 operating on the tensor field with <code>$G/bin/mritensormult</code>.  Various special-purpose tools for correcting orientation problems at the DWI stage have been hacked together in the past, but 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 <tt>mriatlas</tt>:
## <code>cd</code> into the directory of the processed brain you'd like to diagnose.
## <code>mriatlas -o tensors.pdf voxel_models/tensors</code>
## Open up the resulting <tt>tensors.pdf</tt> in your favorite PDF viewer.
##* The color coding is: red&nbsp;=&nbsp;X, green&nbsp;=&nbsp;Y, blue&nbsp;=&nbsp;Z.
##* <tt>mriatlas</tt> specifies slices by the plane's equation, e.g. ''x&nbsp;=&nbsp;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.
 
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 <code>$G/bin/tubegen</code> (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.
<!--
== Examples ==
Email "Brown 3T Cohen Study brain tubes (at last!)" contains screenshots from $G/data/diffusion/brown3t/cohen_hiv_study.2007.02.07/patient024/tubes.2008.07.27, a healthy brain with no orientation problems.  I believe $G/data/diffusion/brown3t/cohen_hiv_study_registered.2007.02.07/patient116/tubes.2008.11.06 has an X flip.  Should generate screenshots of RGB maps and streamtubes for examples.
-->


== Automatic Diagnosis ==
== 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).
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.


[[Category:HOWTO]][[Category:Diffusion MRI]]
[[Category:HOWTO]][[Category:Diffusion MRI]]

Revision as of 23:03, 7 November 2008

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 operating on the tensor field with $G/bin/mritensormult. Various special-purpose tools for correcting orientation problems at the DWI stage have been hacked together in the past, but 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

  1. Generate RGB-coded tensor maps with mriatlas:
    1. cd into the directory of the processed brain you'd like to diagnose.
    2. mriatlas -o tensors.pdf voxel_models/tensors
    3. 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.
  2. Check for orientation problems:
    1. 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.
    2. 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.

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

  1. Generate tubes with $G/bin/tubegen (check a diffusion processing pipeline Makefile to see how).
  2. View them with Brainapp.
  3. Check for orientation problems:
    1. 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.
    2. 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.

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.