Mercurial > repos > imgteam > scale_image
comparison scale_image.xml @ 0:c4c76f1ebad2 draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/scale_image/ commit c3f4b766f03770f094fda6bda0a5882c0ebd4581
author | imgteam |
---|---|
date | Sat, 09 Feb 2019 14:46:03 -0500 |
parents | |
children | 3e4231ed875e |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c4c76f1ebad2 |
---|---|
1 <tool id="ip_scale_image" name="Scale Image" version="0.2"> | |
2 <description>Scales image</description> | |
3 <requirements> | |
4 <requirement type="package" version="0.14.2">scikit-image</requirement> | |
5 <requirement type="package" version="1.15.4">numpy</requirement> | |
6 </requirements> | |
7 <command> | |
8 <![CDATA[ | |
9 python '$__tool_directory__/scale_image.py' '$input' ./out.png | |
10 #if $use_scale_option.use_scale == 'true' | |
11 $use_scale_option.scale | |
12 #else if $use_scale_option.use_scale == 'false' | |
13 '[$use_scale_option.scale_x, $use_scale_option.scale_y]' | |
14 #end if | |
15 $order | |
16 | |
17 ]]> | |
18 </command> | |
19 <inputs> | |
20 <param name="input" type="data" format="png" label="Image file"/> | |
21 <conditional name="use_scale_option"><!--a third option (using one integer as percentage scaling) could still be implemented--> | |
22 <param label="Lock scaling between image dimensions" name="use_scale" type="select"> | |
23 <option selected="true" value="true">Lock</option> | |
24 <option value="false">Individual scales</option> | |
25 </param> | |
26 <when value="true"> | |
27 <param name="scale" type="float" value="1.0" label="Scaling factor" /> | |
28 </when> | |
29 <when value="false"> | |
30 <param name="scale_x" type="integer" value="100" label="New height of the image in pixels" /> | |
31 <param name="scale_y" type="integer" value="100" label="New width of the image in pixels" /> | |
32 </when> | |
33 </conditional> | |
34 <param name="order" type="select" label="Interpolation method"> | |
35 <option value="0">Nearest-neighbor</option> | |
36 <option value="1" selected="true">Bi-linear</option> | |
37 <option value="2">Bi-cubic</option> | |
38 </param> | |
39 </inputs> | |
40 <outputs> | |
41 <data format="png" name="output" from_work_dir="out.png"/> | |
42 </outputs> | |
43 <tests> | |
44 <test> | |
45 <param name="input" value="sample1.png"/> <!--continue here--> | |
46 <param name="use_scale_option.use_scale" value="false"/> | |
47 <param name="use_scale_option.scale_x" value="200"/> | |
48 <param name="use_scale_option.scale_y" value="150"/> | |
49 <param name="order" value="0"/> | |
50 <output name="output" value="out2.png" ftype="png" compare="sim_size"/> | |
51 </test> | |
52 </tests> | |
53 <help> | |
54 **What it does** | |
55 | |
56 This tool scales an image using the scaling factor. | |
57 </help> | |
58 <citations> | |
59 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> | |
60 </citations> | |
61 </tool> |