Mercurial > repos > imgteam > imagej2_adjust_threshold_binary
comparison imagej2_adjust_threshold_binary.xml @ 1:29a4d422f32a draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2 commit 2afb24f3c81d625312186750a714d702363012b5"
author | imgteam |
---|---|
date | Mon, 28 Sep 2020 16:41:15 +0000 |
parents | f1ba33cd9edf |
children | da29019170f1 |
comparison
equal
deleted
inserted
replaced
0:f1ba33cd9edf | 1:29a4d422f32a |
---|---|
1 <?xml version='1.0' encoding='UTF-8'?> | |
2 <tool id="imagej2_adjust_threshold_binary" name="Adjust threshold" version="@WRAPPER_VERSION@.0"> | 1 <tool id="imagej2_adjust_threshold_binary" name="Adjust threshold" version="@WRAPPER_VERSION@.0"> |
3 <description>of binary image</description> | 2 <description>of binary image</description> |
4 <macros> | 3 <macros> |
5 <import>imagej2_macros.xml</import> | 4 <import>imagej2_macros.xml</import> |
6 </macros> | 5 </macros> |
7 <expand macro="fiji_requirements" /> | 6 <expand macro="fiji_requirements"/> |
8 <command> | 7 <command detect_errors="exit_code"><![CDATA[ |
9 <![CDATA[ | 8 #import os |
10 python $__tool_directory__/imagej2_adjust_threshold_binary.py | 9 #set error_log = 'output_log.txt' |
11 --input "$input" | 10 #set input_sans_ext = $os.path.splitext($os.path.basename($input.file_name))[0] |
12 --input_datatype $input.ext | 11 #set input_with_ext = '.'.join([input_sans_ext, $input.ext]) |
13 --threshold_min $threshold_min | 12 ln -s '$input.file_name' '$input_with_ext' && |
14 --threshold_max $threshold_max | 13 #set output_filename = '.'.join(['output', $input.ext]) |
15 --method $method | 14 touch '$output_filename' && |
16 --display $display | 15 touch '$error_log' && |
17 --black_background $black_background | 16 ImageJ --ij2 --headless --debug |
18 --stack_histogram $stack_histogram | 17 --jython '$__tool_directory__/imagej2_adjust_threshold_binary_jython_script.py' |
19 --jython_script $__tool_directory__/imagej2_adjust_threshold_binary_jython_script.py | 18 '$error_log' |
20 --output_datatype $output.ext | 19 '$input_with_ext' |
21 --output "$output" | 20 $threshold_min |
22 ]]> | 21 $threshold_max |
23 </command> | 22 '$method' |
23 '$display' | |
24 '$black_background' | |
25 '$stack_histogram' | |
26 '$output_filename' | |
27 '$input.ext' | |
28 &>'$error_log'; | |
29 if [[ $? -ne 0 ]]; then | |
30 cat '$error_log' >&2; | |
31 else | |
32 mv '$output_filename' '$output'; | |
33 fi | |
34 ]]></command> | |
24 <inputs> | 35 <inputs> |
25 <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="input" type="data" label="Select image"/> | 36 <expand macro="param_input"/> |
26 <param name="threshold_min" type="float" value="0" min="0" max="255" label="Minimum threshold value" /> | 37 <param name="threshold_min" type="float" value="0" min="0" max="255" label="Minimum threshold value"/> |
27 <param name="threshold_max" type="float" value="0" min="0" max="255" label="Maximum threshold value" /> | 38 <param name="threshold_max" type="float" value="0" min="0" max="255" label="Maximum threshold value"/> |
28 <param name="method" type="select" label="Method" help="The Default method is the modified IsoData algorithm."> | 39 <param name="method" type="select" label="Method" help="The Default method is the modified IsoData algorithm."> |
29 <option value="Default" selected="True">Default</option> | 40 <option value="Default" selected="True">Default</option> |
30 <option value="Huang">Huang</option> | 41 <option value="Huang">Huang</option> |
31 <option value="Intermodes">Intermodes</option> | 42 <option value="Intermodes">Intermodes</option> |
32 <option value="IsoData">IsoData</option> | 43 <option value="IsoData">IsoData</option> |
56 <option value="no" selected="True">No</option> | 67 <option value="no" selected="True">No</option> |
57 <option value="yes">Yes</option> | 68 <option value="yes">Yes</option> |
58 </param> | 69 </param> |
59 </inputs> | 70 </inputs> |
60 <outputs> | 71 <outputs> |
61 <data name="output" format_source="input" label="${tool.name} on ${on_string}"/> | 72 <data name="output" format_source="input"/> |
62 </outputs> | 73 </outputs> |
63 <tests> | 74 <tests> |
64 <test> | 75 <test> |
65 <param name="input" value="blobs.gif" /> | 76 <param name="input" value="blobs.gif"/> |
66 <param name="output_datatype" value="gif" /> | 77 <param name="output_datatype" value="gif"/> |
67 <param name="threshold_min" value="0.0" /> | 78 <param name="threshold_min" value="0.0"/> |
68 <param name="threshold_max" value="129.0" /> | 79 <param name="threshold_max" value="129.0"/> |
69 <param name="method" value="Default" /> | 80 <param name="method" value="Default"/> |
70 <param name="display" value="red" /> | 81 <param name="display" value="red"/> |
71 <param name="black_background" value="no" /> | 82 <param name="black_background" value="no"/> |
72 <param name="stack_histogram" value="no" /> | 83 <param name="stack_histogram" value="no"/> |
73 <output name="output" file="blobs_threshold_default.gif" compare="sim_size" /> | 84 <output name="output" file="blobs_threshold_default.gif" compare="sim_size"/> |
74 </test> | 85 </test> |
75 <test> | 86 <test> |
76 <param name="input" value="blobs.gif" /> | 87 <param name="input" value="blobs.gif"/> |
77 <param name="output_datatype" value="gif" /> | 88 <param name="output_datatype" value="gif"/> |
78 <param name="threshold_min" value="118.0" /> | 89 <param name="threshold_min" value="118.0"/> |
79 <param name="threshold_max" value="255.0" /> | 90 <param name="threshold_max" value="255.0"/> |
80 <param name="method" value="IJ_IsoData" /> | 91 <param name="method" value="IJ_IsoData"/> |
81 <param name="display" value="over_under" /> | 92 <param name="display" value="over_under"/> |
82 <param name="black_background" value="no" /> | 93 <param name="black_background" value="no"/> |
83 <param name="stack_histogram" value="no" /> | 94 <param name="stack_histogram" value="no"/> |
84 <output name="output" file="blobs_threshold_ijiso.gif" compare="sim_size" /> | 95 <output name="output" file="blobs_threshold_ijiso.gif" compare="sim_size"/> |
85 </test> | 96 </test> |
86 <test> | 97 <test> |
87 <param name="input" value="blobs.gif" /> | 98 <param name="input" value="blobs.gif"/> |
88 <param name="output_datatype" value="gif" /> | 99 <param name="output_datatype" value="gif"/> |
89 <param name="threshold_min" value="72.0" /> | 100 <param name="threshold_min" value="72.0"/> |
90 <param name="threshold_max" value="255.0" /> | 101 <param name="threshold_max" value="255.0"/> |
91 <param name="method" value="Huang" /> | 102 <param name="method" value="Huang"/> |
92 <param name="display" value="bw" /> | 103 <param name="display" value="bw"/> |
93 <param name="black_background" value="yes" /> | 104 <param name="black_background" value="yes"/> |
94 <param name="stack_histogram" value="no" /> | 105 <param name="stack_histogram" value="no"/> |
95 <output name="output" file="blobs_threshold_huang_dark.gif" compare="sim_size" /> | 106 <output name="output" file="blobs_threshold_huang_dark.gif" compare="sim_size"/> |
96 </test> | 107 </test> |
97 </tests> | 108 </tests> |
98 <help> | 109 <help> |
99 | 110 |
100 @requires_binary_input@ | 111 @requires_binary_input@ |
111 - **Black background** - Select **yes** when features are lighter than the background. | 122 - **Black background** - Select **yes** when features are lighter than the background. |
112 - **Stack histogram** Select **yes** to first compute the histogram of the whole stack (or hyperstack) and then compute the threshold based on that histogram. As such, all slices are binarized using the single computed value. If unchecked, the threshold of each slice is computed separately. | 123 - **Stack histogram** Select **yes** to first compute the histogram of the whole stack (or hyperstack) and then compute the threshold based on that histogram. As such, all slices are binarized using the single computed value. If unchecked, the threshold of each slice is computed separately. |
113 ]]> | 124 ]]> |
114 | 125 |
115 </help> | 126 </help> |
116 <expand macro="fiji_headless_citations" /> | 127 <expand macro="fiji_headless_citations"/> |
117 </tool> | 128 </tool> |