<?xml version="1.0" encoding="utf-8"?>
<executable>
  <category>
  Diffusion
  </category>
  <title>
  Diffusion Tensor Estimation
  </title>
  <description>
  Performs a tensor model estimation from diffusion weighted images. \n\nThere are three estimation methods available: least squares, weigthed least squares and non-linear estimation. The first method is the traditional method for tensor estimation and the fastest one. Weighted least squares takes into account the noise characteristics of the MRI images to weight the DWI samples used in the estimation based on its intensity magnitude. The last method is the more complex.
  </description>
  <version>0.1.0.$Revision: 1892 $(alpha)</version>
  <documentation-url></documentation-url>
  <license></license>
  <contributor>Raul San Jose</contributor>
  <acknowledgements>This command module is based on the estimation capabilities of teem</acknowledgements>

  <parameters>
    <label>IO</label>
    <description>Input/output parameters</description>
    <image type="diffusion-weighted">
      <name>inputVolume</name>
      <label>Input DWI Volume</label>
      <channel>input</channel>
      <index>0</index>
      <description>Input DWI volume</description>
    </image>
    <image type="tensor">
      <name>outputTensor</name>
      <label>Output DTI Volume</label>
      <channel>output</channel>
      <index>1</index>
      <description>Estimated DTI volume</description>
    </image>
    <image type ="scalar">
      <name>outputBaseline</name>
      <label>Output Baseline Volume</label>
      <channel>output</channel>
      <index>2</index>
      <description>Estimated baseline volume</description>
    </image>
    <image type ="label">
      <name>thresholdMask</name>
      <label>Otsu Threshold Mask</label>
      <channel>output</channel>
      <index>3</index>
      <description>Otsu Threshold Mask</description>
    </image> 
  </parameters>
  <parameters>
    <label>Estimation Parameters</label>
    <description> Parameters for the estimation algorithm</description>
    <string-enumeration>
      <name>estimationMethod</name>
      <flag>e</flag>
      <longflag>enumeration</longflag>
      <description>LS: Least Squares, WLS: Weighted Least Squares; NL: Nonlinear  Control the accuracy of the tensor estimation (at the expense of computation time)</description>
      <label>Estimation Parameters</label>
      <default>LS</default>
      <element>LS</element>
      <element>WLS</element>
      <element>NL</element>
    </string-enumeration>
    <boolean>
      <name>ShiftNegativeEigenvalues</name>
      <longflag>shiftNeg</longflag>
      <description>Shift eigenvalues so all are positive (accounts for bad tensors related to noise or acquisition error)</description>
      <label>Shift Negative Eigenvalues</label>
      <default>false</default>
    </boolean>
    <double>
      <name>otsuOmegaThreshold</name>
      <label>Otsu Omega Threshold Parameter</label>
      <flag>o</flag>
      <longflag>otsuomegathreshold</longflag>
      <description>Control the sharpness of the threshold in the Otsu computation. 0: lower threshold, 1: higher threhold</description>
      <default>0.5</default>
      <constraints>
      	<minimum>0.0</minimum>
	<maximum>1.0</maximum>
	<step>0.1</step>
      </constraints>
    </double>
    <boolean>
     <name>removeIslands</name>
     <label>Remove Islands in Threshold Mask</label>
     <longflag>--removeislands</longflag>
     <description>Remove Islands in Threshold Mask?</description>
     <default>true</default>
    </boolean>
    <boolean>
     <name>applyMask</name>
     <label>Apply Mask to Tensor Image</label>
     <longflag>--applymask</longflag>
     <description>Apply Threshold Mask to Tensor?</description>
     <default>true</default>
    </boolean>
  </parameters>
</executable>
