<?xml version="1.0" encoding="utf-8"?>
<executable>
  <category>Segmentation</category>
  <title>BRAINSROIAuto - Foreground masking tool</title>
  <description>This tool uses a combination of otsu thresholding and a closing operations to identify the most prominant foreground region in an image.
  </description>
  <version>2.4.1</version>
  <documentation-url></documentation-url>
  <license>https://www.nitrc.org/svn/brains/BuildScripts/trunk/License.txt </license>
  <contributor>Hans J. Johnson, hans-johnson -at- uiowa.edu, http://wwww.psychiatry.uiowa.edu</contributor>
  <acknowledgements>Hans Johnson(1,3,4); Kent Williams(1); Gregory Harris(1), Vincent Magnotta(1,2,3);  Andriy Fedorov(5), fedorov -at- bwh.harvard.edu (Slicer integration); (1=University of Iowa Department of Psychiatry, 2=University of Iowa Department of Radiology, 3=University of Iowa Department of Biomedical Engineering, 4=University of Iowa Department of Electrical and Computer Engineering, 5=Surgical Planning Lab, Harvard)  </acknowledgements>
  <parameters advanced="false">
    <label>IO</label>
    <description>Input/output parameters</description>
    <image>
      <name>inputVolume</name>
      <longflag>--inputVolume</longflag>
      <label>Input Image Volume</label>
      <description>The input image for finding the largest region filled mask.</description>
      <channel>input</channel>
    </image>
    <image type="label">
      <name>outputROIMaskVolume</name>
      <longflag>--outputROIMaskVolume</longflag>
      <label>Output Mask</label>
      <description>The ROI automatically found from the input image.</description>
      <channel>output</channel>
    </image>
    <image>
      <name>outputClippedVolumeROI</name>
      <longflag>--outputClippedVolumeROI</longflag>
      <label>Output Image Clipped by ROI</label>
      <description>The inputVolume clipped to the region of the brain mask.</description>
      <channel>output</channel>
    </image>
  </parameters>

  <parameters advanced="false">
    <label>Configuration Parameters</label>

    <double>
      <name>otsuPercentileThreshold</name>
      <longflag>--otsuPercentileThreshold</longflag>
      <label>Otsu Percentile Threshold</label>
      <description>Parameter to the Otsu threshold algorithm.</description>
      <default>0.01</default>
    </double>

    <double>
      <name>thresholdCorrectionFactor</name>
      <longflag>--thresholdCorrectionFactor</longflag>
      <label>Otsu Percentile Threshold</label>
      <description>A factor to scale the Otsu algorithm's result threshold, in case clipping mangles the image.</description>
      <default>1.0</default>
    </double>

    <integer>
      <name>closingSize</name>
      <longflag>--closingSize</longflag>
      <label>Closing Size</label>
      <description>The Closing Size for largest connected filled mask.</description>
      <default>7</default>
    </integer>

    <string-enumeration>
      <name>outputVolumePixelType</name>
      <longflag>--outputVolumePixelType</longflag>
      <label>Output Image Pixel Type</label>
      <description>The output image Pixel Type is the scalar datatype for representation of the Output Volume.</description>
      <default>short</default>
      <element>float</element>
      <element>short</element>
      <element>ushort</element>
      <element>int</element>
      <element>uint</element>
      <element>uchar</element>
    </string-enumeration>
  </parameters>
</executable>
