Mercurial > repos > imgteam > imagej2_enhance_contrast
comparison imagej2_enhance_contrast.xml @ 0:edfc597fb180 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2 commit b08f0e6d1546caaf627b21f8c94044285d5d5b9c-dirty"
author | imgteam |
---|---|
date | Tue, 17 Sep 2019 17:01:04 -0400 |
parents | |
children | ef3de3e84817 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:edfc597fb180 |
---|---|
1 <?xml version='1.0' encoding='UTF-8'?> | |
2 <tool id="imagej2_enhance_contrast" name="Enhance contrast" version="@WRAPPER_VERSION@.0"> | |
3 <description></description> | |
4 <macros> | |
5 <import>imagej2_macros.xml</import> | |
6 </macros> | |
7 <expand macro="fiji_requirements" /> | |
8 <command> | |
9 <![CDATA[ | |
10 python $__tool_directory__/imagej2_enhance_contrast.py | |
11 --input "$input" | |
12 --input_datatype $input.ext | |
13 --equalize_histogram $equalize_histogram_cond.equalize_histogram | |
14 #if $equalize_histogram_cond.equalize_histogram == 'no': | |
15 --saturated_pixels $equalize_histogram_cond.saturated_pixels | |
16 --normalize $equalize_histogram_cond.normalize | |
17 #end if | |
18 --jython_script $__tool_directory__/imagej2_enhance_contrast_jython_script.py | |
19 --output_datatype $output.ext | |
20 --output "$output" | |
21 ]]> | |
22 </command> | |
23 <inputs> | |
24 <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="input" type="data" label="Select image"/> | |
25 <conditional name="equalize_histogram_cond"> | |
26 <param name="equalize_histogram" type="select" label="Equalize histogram?"> | |
27 <option value="no" selected="True">No</option> | |
28 <option value="yes">Yes</option> | |
29 </param> | |
30 <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"> | |
32 <validator type="in_range" min="0" exclude_min="true" max="100" /> | |
33 </param> | |
34 <param name="normalize" type="select" label="Normalize?"> | |
35 <option value="no" selected="True">No</option> | |
36 <option value="yes">Yes</option> | |
37 </param> | |
38 </when> | |
39 <when value="yes"/> | |
40 </conditional> | |
41 </inputs> | |
42 <outputs> | |
43 <data name="output" format_source="input" label="${tool.name} on ${on_string}"/> | |
44 </outputs> | |
45 <tests> | |
46 <test> | |
47 <param name="input" value="blobs.gif" /> | |
48 <param name="equalize_histogram" value="yes" /> | |
49 <output name="output" file="blobs_equalize.gif" compare="sim_size" /> | |
50 </test> | |
51 <test> | |
52 <param name="input" value="blobs.gif" /> | |
53 <param name="saturated_pixels" value="6.2" /> | |
54 <output name="output" file="blobs_saturate.gif" compare="sim_size" /> | |
55 </test> | |
56 <test> | |
57 <param name="input" value="blobs.gif" /> | |
58 <param name="saturated_pixels" value="13.0" /> | |
59 <param name="normalize" value="yes" /> | |
60 <output name="output" file="blobs_normalize.gif" compare="sim_size" /> | |
61 </test> | |
62 </tests> | |
63 <help> | |
64 | |
65 **What it does** | |
66 | |
67 <![CDATA[ | |
68 | |
69 Enhances image contrast by using either normalization (contrast stretching) or histogram | |
70 equalization. | |
71 | |
72 Normalization (i.e., contrast stretching) attempts to improve the contrast in an image by | |
73 stretching the range of intensity values it contains to span a desired range of values | |
74 (e.g. the the full range of pixel values that the image type allows). It differs from the | |
75 more sophisticated histogram equalization in that it can only apply a linear scaling function | |
76 to the image pixel values. As a result the enhancement is less harsh. | |
77 | |
78 Histogram equalization provides a sophisticated method for modifying the dynamic range and | |
79 contrast of an image by altering the image such that its intensity histogram has a desired | |
80 shape. Unlike contrast stretching, histogram modeling operators may employ non-linear and | |
81 non-monotonic transfer functions to map between pixel intensity values in the input and output | |
82 images. Histogram equalization re-assigns the intensity values of pixels in the input image | |
83 such that the output image contains a uniform distribution of intensities (i.e. a flat histogram). | |
84 | |
85 - **Equalize histogram** - Enhances the image using histogram equalization. Choosing this option eliminates the "Saturated pixels pct" and "Normalize" options. | |
86 - **Saturated pixels pct** - Determines the number of pixels in the image that are allowed to become saturated. Increasing this value increases contrast. This value should be greater than zero to prevent a few outlying pixels from causing the histogram stretch to not work as intended. | |
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. | |
88 | |
89 ]]> | |
90 | |
91 </help> | |
92 <expand macro="fiji_headless_citations" /> | |
93 </tool> |