comparison imagej2_enhance_contrast.xml @ 1:ef3de3e84817 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:58:37 +0000
parents edfc597fb180
children 056e74fbbf6c
comparison
equal deleted inserted replaced
0:edfc597fb180 1:ef3de3e84817
1 <?xml version='1.0' encoding='UTF-8'?> 1 <tool id="imagej2_enhance_contrast" name="Enhance contrast" version="@WRAPPER_VERSION@.1">
2 <tool id="imagej2_enhance_contrast" name="Enhance contrast" version="@WRAPPER_VERSION@.0">
3 <description></description> 2 <description></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_enhance_contrast.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 --equalize_histogram $equalize_histogram_cond.equalize_histogram 12 ln -s '$input.file_name' '$input_with_ext' &&
14 #if $equalize_histogram_cond.equalize_histogram == 'no': 13 #set output_filename = '.'.join(['output', $input.ext])
15 --saturated_pixels $equalize_histogram_cond.saturated_pixels 14 touch '$output_filename' &&
16 --normalize $equalize_histogram_cond.normalize 15 ImageJ --ij2 --headless --debug
17 #end if 16 --jython '$__tool_directory__/imagej2_enhance_contrast_jython_script.py'
18 --jython_script $__tool_directory__/imagej2_enhance_contrast_jython_script.py 17 '$error_log'
19 --output_datatype $output.ext 18 '$input_with_ext'
20 --output "$output" 19 '$equalize_histogram_cond.equalize_histogram'
21 ]]> 20 #if $equalize_histogram_cond.equalize_histogram == 'no':
22 </command> 21 $equalize_histogram_cond.saturated_pixels
22 '$equalize_histogram_cond.normalize'
23 #else:
24 'None'
25 'no'
26 #end if
27 '$output_filename'
28 '$input.ext'
29 &>'$error_log';
30 if [[ $? -ne 0 ]]; then
31 cat '$error_log' >&2;
32 else
33 mv '$output_filename' '$output';
34 fi
35 ]]></command>
23 <inputs> 36 <inputs>
24 <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="input" type="data" label="Select image"/> 37 <expand macro="param_input"/>
25 <conditional name="equalize_histogram_cond"> 38 <conditional name="equalize_histogram_cond">
26 <param name="equalize_histogram" type="select" label="Equalize histogram?"> 39 <param name="equalize_histogram" type="select" label="Equalize histogram?">
27 <option value="no" selected="True">No</option> 40 <option value="no" selected="True">No</option>
28 <option value="yes">Yes</option> 41 <option value="yes">Yes</option>
29 </param> 42 </param>
30 <when value="no"> 43 <when value="no">
31 <param name="saturated_pixels" type="float" value="0.3" min="0.0" max="100.0" label="Saturated pixels pct" help="Value is percentage of total number of pixels"> 44 <param name="saturated_pixels" type="float" value="0.3" min="0.0" max="100.0" label="Saturated pixels pct" help="Value is percentage of total number of pixels">
32 <validator type="in_range" min="0" exclude_min="true" max="100" /> 45 <validator type="in_range" min="0" exclude_min="true" max="100"/>
33 </param> 46 </param>
34 <param name="normalize" type="select" label="Normalize?"> 47 <param name="normalize" type="select" label="Normalize?">
35 <option value="no" selected="True">No</option> 48 <option value="no" selected="True">No</option>
36 <option value="yes">Yes</option> 49 <option value="yes">Yes</option>
37 </param> 50 </param>
38 </when> 51 </when>
39 <when value="yes"/> 52 <when value="yes"/>
40 </conditional> 53 </conditional>
41 </inputs> 54 </inputs>
42 <outputs> 55 <outputs>
43 <data name="output" format_source="input" label="${tool.name} on ${on_string}"/> 56 <data name="output" format_source="input"/>
44 </outputs> 57 </outputs>
45 <tests> 58 <tests>
46 <test> 59 <test>
47 <param name="input" value="blobs.gif" /> 60 <param name="input" value="blobs.gif"/>
48 <param name="equalize_histogram" value="yes" /> 61 <param name="equalize_histogram" value="yes"/>
49 <output name="output" file="blobs_equalize.gif" compare="sim_size" /> 62 <output name="output" file="blobs_equalize.gif" compare="sim_size"/>
50 </test> 63 </test>
51 <test> 64 <test>
52 <param name="input" value="blobs.gif" /> 65 <param name="input" value="blobs.gif"/>
53 <param name="saturated_pixels" value="6.2" /> 66 <param name="saturated_pixels" value="6.2"/>
54 <output name="output" file="blobs_saturate.gif" compare="sim_size" /> 67 <output name="output" file="blobs_saturate.gif" compare="sim_size"/>
55 </test> 68 </test>
56 <test> 69 <test>
57 <param name="input" value="blobs.gif" /> 70 <param name="input" value="blobs.gif"/>
58 <param name="saturated_pixels" value="13.0" /> 71 <param name="saturated_pixels" value="13.0"/>
59 <param name="normalize" value="yes" /> 72 <param name="normalize" value="yes"/>
60 <output name="output" file="blobs_normalize.gif" compare="sim_size" /> 73 <output name="output" file="blobs_normalize.gif" compare="sim_size"/>
61 </test> 74 </test>
62 </tests> 75 </tests>
63 <help> 76 <help>
64 77
65 **What it does** 78 **What it does**
87 - **Normalize** - Recalculates the pixel values of the image so the range is equal to the maximum range for the data type, or 0-1.0 for float images. The maximum range is 0-255 for 8-bit images and 0-65535 for 16-bit images. Normalization of RGB images is not supported, so selecting "yes" is ignored for this image type. 100 - **Normalize** - Recalculates the pixel values of the image so the range is equal to the maximum range for the data type, or 0-1.0 for float images. The maximum range is 0-255 for 8-bit images and 0-65535 for 16-bit images. Normalization of RGB images is not supported, so selecting "yes" is ignored for this image type.
88 101
89 ]]> 102 ]]>
90 103
91 </help> 104 </help>
92 <expand macro="fiji_headless_citations" /> 105 <expand macro="fiji_headless_citations"/>
93 </tool> 106 </tool>