diff imagej2_adjust_threshold_binary.xml @ 0:91d82f24657a draft

planemo upload commit 18df9e67efd4adafcde4eb9b62cd815e4afe9733-dirty
author iuc
date Wed, 26 Aug 2015 14:37:25 -0400
parents
children 8f7beef4f1f3
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/imagej2_adjust_threshold_binary.xml	Wed Aug 26 14:37:25 2015 -0400
@@ -0,0 +1,117 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<tool id="imagej2_adjust_threshold_binary" name="Adjust threshold" version="@WRAPPER_VERSION@.0">
+    <description>of binary image with ImageJ2</description>
+    <macros>
+        <import>imagej2_macros.xml</import>
+    </macros>
+    <expand macro="fiji_requirements" />
+    <command>
+<![CDATA[
+    python $__tool_directory__/imagej2_adjust_threshold_binary.py
+    --input "$input"
+    --input_datatype $input.ext
+    --threshold_min $threshold_min
+    --threshold_max $threshold_max
+    --method $method
+    --display $display
+    --black_background $black_background
+    --stack_histogram $stack_histogram
+    --jython_script $__tool_directory__/jython_script.py
+    --output_datatype $output.ext
+    --output "$output"
+]]>
+    </command>
+    <inputs>
+        <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="input" type="data" label="Select image"/>
+        <param name="threshold_min" type="float" value="0" min="0" max="255" label="Minimum threshold value" />
+        <param name="threshold_max" type="float" value="0" min="0" max="255" label="Maximum threshold value" />
+        <param name="method" type="select" label="Method" help="The Default method is the modified IsoData algorithm.">
+            <option value="Default" selected="True">Default</option>
+            <option value="Huang">Huang</option>
+            <option value="Intermodes">Intermodes</option>
+            <option value="IsoData">IsoData</option>
+            <option value="IJ_IsoData">IJ_IsoData</option>
+            <option value="Li">Li</option>
+            <option value="MaxEntropy">MaxEntropy</option>
+            <option value="Mean">Mean</option>
+            <option value="MinError">MinError</option>
+            <option value="Minimum">Minimum</option>
+            <option value="Moments">Moments</option>
+            <option value="Otsu">Otsu</option>
+            <option value="RenyiEntropy">RenyiEntropy</option>
+            <option value="Shanbhag">Shanbhag</option>
+            <option value="Triangle">Triangle</option>
+            <option value="Yen">Yen</option>
+        </param>
+        <param name="display" type="select" label="Display">
+            <option value="red" selected="True">Red</option>
+            <option value="bw">Black and White</option>
+            <option value="over_under">Over/Under</option>
+        </param>
+        <param name="black_background" type="select" label="Black background" help="Select yes if features are lighter than the background.">
+            <option value="no" selected="True">No</option>
+            <option value="yes">Yes</option>
+        </param>
+        <param name="stack_histogram" type="select" label="Stack histogram" help="Select yes to first compute the histogram of the whole stack (or hyperstack) and then compute the threshold based on that histogram.">
+            <option value="no" selected="True">No</option>
+            <option value="yes">Yes</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="output" format_source="input" label="${tool.name} on ${on_string}"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="blobs.gif" />
+            <param name="output_datatype" value="gif" />
+            <param name="threshold_min" value="0.0" />
+            <param name="threshold_max" value="129.0" />
+            <param name="method" value="Default" />
+            <param name="display" value="red" />
+            <param name="black_background" value="no" />
+            <param name="stack_histogram" value="no" />
+            <output name="output" file="blobs_threshold_default.gif" compare="sim_size" />
+        </test>
+        <test>
+            <param name="input" value="blobs.gif" />
+            <param name="output_datatype" value="gif" />
+            <param name="threshold_min" value="118.0" />
+            <param name="threshold_max" value="255.0" />
+            <param name="method" value="IJ_IsoData" />
+            <param name="display" value="over_under" />
+            <param name="black_background" value="no" />
+            <param name="stack_histogram" value="no" />
+            <output name="output" file="blobs_threshold_ijiso.gif" compare="sim_size" />
+        </test>
+        <test>
+            <param name="input" value="blobs.gif" />
+            <param name="output_datatype" value="gif" />
+            <param name="threshold_min" value="72.0" />
+            <param name="threshold_max" value="255.0" />
+            <param name="method" value="Huang" />
+            <param name="display" value="bw" />
+            <param name="black_background" value="yes" />
+            <param name="stack_histogram" value="no" />
+            <output name="output" file="blobs_threshold_huang_dark.gif" compare="sim_size" />
+        </test>
+    </tests>
+    <help>
+
+@requires_binary_input@
+
+**What it does**
+
+<![CDATA[
+Sets lower and upper threshold values, segmenting grayscale images into features of interest and background
+
+- **Minimum threshold value** - Adjusts the minimum threshold value.
+- **Maximum threshold value** - Adjusts the maximum threshold value.
+- **Method** - Allows any of the 16 different automatic thresholding methods to be selected.  These are global thresholding methods that typically cannot deal with unevenly illuminated images (such as in brightfield microscopy)."
+- **Display** - Selects one of three display mode:  **Red** displays the thresholded values in red, **Black and White** features are displayed in black and background in white, **Over/Under** displays pixels below the lower threshold value in blue, thresholded pixels in grayscale, and pixels above the upper threshold value in green.
+- **Black background** - Select **yes** when features are lighter than the background.
+- **Stack histogram**  Select **yes** to first compute the histogram of the whole stack (or hyperstack) and then compute the threshold based on that histogram.  As such, all slices are binarized using the single computed value. If unchecked, the threshold of each slice is computed separately.
+]]>
+
+    </help>
+    <expand macro="fiji_headless_citations" />
+</tool>