diff imagej2_analyze_particles_binary.xml @ 0:aeb9bb864b8c 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 16:56:37 -0400
parents
children 1dd5396c734a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/imagej2_analyze_particles_binary.xml	Tue Sep 17 16:56:37 2019 -0400
@@ -0,0 +1,132 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<tool id="imagej2_analyze_particles_binary" name="Analyze particles" version="@WRAPPER_VERSION@.0">
+    <description>of binary image</description>
+    <macros>
+        <import>imagej2_macros.xml</import>
+    </macros>
+    <expand macro="fiji_requirements" />
+    <command>
+<![CDATA[
+    python $__tool_directory__/imagej2_analyze_particles_binary.py
+    --input "$input"
+    --input_datatype $input.ext
+    --black_background $black_background
+    --size "$size"
+    --circularity_min $circularity_min
+    --circularity_max $circularity_max
+    --show $show
+    --exclude_edges $exclude_edges
+    --include_holes $include_holes
+    --jython_script $__tool_directory__/imagej2_analyze_particles_binary_jython_script.py
+    #if str($show) == 'Nothing':
+        --display_results "yes"
+        --all_results "yes"
+    #else:
+        --display_results $display_results_cond.display_results
+        --all_results $display_results_cond.all_results
+        --output_datatype $output.ext
+        --output "$output"
+    #end if
+    --results "$results"
+]]>
+    </command>
+    <inputs>
+        <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="input" type="data" label="Select image"/>
+        <expand macro="black_background_param" />
+        <param name="size" type="text" value="0-Infinity" label="Size (pixel^2)" help="Enter a single value and particles smaller than that value will be ignored."/>
+        <param name="circularity_min" type="float" value="0.0" label="Circularity minimum" help="Values from 0.0 to 1.0, but less than maximum">
+            <validator type="in_range" min="0" max="1"/>
+        </param>
+        <param name="circularity_max" type="float" value="1.0" label="Circularity maximum" help="Values from 0.0 to 1.0, but greater than minimum">
+            <validator type="in_range" min="0" max="1"/>
+        </param>
+        <param name="show" type="select" label="Show" help="Selecting Nothing will display results, but no image.">
+            <option value="Outlines" selected="True">Outlines</option>
+            <option value="Bare_Outlines">Bare Outlines</option>
+            <option value="Ellipses">Ellipses</option>
+            <option value="Masks">Masks</option>
+            <option value="Count_Masks">Count Masks</option>
+            <option value="Nothing">Nothing</option>
+        </param>
+        <conditional name="display_results_cond">
+            <param name="display_results" type="select" label="Display results">
+                <option value="no" selected="True">No</option>
+                <option value="yes">Yes</option>
+            </param>
+            <when value="no">
+                <param name="all_results" type="hidden" value="no"/>
+            </when>
+            <when value="yes">
+                <param name="all_results" type="select" label="All results?" help="If no, only summary displayed.">
+                    <option value="yes" selected="True">Yes</option>
+                    <option value="no">No</option>
+                </param>
+            </when>
+        </conditional>
+        <param name="exclude_edges" type="select" label="Exclude on edges?">
+            <option value="no" selected="True">No</option>
+            <option value="yes">Yes</option>
+        </param>
+        <param name="include_holes" type="select" label="Include holes?">
+            <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}">
+            <filter>show != "Nothing"</filter>
+       </data>
+        <data format="tabular" name="results" label="${tool.name} on ${on_string}: Results">
+            <filter>show == "Nothing" or display_results_cond['display_results'] == "yes"</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="blobs_watershed_binary.gif" />
+            <param name="show" value="Nothing" />
+            <output name="output" file="analyze_particles_nothing.tabular" />
+        </test>
+        <test>
+            <param name="input" value="blobs_watershed_binary.gif" />
+            <param name="show" value="Outlines" />
+            <output name="output" file="analyze_particles_outlines.gif" compare="sim_size" />
+        </test>
+        <test>
+            <param name="input" value="blobs_watershed_binary.gif" />
+            <param name="show" value="Masks" />
+            <param name="exclude_edges" value="yes" />
+            <param name="include_holes" value="yes" />
+            <output name="output" file="analyze_particles_masks.gif" compare="sim_size" />
+        </test>
+    </tests>
+    <help>
+.. class:: warningmark
+
+@requires_binary_input@
+
+**What it does**
+
+<![CDATA[
+Counts and measures objects in binary or thresholded images.  It works by scanning the image until
+it finds the edge of an object.  It then outlines the object, measures it, fills it to make it
+invisible, then resumes scanning until it reaches the end of the image.  Features of thresholded
+images can be extracted by specifying suitable **Size** and **Circularity** ranges and/or by choosing
+if particles should be traced by their outer edge or by flood filling.
+
+- **Size** - Particles with size (area) outside the range specified in this field are ignored. Values may range between 0 and ‘Infinity’.  Enter a single value and particles smaller than that value will be ignored.
+- **Cicularity** - Particles with size circularity values outside the range specified in the min/max fields are also ignored.
+- **Show: Nothing** - No image will be generated, but **Display Results** will be set to Yes.  Note that the particle analyzer will display a blank image when the count of detected particles is zero and **Show** is not **Nothing**.
+- **Show: Outlines** - Generates an 8-bit image containing numbered outlines of the measured particles (gray levels: Outlines: 0; Labels: 1; Background: 255).
+- **Show: Bare Outlines** - Generates an 8-bit image containing simple outlines of the measured particles without labels (graylevels: Outlines: 0; Background: 255).
+- **Show: Ellipses** - Generates an 8-bit image containing the best fit ellipse of each measured particle (gray levels: Ellipses: 0; Background: 255).
+- **Show: Masks** - Generates an 8-bit image containing filled outlines of the measured particles (gray levels: Masks: 0; Background: 255).
+- **Show: Count Masks** - Generates a 16-bit image containing filled outlines of the measured particles painted with a grayscale value corresponding to the particle number.
+- **Display Results** - If Yes, the measurements for each particle will be generated.
+- **All results** - If No, results will be restricted to the particle count, total particle area, average particle size, and area fraction.
+- **Exclude on Edges** - If Yes, particles touching the edge of the image will be ignored.
+- **Include Holes** - If Yes, interior holes will be included (set to No to exclude interior holes and to measure particles enclosed by other particles).
+]]>
+
+    </help>
+    <expand macro="fiji_headless_citations" />
+</tool>