Mercurial > repos > bgruening > cp_mask_image
diff mask_image.xml @ 3:ca1421f7e3ed draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c3917e27eb1c1deeb381aa0dc8161c07699562fb"
author | bgruening |
---|---|
date | Mon, 11 May 2020 07:57:09 -0400 |
parents | baa3e6d4d99d |
children | b178453ea8d1 |
line wrap: on
line diff
--- a/mask_image.xml Thu Apr 16 05:45:02 2020 -0400 +++ b/mask_image.xml Mon May 11 07:57:09 2020 -0400 @@ -6,7 +6,7 @@ </macros> <expand macro="py_requirements"/> - <expand macro="cmd_modules" /> + <expand macro="cmd_modules" /> <configfiles> <inputs name="inputs"/> @@ -52,45 +52,62 @@ 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(writemi()) -f.close() - </configfile> + f.close() + </configfile> </configfiles> <inputs> - <expand macro="input_pipeline_macro" /> - <param name="input_image" label="Select input image" type="text"> + <expand macro="input_pipeline_param" /> + <param name="input_image" label="Enter the name of the input image" type="text"> <expand macro="text_validator" /> </param> - <param name="name_output_image" type="text" label="Name the output image"> + <param name="name_output_image" type="text" label="Enter the name of the resulting image"> <expand macro="text_validator" /> </param> <conditional name="con_img_obj"> <param name="img_obj" label="Use objects or an image as a mask?" type="select"> + <help> + <![CDATA[ + You can mask an image in two ways: + <br> - Objects: Using objects created by another module (for instance IdentifyPrimaryObjects). + The module will mask out all parts of the image that are not within one of the objects (unless you invert the mask). + <br> - Image: Using a binary image as the mask, where black portions of the image (false or zero-value pixels) will be masked out. + If the image is not binary, the module will use all pixels whose intensity is greater than 0.5 as the mask’s foreground (white area). + You can use Threshold instead to create a binary image with finer control over the intensity choice. + ]]> + </help> <option value="Objects">Objects</option> <option value="Image">Image</option> </param> - <when value="Objects"> - <param name="select_obj" label="Select object for mask" type="text"/> - </when> - <when value="Image"> - <param name="select_img" label="Select image for mask" type="text"/> - </when> + <when value="Objects"> + <param name="select_obj" label="Enter the name objects to mask the input image" type="text"/> + </when> + <when value="Image"> + <param name="select_img" label="Select image for mask" type="text"/> + </when> </conditional> <param name="invert_mask" label="Invert the mask?" type="select" display="radio"> + <help> + <![CDATA[ + This option reverses the foreground/background relationship of the mask. + <br> - Select "No" to produce the mask from the foreground (white portion) of the masking image or the area within the masking objects. + <br> - Select "Yes" to instead produce the mask from the background (black portions) of the masking image or the area outside the masking objects. + ]]> + </help> <option value="Yes">Yes</option> <option value="No">No</option> </param> </inputs> <outputs> - <expand macro="output_pipeline_macro" /> + <expand macro="output_pipeline_param" /> </outputs> <tests> @@ -103,11 +120,27 @@ <param name="select_obj" value="Nuclei" /> </conditional> <param name="invert_mask" value="No" /> - <expand macro="test_out_file" file="mask_image.txt" /> + <expand macro="test_out_file" file="mask_image.cppipe" /> </test> </tests> - <expand macro="help" module="GrayToColor" /> + <help> + <![CDATA[ + .. class:: infomark + + **What it does** + + This tool masks an image so you can use the mask downstream in the pipeline. + The masked image is based on the original image and the masking object or image that is selected. + If using a masking image, the mask is composed of the foreground (white portions); + if using a masking object, the mask is composed of the area within the object. + Note that the image created by this tool for further processing downstream is grayscale. + If a binary mask is desired in subsequent tools, use the Threshold tool instead of MaskImage. + + @COMMON_HELP@ + ]]> + </help> + <expand macro="citations" /> </tool>