comparison measure_texture.xml @ 3:658a2a451aec draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c3917e27eb1c1deeb381aa0dc8161c07699562fb"
author bgruening
date Mon, 11 May 2020 07:45:48 -0400
parents 8f3f8c94626f
children 80b200ae516b
comparison
equal deleted inserted replaced
2:8f3f8c94626f 3:658a2a451aec
1 <tool id="cp_measure_texture" name="MeasureTexture" version="@CP_VERSION@"> 1 <tool id="cp_measure_texture" name="MeasureTexture" version="@CP_VERSION@">
2 <description>quantify their roughness and smoothness of the textures</description> 2 <description>quantify the roughness and smoothness of the textures</description>
3 3
4 <macros> 4 <macros>
5 <import>macros.xml</import> 5 <import>macros.xml</import>
6 <xml name="measureImgObj"> 6 <xml name="measureImgObj">
7 <repeat name="rpt_obj_to_measure" title="Add another object"> 7 <repeat name="rpt_obj_to_measure" title="new object" min="1">
8 <param name="obj_to_measure" label="Select objects to measure" type="text" /> 8
9 <param name="obj_to_measure" label="Enter the names of the objects to measure" type="text" />
9 </repeat> 10 </repeat>
10 </xml> 11 </xml>
11 </macros> 12 </macros>
12 13
13 <expand macro="py_requirements"/> 14 <expand macro="py_requirements"/>
64 65
65 module_count = int(v) 66 module_count = int(v)
66 new_count = module_count + 1 67 new_count = module_count + 1
67 lines[4] = k + ":%d\n" % new_count 68 lines[4] = k + ":%d\n" % new_count
68 69
69 with open("output", "w") as f: 70 with open("output.cppipe", "w") as f:
70 f.writelines(lines) 71 f.writelines(lines)
71 f.write(writemi()) 72 f.write(writemi())
72 73
73 f.close() 74 f.close()
74 </configfile> 75 </configfile>
75 </configfiles> 76 </configfiles>
76 77
77 <inputs> 78 <inputs>
79 <expand macro="input_pipeline_param" />
80 <repeat name="rpt_image_to_measure" title="new image" min="1">
78 81
79 <expand macro="input_pipeline_macro" /> 82 <param name="image_to_measure" label="Enter the name of an image to measure" type="text">
80 <repeat name="rpt_image_to_measure" title="Add another image">
81 <param name="image_to_measure" label="Select an image to measure" type="text" >
82 <expand macro="text_validator" /> 83 <expand macro="text_validator" />
83 </param> 84 </param>
84 </repeat> 85 </repeat>
85 86
86 <conditional name="con_img_obj"> 87 <conditional name="con_img_obj">
87 <param name="img_obj" label="Measure images or objects?" type="select"> 88 <param name="img_obj" label="Measure images or objects?" type="select">
89 <help>
90 <![CDATA[
91 This setting determines whether the module computes image-wide measurements, per-object measurements or both.
92 <br> - Images: Select if you only want to measure the texture across entire images.
93 <br> - Objects: Select if you want to measure the texture on a per-object basis only.
94 <br> - Both: Select to make both image and object measurements.
95 ]]>
96 </help>
88 <option value="Images">Images</option> 97 <option value="Images">Images</option>
89 <option value="Objects">Objects</option> 98 <option value="Objects">Objects</option>
90 <option value="Both">Both</option> 99 <option value="Both">Both</option>
91 </param> 100 </param>
92 <when value="Objects"> 101 <when value="Objects">
95 <when value="Both"> 104 <when value="Both">
96 <expand macro="measureImgObj" /> 105 <expand macro="measureImgObj" />
97 </when> 106 </when>
98 <when value="Images" /> 107 <when value="Images" />
99 </conditional> 108 </conditional>
100 <repeat name="rpt_scale_to_measure" title="Add another scale"> 109 <repeat name="rpt_scale_to_measure" title="new scale" min="1">
101 <param name="scale_to_measure" label="Texture scale to measure" type="integer" value="3" min="0" /> 110 <param name="scale_to_measure" label="Texture scale to measure" type="integer" value="3" min="0">
111 <help>
112 You can specify the scale of texture to be measured, in pixel units. The texture scale is the distance between correlated intensities in the image. A higher number for the scale of texture measures larger patterns of texture whereas smaller numbers measure more localized patterns of texture. It is best to measure texture on a scale smaller than your objects’ sizes, so be sure that the value entered for the scale of texture is smaller than most of your objects. For very small objects (smaller than the scale of texture you are measuring), the texture cannot be measured and will result in an undefined value in the output file.
113
114 </help>
115 </param>
102 </repeat> 116 </repeat>
103 </inputs> 117 </inputs>
104 118
105 <outputs> 119 <outputs>
106 <expand macro="output_pipeline_macro" /> 120 <expand macro="output_pipeline_param" />
107 </outputs> 121 </outputs>
108 122
109 <tests> 123 <tests>
110 <test> 124 <test>
111 <expand macro="test_input_pipeline_param" /> 125 <expand macro="test_input_pipeline_param" />
121 135
122 <repeat name="rpt_scale_to_measure"> 136 <repeat name="rpt_scale_to_measure">
123 <param name="scale_to_measure" value="3" /> 137 <param name="scale_to_measure" value="3" />
124 </repeat> 138 </repeat>
125 139
126 <expand macro="test_out_file" file="measure_texture.txt" /> 140 <expand macro="test_out_file" file="measure_texture.cppipe" />
127 </test> 141 </test>
128 </tests> 142 </tests>
129 143
130 <expand macro="help" module="MeasureObjectSizeShape" /> 144 <help>
131 <expand macro="citations" /> 145 <![CDATA[
146
147 .. class:: infomark
148
149 **What it does**
150
151 MeasureTexture measures the degree and nature of textures within images and objects to quantify their roughness and smoothness.
152 This module measures intensity variations in grayscale images.
153 An object or entire image without much texture has a smooth appearance; an object or image with a lot of texture will appear rough and show a wide variety of pixel intensities.
154 Note that any input objects specified will have their texture measured against all input images specified, which may lead to image-object texture combinations that are unnecessary.
155 If you do not want this behavior, use multiple MeasureTexture modules to specify the particular image-object measures that you want.
156
157 @COMMON_HELP@
158 ]]>
159 </help>
160
161 <expand macro="citations" />
132 </tool> 162 </tool>