comparison imagej2_bunwarpj_raw_transform.xml @ 1:aa4a5a8c4cfd 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:39:18 +0000
parents 95b7592729e2
children eabdcf6ad900
comparison
equal deleted inserted replaced
0:95b7592729e2 1:aa4a5a8c4cfd
1 <?xml version='1.0' encoding='UTF-8'?> 1 <tool id="imagej2_bunwarpj_raw_transform" name="Apply raw transformation" version="@WRAPPER_VERSION@.1">
2 <tool id="imagej2_bunwarpj_raw_transform" name="Apply raw transformation" version="@WRAPPER_VERSION@.0">
3 <description>with bUnwarpJ</description> 2 <description>with bUnwarpJ</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_bunwarpj_raw_transform.py 9 #set error_log = 'output_log.txt'
11 --target_image "$target_image" 10 touch '$error_log' &&
12 --target_image_format $target_image.ext 11
13 --source_image "$source_image" 12 ## ImageJ2 requires file extensions to be valid image data types.
14 --source_image_format $source_image.ext 13 #set source_sans_ext = $os.path.splitext($os.path.basename($source_image.file_name))[0]
15 --raw_transformation $raw_transformation 14 #set source_with_ext = '.'.join([source_sans_ext, $source_image.ext])
16 --source_out "$source_out" 15 ln -s '$source_image.file_name' '$source_with_ext' &&
17 --source_out_datatype $source_out_datatype 16 #set target_sans_ext = $os.path.splitext($os.path.basename($target_image.file_name))[0]
18 --jython_script $__tool_directory__/imagej2_bunwarpj_raw_transform_jython_script.py 17 #set target_with_ext = '.'.join([target_sans_ext, $target_image.ext])
19 ]]> 18 ln -s '$target_image.file_name' '$target_with_ext' &&
20 </command> 19
20 bunwarpj -raw_transform
21 '$target_with_ext'
22 '$source_with_ext'
23 '$raw_transformation'
24 '$source_out'
25 &>'$error_log';
26 if [[ $? -ne 0 ]]; then
27 cat '$error_log' >&2;
28 fi
29 ]]></command>
21 <inputs> 30 <inputs>
22 <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="target_image" type="data" label="Target image"/> 31 <expand macro="param_target_image"/>
23 <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="source_image" type="data" label="Source image"/> 32 <expand macro="param_source_image"/>
24 <!-- Support for a bUnwarpJ raw transformation datatype should be added to Galaxy --> 33 <!-- Support for a bUnwarpJ raw transformation datatype should be added to Galaxy -->
25 <param format="txt" name="raw_transformation" type="data" label="Elastic transformation" help="As saved by bUnwarpJ in raw format"/> 34 <param format="txt" name="raw_transformation" type="data" label="Raw transformation" help="As saved by bUnwarpJ in raw format"/>
26 <param name="source_out_datatype" type="select" label="Save registered source image as format"> 35 <param name="source_out_datatype" type="select" label="Save registered source image as format">
27 <expand macro="image_datatypes" /> 36 <expand macro="image_datatypes"/>
28 </param> 37 </param>
29 </inputs> 38 </inputs>
30 <outputs> 39 <outputs>
31 <data name="source_out" format="png" label="${tool.name} on ${on_string}: Registered source image"> 40 <data name="source_out" format="png">
32 <actions> 41 <actions>
33 <action type="format"> 42 <action type="format">
34 <option type="from_param" name="source_out_datatype" /> 43 <option type="from_param" name="source_out_datatype"/>
35 </action> 44 </action>
36 </actions> 45 </actions>
37 </data> 46 </data>
38 </outputs> 47 </outputs>
39 <tests> 48 <tests>
40 <test> 49 <test>
41 <param name="target_image" value="dotblot.jpg" /> 50 <expand macro="test_target_source_images"/>
42 <param name="source_image" value="blobs.gif" /> 51 <param name="raw_transformation" value="source_raw_transformation.txt"/>
43 <param name="raw_transformation" value="source_raw_transformation.txt" /> 52 <param name="source_out_datatype" value="png"/>
44 <param name="source_out_datatype" value="png" /> 53 <output name="source_out" file="raw_trans_registered_source1.png" compare="sim_size"/>
45 <output name="source_out" file="raw_trans_registered_source1.png" compare="sim_size" />
46 </test> 54 </test>
47 </tests> 55 </tests>
48 <help> 56 <help>
49 **What it does** 57 **What it does**
50 58
54 with the **Convert elastic transformation to raw with bUnwarpJ** tool. 62 with the **Convert elastic transformation to raw with bUnwarpJ** tool.
55 63
56 ]]> 64 ]]>
57 65
58 </help> 66 </help>
59 <expand macro="bunwarpj_citations" /> 67 <expand macro="bunwarpj_citations"/>
60 </tool> 68 </tool>