Difference between revisions of "Documentation/Nightly/Modules/UKFTractography"

From Slicer Wiki
Jump to: navigation, search
(Prepend documentation/versioncheck template. See http://na-mic.org/Mantis/view.php?id=2887)
(Updated documentation to match newest UI update.)
Line 33: Line 33:
 
Authors: Yogesh Rathi (yogesh@bwh.harvard.edu), Stefan Lienhard, Yinpeng Li, Martin
 
Authors: Yogesh Rathi (yogesh@bwh.harvard.edu), Stefan Lienhard, Yinpeng Li, Martin
 
Styner, Ipek Oguz, Yundi Shi, Christian Baumgartner (c.f.baumgartner@gmail.com),
 
Styner, Ipek Oguz, Yundi Shi, Christian Baumgartner (c.f.baumgartner@gmail.com),
Ryan Eckbo
+
Ryan Eckbo, Lauren O'Donnell, Jessica Lee
  
 
<!--
 
<!--
Line 52: Line 52:
 
* 2-Tensor tractography
 
* 2-Tensor tractography
 
* 2-Tensor tractography with free water
 
* 2-Tensor tractography with free water
 +
* Neurite orientation dispersion and density imaging (NODDI)
  
  
Line 70: Line 71:
 
Input/Output (IO)
 
Input/Output (IO)
  
--dwiFile <std::string> Input DWI Image
+
--dwiFile <std::string> Input diffusion weighted (DWI) volume
  
 
--seedsFile <std::string> Seeds for diffusion. If not specified, full brain tractography will be performed, and the algorithm will start from every voxel in the brain mask where the Generalized Anisotropy is bigger than 0.18
 
--seedsFile <std::string> Seeds for diffusion. If not specified, full brain tractography will be performed, and the algorithm will start from every voxel in the brain mask where the Generalized Anisotropy is bigger than 0.18
  
--labels <std::vector<int>> A vector of the ROI labels to be used (default: 1)
+
--labels <std::vector<int>> A vector of the ROI labels to be used. These are the voxel values where tractography should be seeded. (default: 1)
  
--maskFile <std::string> Mask for diffusion tractography
+
--maskFile <std::string> Brain mask for diffusion tractography. Tracking will only be performed inside this mask.
  
--tracts <std::string> Tracts generated, with first tensor output
+
--tracts <std::string> Output fiber tracts generated with one tensor.
  
--tractsWithSecondTensor <std::string> Tracts generated with second tensor output (if there is one)
 
  
  
 +
Tractography Options
  
Seeding Options
+
--seedsPerVoxel <int>    Tractography parameter used in all models: number of seeds per voxel.  Each seed generates a fiber, thus using more seeds generates more fibers. In general use 1 or 2 seeds, and for a more thorough result use 5 or 10 (depending on your machine this may take up to 2 days to run). Default: 1. Range: 0-50. (default: 1)
  
--seedsPerVoxel <int> Number of seeds per voxel (default: 1)
+
--seedFALimit<double> Tractography parameter used in all models. Seed points whose fractional anisotropy (FA) are below this value are excluded. Default: 0.18. Range: 0-1.
  
--seedFALimit<double> Seed points whose FA are below this value are excluded (default: 0.15)
+
--minFA <double> Tractography parameter used in tensor model. Tractography will stop when the fractional anisotropy (FA) of the tensor being tracked is less than this value. Note: make sure to also decrease the GA to track through lower anisotropy areas. This parameter is used only in tensor models. Default: 0.15. Range: 0-1.
  
 +
--minGA <double> Tractography parameter used in all models. Tractography will stop when the generalized anisotropy (GA) is less than this value. GA is a normalized variance of the input signals (so it does not depend on any model). Note: to extend tracking through low anisotropy areas, this parameter is often more effective than the minFA. This parameter is used by both tensor and NODDI models. Default: 0.1. Range: 0-1.
  
Model Options
+
--numThreads <int> Tractography parameter used in all models. Number of threads used during computation. Set to the number of cores on your workstation for optimal speed. If left undefined, the number of cores detected will be used.
  
--numTensor <1|2|3> Number of tensors used (default: 2)
+
--numTensor <1|2|3> Number of tensors (tensor model) or orientations (NODDI model) used. (default: 2)
  
--fullTensorModel Whether to use the full tensor model. Which models all three eigenvalues seperately, as opposed to lambda2=lambda3.
+
--stepLength <double> Tractography parameter used in all models. Step size when conducting tractography (in mm). Default: 0.3. Range: 0.1-1.
  
--freeWater Adds a term for free water difusion to the model. If checked, the 1T simple model is forced.
+
--Qm <double> Rate of change of tensor direction/orientation. UKF data fitting parameter for tensor or NODDI model: Process noise for angles/direction. Defaults: Noddi-0.001; Single tensor-0.005; other-0.001. Suggested Range: 0.00001 - 0.25. Default of 0.0 indicates the program will assign value based on other model parameters.
  
 +
--recordLength <double>    Tractography parameter used in all models. Step size between points saved along fibers. Default: 0.9. Range: 0.1-4.
  
Stopping Criteria
+
--maxHalfFiberLength <double> Tractography parameter used in all models. The max length limit of the half fibers generated during tractography. A fiber is "half" when the tractography goes in only one direction from one seed point at a time. Default: 250 mm. Range: 1-500 mm.
  
--minFA <double> Abort the tractography when the Fractional Anisotropy is less than this value (default: 0.15)
+
--recordNMSE Record output from data fitting: Store normalized mean square error (NMSE) along fibers.  
  
--minGA <double> Abort the tractography when the Generalized Anisotropy is less than this value (default: 0.1)
 
  
 +
Tensor Model
  
Fiber Scalar Fields
+
--freeWater Adds a term for free water diffusion to the model. The free water model is a tensor with all 3 eigenvalues equal to the diffusivity of free water (0.003). To output the free water fraction, make sure to use the "save free water" parameter.
  
--recordFA Whether to store FA. Attaches field 'FA', and 'FA2' for 2-tensor case to fiber.
+
--recordFA Record output from tensor model: Save fractional anisotropy (FA) of the tensor(s). Attaches field 'FA' or 'FA1' and 'FA2' for 2-tensor case to fiber.
  
--recordNMSE Whether to store NMSE. Attaches field 'NMSE' to fiber.
+
--recordTrace Record output from tensor model: Save the trace of the tensor(s). Attaches field 'Trace' or 'Trace1' and 'Trace2' for 2-tensor case to fiber.
  
--recordTrace Whether to store Trace. Attaches field 'Trace', and 'Trace2' for 2-tensor case to fiber.
+
--recordFreeWater Record output from tensor plus free water model: Save the fraction of free water. Attaches field 'FreeWater' to fiber.
  
--recordFreeWater Whether to store the fraction of free water. Attaches field 'FreeWater' to fiber.
+
--recordTensors Record output from tensor model: Save the tensors that were computed during tractography (if using tensor model). The fields will be called 'TensorN', where N is the tensor number. Recording the tensors enables Slicer to color the fiber bundles by FA, orientation, and so on. Recording the tensors also enables quantitative analyses.
  
--recordState Whether to attach the states to the fiber. Will generate field 'state'.
+
--Ql <double> UKF data fitting parameter for tensor model: rate of change of eigenvalues. Defaults: 1 tensor-300 ; 2 tensor-50 ; 3 tensor-100. Suggested Range: 1-1000. Default of 0.0 indicates the program will assign value based on other model parameters.
  
--recordCovariance Whether to store the covariance. Will generate field 'covariance' in fiber.
+
--Qw <double> UKF data fitting parameter for tensor plus free water model: Process noise for free water weights, ignored if no free water estimation. Defaults: 1 tensor-0.0025; 2 tensor-0.0015. Suggested Range: 0.00001-0.25. Default of 0.0 indicates the program will assign value based on other model parameters.
  
--recordTensors Recording the tensors enables Slicer to color the fiber bundles by FA, orientation, and so on. The fields will be called 'TensorN', where N is the tensor number.
 
  
 +
NODDI Model:
  
Advanced Options
+
--noddi    Use neurite orientation dispersion and density imaging (NODDI) model instead of tensor model.
  
--numThreads <int> Number of threads used during compuation. Set to the number of cores on your workstation for optimal speed. If left undefined boost will figure out the number of cores, and hence threads, during runtime.
+
--recordVic  Save NODDI volume fraction of intra-cellular compartment along fibers.  
  
--normalizedDWIData Whether the DWI input data is already normalized
+
--recordKappa    Save NODDI concentration parameter that measures the extent of orientation dispersion.
  
--weightsOnTensors <std::vector<double>> Weights on different tensors when using multiple tensors. There must be one weight for each tensor, and the weights must sum up to 1. Defaults to equally weighted.
+
--recordViso    Save NODDI volume traction of CSF compartment along fibers.
  
--maxHalfFiberLength <double> The max length limit of the half fibers generated during tractography. Here the fiber is "half" because the tractography goes in only one direction from one seed point at a time (default: 10000)
+
--Qkappa <double>     UKF data fitting parameter for NODDI model: Rate of change of kappa value. Higher kappa values indicate more fiber dispersion. Default: 0.01.
  
--Qm <double> Process noise for angles/direction (Will be set during runtime to the optimal value for the chosen model, unless overriden by user).
+
--Qvic  <double>   UKF data fitting parameter for NODDI model: Rate of change of volume fraction of intracellular component. Default: 0.004
  
--Ql <double> Process noise for eigenvalues (Will be set during runtime to the optimal value for the chosen model, unless overriden by user).
 
  
--Qw <double> Process noise for free water weights, ignored if no free water estimation (Will be set during runtime to the optimal value for the chosen model, unless overriden by user).
+
Signal Parameters (Expert Only)
  
--Rs <double> Measurement noise (Will be set during runtime to the optimal value for the chosen model, unless overriden by user).
+
--Rs <double>   Expected noise in signal. This is used by the UKF method to decide how much to trust the data. This should be increased for very noisy data or reduced for high quality data. Defaults: single tensor/orientation-0.01; other-0.02. Suggested Range: 0.001-0.25. Default of 0.0 indicates the program will assign value based on other model parameters.
  
--stepLength <double> Step length i.e. size of the step taken in the most consistent direction during each iteration of tractography given in millimeters (Will be set during runtime to the optimal value for the chosen model, unless overriden by user).
 
  
--maxBranchingAngle <double> Maximum branching angle, in degrees. When using multiple tensors, a new branch will be created when the tensors' major directions form an angle between
+
Debug/Develop Only
(minBranchingAngle, maxBranchingAngle). Branching is supressed when this maxBranchingAngle is set to 0.0
 
  
--minBranchingAngle <double> Minimum branching angle, in degrees. When using multiple tensors, a new branch will be created when the tensors' major directions form an angle between (minBranchingAngle, maxBranchingAngle)
+
--sigmaSignal <double>   igma for Gaussian kernel used to interpolate the signal at sub-voxel locations. Default: 0.0
  
 +
--recordState    Store the states along the fiber. Will generate field 'state'. The state is the model for UKF. In the case of the two tensor model, it is a ten-parameter vector.
  
Additional Output Options
+
--recordCovariance    Store the covariance matrix along the fiber. Will generate field 'covariance' in fiber. This is the covariance from the unscented Kalman filter.
  
--noTransformPosition Don't transform Points back from ijk->RAS when writing the output fiber
+
--fullTensorModel Use the full tensor model instead of the default model. The default model has both smaller eigenvalues equal, whereas the full model allows 3 different eigenvalues.
  
--branchesOnly Only output branches, ignore the primary tracts
+
--maxBranchingAngle <double> Maximum branching angle, in degrees. When using multiple tensors, a new branch will be created when the tensors' major directions form an angle between (minBranchingAngle, maxBranchingAngle). Branching is supressed when this maxBranchingAngle is set to 0.0. Default: 0.0. Range: 0-90.
 +
 
 +
--minBranchingAngle <double> Minimum branching angle, in degrees. When using multiple tensors, a new branch will be created when the tensors' major directions form an angle between (minBranchingAngle, maxBranchingAngle). Default: 0. Range: 0-90.
 +
 
 +
--tractsWithSecondTensor <double>    Tracts generated, with second tensor output (if there is one)
  
 
--storeGlyphs Store tensors' main directions as two-point lines in a separate file named glyphs_{tracts}. When using multiple tensors, only the major tensors' main directions are stored
 
--storeGlyphs Store tensors' main directions as two-point lines in a separate file named glyphs_{tracts}. When using multiple tensors, only the major tensors' main directions are stored
 
--outputNormalizedDWIData Whether to output the DWI after normalization (i.e. preprocessing)
 
  
  
Tractography unrelated options
+
Tractography Command Line Options
  
 
--returnparameterfile <std::string> Filename in which to write simple return parameters (int, float, int-vector, etc.) as opposed to bulk return parameters (image, geometry, transform, measurement, table).
 
--returnparameterfile <std::string> Filename in which to write simple return parameters (int, float, int-vector, etc.) as opposed to bulk return parameters (image, geometry, transform, measurement, table).

Revision as of 20:00, 30 July 2015

Home < Documentation < Nightly < Modules < UKFTractography


For the latest Slicer documentation, visit the read-the-docs.


Introduction and Acknowledgements

This work is part of the National Alliance for Medical Image Computing (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on NA-MIC can be obtained from the NA-MIC website.
Author: Yogesh Rathi, Ph.D, Psychiatry Neuroimaging Laboratory, Brigham & Women's Hospital

Contact: Ryan Eckbo, <email>reckbo@bwh.harvard.edu</email>

Isomics, Inc. <- Replace this logo with yours  
Surgical Planning Laboratory (SPL) <-Replace this logo with yours  

Module Description

We present a framework which uses an unscented Kalman filter for performing tractography. At each point on the fiber the most consistent direction is found as a mixture of previous estimates and of the local model.

It is very easy to expand the framework and to implement new fiber representations for it. Currently it is possible to tract fibers using two different 1-, 2-, or 3-tensor methods. Both methods use a mixture of Gaussian tensors. One limits the diffusion ellipsoids to a cylindrical shape (the second and third eigenvalue are assumed to be identical) and the other one uses a full tensor representation.

Authors: Yogesh Rathi (yogesh@bwh.harvard.edu), Stefan Lienhard, Yinpeng Li, Martin Styner, Ipek Oguz, Yundi Shi, Christian Baumgartner (c.f.baumgartner@gmail.com), Ryan Eckbo, Lauren O'Donnell, Jessica Lee



Use Cases

  • 1-Tensor tractography
  • 1-Tensor tractography with free water
  • 2-Tensor tractography
  • 2-Tensor tractography with free water
  • Neurite orientation dispersion and density imaging (NODDI)




Tutorials

N/A



Panels and their use

Input/Output (IO)

--dwiFile <std::string> Input diffusion weighted (DWI) volume

--seedsFile <std::string> Seeds for diffusion. If not specified, full brain tractography will be performed, and the algorithm will start from every voxel in the brain mask where the Generalized Anisotropy is bigger than 0.18

--labels <std::vector<int>> A vector of the ROI labels to be used. These are the voxel values where tractography should be seeded. (default: 1)

--maskFile <std::string> Brain mask for diffusion tractography. Tracking will only be performed inside this mask.

--tracts <std::string> Output fiber tracts generated with one tensor.


Tractography Options

--seedsPerVoxel <int> Tractography parameter used in all models: number of seeds per voxel. Each seed generates a fiber, thus using more seeds generates more fibers. In general use 1 or 2 seeds, and for a more thorough result use 5 or 10 (depending on your machine this may take up to 2 days to run). Default: 1. Range: 0-50. (default: 1)

--seedFALimit<double> Tractography parameter used in all models. Seed points whose fractional anisotropy (FA) are below this value are excluded. Default: 0.18. Range: 0-1.

--minFA <double> Tractography parameter used in tensor model. Tractography will stop when the fractional anisotropy (FA) of the tensor being tracked is less than this value. Note: make sure to also decrease the GA to track through lower anisotropy areas. This parameter is used only in tensor models. Default: 0.15. Range: 0-1.

--minGA <double> Tractography parameter used in all models. Tractography will stop when the generalized anisotropy (GA) is less than this value. GA is a normalized variance of the input signals (so it does not depend on any model). Note: to extend tracking through low anisotropy areas, this parameter is often more effective than the minFA. This parameter is used by both tensor and NODDI models. Default: 0.1. Range: 0-1.

--numThreads <int> Tractography parameter used in all models. Number of threads used during computation. Set to the number of cores on your workstation for optimal speed. If left undefined, the number of cores detected will be used.

--numTensor <1|2|3> Number of tensors (tensor model) or orientations (NODDI model) used. (default: 2)

--stepLength <double> Tractography parameter used in all models. Step size when conducting tractography (in mm). Default: 0.3. Range: 0.1-1.

--Qm <double> Rate of change of tensor direction/orientation. UKF data fitting parameter for tensor or NODDI model: Process noise for angles/direction. Defaults: Noddi-0.001; Single tensor-0.005; other-0.001. Suggested Range: 0.00001 - 0.25. Default of 0.0 indicates the program will assign value based on other model parameters.

--recordLength <double> Tractography parameter used in all models. Step size between points saved along fibers. Default: 0.9. Range: 0.1-4.

--maxHalfFiberLength <double> Tractography parameter used in all models. The max length limit of the half fibers generated during tractography. A fiber is "half" when the tractography goes in only one direction from one seed point at a time. Default: 250 mm. Range: 1-500 mm.

--recordNMSE Record output from data fitting: Store normalized mean square error (NMSE) along fibers.


Tensor Model

--freeWater Adds a term for free water diffusion to the model. The free water model is a tensor with all 3 eigenvalues equal to the diffusivity of free water (0.003). To output the free water fraction, make sure to use the "save free water" parameter.

--recordFA Record output from tensor model: Save fractional anisotropy (FA) of the tensor(s). Attaches field 'FA' or 'FA1' and 'FA2' for 2-tensor case to fiber.

--recordTrace Record output from tensor model: Save the trace of the tensor(s). Attaches field 'Trace' or 'Trace1' and 'Trace2' for 2-tensor case to fiber.

--recordFreeWater Record output from tensor plus free water model: Save the fraction of free water. Attaches field 'FreeWater' to fiber.

--recordTensors Record output from tensor model: Save the tensors that were computed during tractography (if using tensor model). The fields will be called 'TensorN', where N is the tensor number. Recording the tensors enables Slicer to color the fiber bundles by FA, orientation, and so on. Recording the tensors also enables quantitative analyses.

--Ql <double> UKF data fitting parameter for tensor model: rate of change of eigenvalues. Defaults: 1 tensor-300 ; 2 tensor-50 ; 3 tensor-100. Suggested Range: 1-1000. Default of 0.0 indicates the program will assign value based on other model parameters.

--Qw <double> UKF data fitting parameter for tensor plus free water model: Process noise for free water weights, ignored if no free water estimation. Defaults: 1 tensor-0.0025; 2 tensor-0.0015. Suggested Range: 0.00001-0.25. Default of 0.0 indicates the program will assign value based on other model parameters.


NODDI Model:

--noddi Use neurite orientation dispersion and density imaging (NODDI) model instead of tensor model.

--recordVic Save NODDI volume fraction of intra-cellular compartment along fibers.

--recordKappa Save NODDI concentration parameter that measures the extent of orientation dispersion.

--recordViso Save NODDI volume traction of CSF compartment along fibers.

--Qkappa <double> UKF data fitting parameter for NODDI model: Rate of change of kappa value. Higher kappa values indicate more fiber dispersion. Default: 0.01.

--Qvic <double> UKF data fitting parameter for NODDI model: Rate of change of volume fraction of intracellular component. Default: 0.004


Signal Parameters (Expert Only)

--Rs <double> Expected noise in signal. This is used by the UKF method to decide how much to trust the data. This should be increased for very noisy data or reduced for high quality data. Defaults: single tensor/orientation-0.01; other-0.02. Suggested Range: 0.001-0.25. Default of 0.0 indicates the program will assign value based on other model parameters.


Debug/Develop Only

--sigmaSignal <double> igma for Gaussian kernel used to interpolate the signal at sub-voxel locations. Default: 0.0

--recordState Store the states along the fiber. Will generate field 'state'. The state is the model for UKF. In the case of the two tensor model, it is a ten-parameter vector.

--recordCovariance Store the covariance matrix along the fiber. Will generate field 'covariance' in fiber. This is the covariance from the unscented Kalman filter.

--fullTensorModel Use the full tensor model instead of the default model. The default model has both smaller eigenvalues equal, whereas the full model allows 3 different eigenvalues.

--maxBranchingAngle <double> Maximum branching angle, in degrees. When using multiple tensors, a new branch will be created when the tensors' major directions form an angle between (minBranchingAngle, maxBranchingAngle). Branching is supressed when this maxBranchingAngle is set to 0.0. Default: 0.0. Range: 0-90.

--minBranchingAngle <double> Minimum branching angle, in degrees. When using multiple tensors, a new branch will be created when the tensors' major directions form an angle between (minBranchingAngle, maxBranchingAngle). Default: 0. Range: 0-90.

--tractsWithSecondTensor <double> Tracts generated, with second tensor output (if there is one)

--storeGlyphs Store tensors' main directions as two-point lines in a separate file named glyphs_{tracts}. When using multiple tensors, only the major tensors' main directions are stored


Tractography Command Line Options

--returnparameterfile <std::string> Filename in which to write simple return parameters (int, float, int-vector, etc.) as opposed to bulk return parameters (image, geometry, transform, measurement, table).

--processinformationaddress <std::string> Address of a structure to store process information (progress, abort, etc.). (default: 0)

--xml Produce xml description of command line arguments.

--echo Echo the command line arguments.

--, --ignore_rest Ignores the rest of the labeled arguments following this flag.

--version Displays version information and exits.

-h, --help Displays usage information and exits.




Similar Modules

N/A



References

Reference for 2-tensor tractography:

Reference for 1-tensor and 2-tensor + free-water:

  • C. Baumgartner, O. Michailovich, O. Pasternak, S. Bouix, J. Levitt, ME Shenton, C-F Westin, Y. Rathi,

"A unified tractography framework for comparing diffusion models on clinical scans": in Workshop on computational diffusion MRI, 2012.




Information for Developers