diff measure_image_area_occupied.xml @ 3:7a08edbc790e draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c3917e27eb1c1deeb381aa0dc8161c07699562fb"
author bgruening
date Mon, 11 May 2020 07:56:06 -0400
parents 534ed7b8ca34
children 91e03287f285
line wrap: on
line diff
--- a/measure_image_area_occupied.xml	Thu Apr 16 05:44:16 2020 -0400
+++ b/measure_image_area_occupied.xml	Mon May 11 07:56:06 2020 -0400
@@ -10,7 +10,7 @@
 
     <configfiles>
         <inputs name="inputs" />
-         <configfile name="script_file">
+        <configfile name="script_file">
 import json
 import sys
 import os
@@ -40,7 +40,7 @@
         else:
             _str += FOURSPACES + "Select objects to measure:None\n"
             _str += FOURSPACES + "Select a binary image to measure:%s\n" % area['con_area']['image_to_measure']
-            
+
     return _str
 
 
@@ -52,38 +52,45 @@
     module_count = int(v)
     new_count = module_count + 1
     lines[4] = k + ":%d\n" % new_count
-    with open("output", "w") as f:
+    with open("output.cppipe", "w") as f:
         f.writelines(lines)
         f.write(writemiao())
 
-f.close()
-        </configfile>    
+    f.close()
+        </configfile>
     </configfiles>
 
     <inputs>
-        <expand macro="input_pipeline_macro" />
-        <repeat name="rpt_area" title="Add another area">
+        <expand macro="input_pipeline_param" />
+        <repeat name="rpt_area" title="new area" min="1">
             <conditional name="con_area">
                 <param name="objects_or_image" label="Measure the area occupied in a binary image, or in objects?" type="select">
+                    <help>
+                        <![CDATA[
+                            The area can be measured in two ways:
+                            <br> - Binary Image: The area occupied by the foreground in a binary (black and white) image.
+                            <br> - Objects: The area occupied by previously-identified objects.
+                            ]]>
+                    </help>
                     <option value="Binary image">Binary image</option>
                     <option value="Objects">Objects</option>
                 </param>
                 <when value="Objects">
-                    <param name="objects_to_measure" label="Select objects to measure" type="text">
+                    <param name="objects_to_measure" label="Enter the name of the objects to measure" type="text">
                         <expand macro="text_validator" />
                     </param>
                 </when>
                 <when value="Binary image">
-                    <param name="image_to_measure" label="Select a binary image to measure" type="text">
+                    <param name="image_to_measure" label="Enter the name of a binary image to measure" type="text">
                         <expand macro="text_validator" />
                     </param>
                 </when>
             </conditional>
         </repeat>
-  </inputs>
+    </inputs>
 
     <outputs>
-        <expand macro="output_pipeline_macro" />
+        <expand macro="output_pipeline_param" />
     </outputs>
 
     <tests>
@@ -101,10 +108,23 @@
                     <param name="objects_to_measure" value="Nucleoli" />
                 </conditional>
             </repeat>
-            <expand macro="test_out_file" file="measure_image_area_occupied.txt" />
+            <expand macro="test_out_file" file="measure_image_area_occupied.cppipe" />
         </test>
     </tests>
 
-    <expand macro="help" module="MeasureImageAreaOccupied" />
+    <help>
+        <![CDATA[
+
+            .. class:: infomark
+
+            **What it does**
+            This tool reports the sum of the areas and perimeters of the objects defined by one of the Identify modules, or the area of the foreground in a binary image.
+            If the input image has a mask (for example, created by the MaskImage module), the measurements made by this module will take the mask into account by ignoring the pixels outside the mask.
+            You can use this tool to measure the number of pixels above a given threshold if you precede it with thresholding performed by Threshold, and then select the binary image output by Threshold to be measured by this module.
+
+            @COMMON_HELP@
+            ]]>
+    </help>
+
     <expand macro="citations" />
 </tool>