2013 Summer Project Week:Investigate Potential Tensor Computation Improvement via Positive Semi-Definite (PSD) Tensor Estimation

From NAMIC Wiki
Jump to: navigation, search
Home < Investigate Potential Tensor Computation Improvement via Positive Semi-Definite (PSD) Tensor Estimation
Back to Summer project week Agenda

Key Investigators

  • BWH: Raul San Jose, Carl-Fredrik Westin, Demian Wassermann
  • UNC: Marc Niethammer
  • UIowa: Hans Johnson, Joy Matsui


Tensor estimation in Slicer4 is done by vtkTeemEstimateDiffusionTensor. In the inner loop of this class, the tensor fitting is actually computed by _tenEstimate1TensorSingle (teem/src/ten/estimate.c). The solution that teem takes to deal with negative eigenvalues is to add an isotropic part corresponding to the smallest eigenvalue if the eigenvalue is negative and the flag negEvalShift is On. This flag is part of the tenContext structure that controls the estimation options and, in turn, can be set in the vtk class by means of ShiftNegativeEigenvalues. By default, ShiftNegativeEigenvalues is Off in the constructor.

Long story short, teems shifts the value of the eigenvalues so the most negative eigenvalue becomes zero that it is not what it is exactly done in the PSD constrained paper. I've (Raul) been digging through the old slicer2 repository but I did not find that implementation. I'm sure that we played with it but it never made it to any of the CSV branches !!! (old stuff, as you can see). I recalled that we used to do the correction when computing the scalar quantities rather than at tensor estimation. But, surprise, surprise, I found the code in Slicer4. It is funny how you forget things that you have done. I believe this code has traveled through the time machine of Slicer2, to Slicer3 and now to Slicer4.

If you check vtkDiffusionTensorMathematics you will find the magic in FixNegativeEigenvaluesMethod [1]

However, if you go to the ExecuteData, this method is commented in favor of applying the same approach that teem applies. I'm sure that this was, at the time, an unconscious decision to be consistent.

I have to say that this might be a good time to revisit this issue and add some consistency across the code about where to apply this kind of tricks. The PSD trick is only valid under the least-square solution, so it would be the most sense to apply it as an option in vtkTeemEstimationDiffusionTensor when the LS method is selected. I don't know if this can be generalized to the WLS but my experience is that WLS deals with many of this negative eigenvalues oddities when it weights down the noise DWIs.


Discuss approach and schedule making this change after project week.

Approach, Plan

  1. Modify the CLI code to expose the alternate analysis processing schemes at runtime rather than at compile time
  2. Modify XML to expose option in the Slicer GUI


Discussions occured, and it was determined that this work is best done after project week.

File:DWItoDTI with PSD EmailConversation.pdf E-mail conversation

Delivery Mechanism

This work will be delivered to the NA-MIC Kit as an improvement to the existing DWItoDTI module