Difference between revisions of "2013 Summer Project Week:Investigate Potential Tensor Computation Improvement via Positive Semi-Definite (PSD) Tensor Estimation"

From NAMIC Wiki
Jump to: navigation, search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
[[2013_Summer_Project_Week#Agenda|Back to Summer project week Agenda]]
 
<gallery>
 
<gallery>
 
Image:PW-MIT2013.png|[[2013_Summer_Project_Week#Projects|Projects List]]
 
Image:PW-MIT2013.png|[[2013_Summer_Project_Week#Projects|Projects List]]
Image:genuFAp.jpg|Scatter plot of the original FA data through the genu of the corpus callosum of a normal brain.
+
Image:PSD_NewOption.png|How the CLI needs to expose a new feature for PSD.
Image:genuFA.jpg|Regression of FA data; solid line represents the mean and dotted lines the standard deviation.
 
 
</gallery>
 
</gallery>
 
==Instructions for Use of this Template==
 
#Please create a new wiki page with an appropriate title for your project using the convention 2013_Summer_Project_Week:<Project Name>
 
#Copy the entire text of this page into the page created above
 
#Link the created page into the list of projects for the project event
 
#Delete this section from the created page
 
#Send an email to tkapur at bwh.harvard.edu if you are stuck
 
  
 
==Key Investigators==
 
==Key Investigators==
* UNC: Isabelle Corouge, Casey Goodlett, Guido Gerig
+
* BWH: Raul San Jose, Carl-Fredrik Westin, Demian Wassermann
* Utah: Tom Fletcher, Ross Whitaker
+
* UNC: Marc Niethammer
 +
* UIowa: Hans Johnson, Joy Matsui
  
<div style="margin: 20px;">
+
==Background==
<div style="width: 27%; float: left; padding-right: 3%;">
+
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.
  
<h3>Objective</h3>
+
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.  
We are developing methods for analyzing diffusion tensor data along fiber tracts. The goal is to be able to make statistical group comparisons with fiber tracts as a common reference frame for comparison.
 
  
 +
If you check  vtkDiffusionTensorMathematics you will find the magic in FixNegativeEigenvaluesMethod
 +
[https://github.com/Slicer/Slicer/blob/master/Libs/vtkTeem/vtkDiffusionTensorMathematics.cxx#L922]
  
 +
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.
  
  
 +
<div style="margin: 20px;">
 +
<div style="width: 27%; float: left; padding-right: 3%;">
 +
 +
<h3>Objective</h3>
 +
 +
Discuss approach and schedule making this change after project week.
  
 
</div>
 
</div>
Line 34: Line 37:
 
<h3>Approach, Plan</h3>
 
<h3>Approach, Plan</h3>
  
Our approach for analyzing diffusion tensors is summarized in the IPMI 2007 reference below.  The main challenge to this approach is <foo>.
+
# Modify the CLI code to expose the alternate analysis processing schemes at runtime rather than at compile time
 
+
# Modify XML to expose option in the Slicer GUI
Our plan for the project week is to first try out <bar>,...
 
  
 
</div>
 
</div>
Line 43: Line 45:
  
 
<h3>Progress</h3>
 
<h3>Progress</h3>
Software for the fiber tracking and statistical analysis along the tracts has been implemented. The statistical methods for diffusion tensors are implemented as ITK code as part of the [[NA-MIC/Projects/Diffusion_Image_Analysis/DTI_Software_and_Algorithm_Infrastructure|DTI Software Infrastructure]] project. The methods have been validated on a repeated scan of a healthy individual. This work has been published as a conference paper (MICCAI 2005) and a journal version (MEDIA 2006). Our recent IPMI 2007 paper includes a nonparametric regression method for analyzing data along a fiber tract.
+
 
 +
Discussions occured, and it was determined that this work is best done after project week.
 +
 
 +
[[File:DWItoDTI_with_PSD_EmailConversation.pdf]] E-mail conversation
  
  
Line 51: Line 56:
 
==Delivery Mechanism==
 
==Delivery Mechanism==
  
This work will be delivered to the NA-MIC Kit as a (please select the appropriate options by noting YES against them below)
+
This work will be delivered to the NA-MIC Kit as an improvement to the existing DWItoDTI module
 
 
#ITK Module
 
#Slicer Module
 
##Built-in
 
##Extension -- commandline
 
##Extension -- loadable
 
#Other (Please specify)
 
  
 
==References==
 
==References==
*Fletcher P, Tao R, Jeong W, Whitaker R. [http://www.na-mic.org/publications/item/view/634 A volumetric approach to quantifying region-to-region white matter connectivity in diffusion tensor MRI.] Inf Process Med Imaging. 2007;20:346-358. PMID: 17633712.
+
* [http://lmi.bwh.harvard.edu/papers/pdfs/2006/niethammerEMBS06.pdf On Diffusion Tensor Estimation]
* Corouge I, Fletcher P, Joshi S, Gouttard S, Gerig G. [http://www.na-mic.org/publications/item/view/292 Fiber tract-oriented statistics for quantitative diffusion tensor MRI analysis.] Med Image Anal. 2006 Oct;10(5):786-98. PMID: 16926104.
 
* Corouge I, Fletcher P, Joshi S, Gilmore J, Gerig G. [http://www.na-mic.org/publications/item/view/1122 Fiber tract-oriented statistics for quantitative diffusion tensor MRI analysis.] Int Conf Med Image Comput Comput Assist Interv. 2005;8(Pt 1):131-9. PMID: 16685838.
 
* Goodlett C, Corouge I, Jomier M, Gerig G, A Quantitative DTI Fiber Tract Analysis Suite, The Insight Journal, vol. ISC/NAMIC/ MICCAI Workshop on Open-Source Software, 2005, Online publication: http://hdl.handle.net/1926/39 .
 

Latest revision as of 13:19, 21 June 2013

Home < 2013 Summer Project Week: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

Background

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.


Objective

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

Progress

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

References