diff imagej2_find_maxima.xml @ 0:29b39f5b0e69 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2 commit b08f0e6d1546caaf627b21f8c94044285d5d5b9c-dirty"
author imgteam
date Tue, 17 Sep 2019 17:01:44 -0400
parents
children e2622ebb5ce4
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/imagej2_find_maxima.xml	Tue Sep 17 17:01:44 2019 -0400
@@ -0,0 +1,136 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<tool id="imagej2_find_maxima" name="Find maxima" version="@WRAPPER_VERSION@.0">
+    <description></description>
+    <macros>
+        <import>imagej2_macros.xml</import>
+    </macros>
+    <expand macro="fiji_requirements" />
+    <command>
+<![CDATA[
+    python $__tool_directory__/imagej2_find_maxima.py
+    --input "$input"
+    --input_datatype $input.ext
+    --scale_when_converting $scale_when_converting
+    --weighted_rgb_conversions $weighted_rgb_conversions
+    --noise_tolerance $noise_tolerance
+    --output_type $output_type
+    --exclude_edge_maxima $exclude_edge_maxima
+    --light_background $light_background
+    --jython_script $__tool_directory__/imagej2_find_maxima_jython_script.py
+    #if str( $output_type ) == "List" or str( $output_type ) == "Count":
+        --output "$results"
+        --output_datatype "tabular"
+    #else:
+        --output "$output"
+        --output_datatype $output.ext
+    #end if
+]]>
+    </command>
+    <inputs>
+        <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="input" type="data" label="Select image"/>
+        <param name="noise_tolerance" type="integer" value="10" min="0" label="Noise tolerance" help="Maxima are ignored if they do not stand out from the surroundings by more than this value."/>
+        <param name="output_type" type="select" label="Output type">
+            <option value="Single_Points" selected="True">Single Points</option>
+            <option value="Maxima_Within_Tolerance">Maxima Within Tolerance</option>
+            <option value="Segmented_Particles">Segmented Particles</option>
+            <!--
+            This version of Fiji does not produce the same resultsTable
+            as the previous version, so eliminating these options until
+            there is time to investigate
+            <option value="List">List</option>
+            <option value="Count">Count</option>
+            -->
+        </param>
+        <param name="exclude_edge_maxima" type="select" label="Exclude edge maxima?">
+            <option value="no" selected="True">No</option>
+            <option value="yes">Yes</option>
+        </param>
+        <param name="light_background" type="select" label="Light background?">
+            <option value="no" selected="True">No</option>
+            <option value="yes">Yes</option>
+        </param>
+        <param name="scale_when_converting" type="select" label="Scale when converting?" help="Applies only to 24-bit (RGB) images, ignored for other types.">
+            <option value="yes" selected="True">Yes</option>
+            <option value="no">No</option>
+        </param>
+        <param name="weighted_rgb_conversions" type="select" label="Weighted RGB conversions?" help="Applies only to 24-bit (RGB) images, ignored for other types.">
+            <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}: ${output_type}">
+            <filter>output_type != "List" and output_type != "Count"</filter>
+        </data>
+        <data name="results" format="tabular" label="${tool.name} on ${on_string}: ${output_type}">
+            <filter>output_type == "List" or output_type == "Count"</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="blobs.gif" />
+            <output name="output" file="blobs_single_points.gif" compare="sim_size" />
+        </test>
+        <test>
+            <param name="input" value="blobs.gif" />
+            <param name="noise_tolerance" value="13" />
+            <param name="output_type" value="Maxima_Within_Tolerance" />
+            <output name="output" file="blobs_tolerance.gif" compare="sim_size" />
+        </test>
+        <test>
+            <param name="input" value="blobs.gif" />
+            <param name="noise_tolerance" value="16" />
+            <param name="output_type" value="Segmented_Particles" />
+            <param name="exclude_edge_maxima" value="yes" />
+            <output name="output" file="blobs_segmented.gif" compare="sim_size" />
+        </test>
+        <!--
+        This version of Fiji does not produce the same resultsTable
+        as the previous version, so eliminating these options until
+        there is time to investigate
+        <test>
+            <param name="input" value="blobs.gif" />
+            <param name="output_type" value="List" />
+            <output name="output" file="blobs_list.tabular" />
+        </test>
+        <test>
+            <param name="input" value="blobs.gif" />
+            <param name="output_type" value="Count" />
+            <output name="output" file="blobs_count.tabular" />
+        </test>
+        -->
+    </tests>
+    <help>
+
+**What it does**
+
+Determines the local maxima in an image and creates a binary (mask-like) image of the same size with the
+maxima (or one segmented particle per maximum) marked.  For RGB images, maxima of luminance are selected
+with the luminance defined as the weighted or unweighted average of the colors depending on the **Scale
+when converting** and **Weighted RGB conversions** settings.
+
+- **Scale when converting** (RGB images only) - If "yes", the tool will scale from min--max to 0--255 when converting from 16-bit or 32-bit to 8-bit or to scale from min--max to 0--65535 when converting from 32-bit to 16-bit.
+
+- **Weighted RGB conversions** (RGB images only) - If "yes", the formula gray = 0.299 × red + 0.587 × green + 0.114 × blue is used to convert RGB images to grayscale.  If "no", the formula gray = (red + green + blue) ⁄ 3 is used.
+
+- **Noise Tolerance** - Maxima are ignored if they do not stand out from the surroundings by more than this value (calibrated units for calibrated images). In other words, a threshold is set at the maximum value minus noise tolerance and the contiguous area around the maximum above the threshold is analyzed. For accepting a maximum, this area must not contain any point with a value higher than the maximum. Only one maximum within this area is accepted.
+
+- **Output Type** can be:
+
+ - **Single Points** - Produces an image with one single point per maximum.
+
+ - **Maxima Within Tolerance** - Produces an image with all points within the "Noise Tolerance" for each maximum.
+
+ - **Segmented Particles** - Assumes that each maximum belongs to a particle and segments the image by a watershed algorithm applied to the values of the image.
+
+ - **List** - Produces the list x, y of maxima in the image.
+
+ - **Count** - Produces the number of maxima in the image.
+
+- **Exclude Edge Maxima** - Excludes maxima if the area within the noise tolerance surrounding a maximum touches the edge of the image (edge of the selection does not matter).
+
+- **Light Background** - Select "yes" if the image background is brighter than the objects you want to find.
+
+    </help>
+    <expand macro="fiji_headless_citations" />
+</tool>