Mercurial > repos > imgteam > imagej2_skeletonize3d
diff imagej2_skeletonize3d.xml @ 1:768825d9034a 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 17:01:19 +0000 |
parents | f6df6830d5ec |
children | 49b5288dcd8c |
line wrap: on
line diff
--- a/imagej2_skeletonize3d.xml Tue Sep 17 16:57:15 2019 -0400 +++ b/imagej2_skeletonize3d.xml Mon Sep 28 17:01:19 2020 +0000 @@ -1,40 +1,47 @@ -<?xml version='1.0' encoding='UTF-8'?> -<tool id="imagej2_skeletonize3d" name="Skeletonize" version="@WRAPPER_VERSION@.0"> +<tool id="imagej2_skeletonize3d" name="Skeletonize" version="@WRAPPER_VERSION@.1"> <description></description> <macros> <import>imagej2_macros.xml</import> </macros> - <expand macro="fiji_requirements" /> - <command> -<![CDATA[ - python $__tool_directory__/imagej2_skeletonize3d.py - --input "$input" - --input_datatype $input.ext - --black_background $black_background - --jython_script $__tool_directory__/imagej2_skeletonize3d_jython_script.py - --output "$output" - --output_datatype $output.ext -]]> - </command> + <expand macro="fiji_requirements"/> + <command detect_errors="exit_code"><![CDATA[ +#import os +#set error_log = 'output_log.txt' +touch '$error_log' && +#set input_sans_ext = $os.path.splitext($os.path.basename($input.file_name))[0] +#set input_with_ext = '.'.join([input_sans_ext, $input.ext]) +ln -s '$input.file_name' '$input_with_ext' && +#set output_filename = '.'.join(['output', $input.ext]) +touch '$output_filename' && +ImageJ --ij2 --headless --debug +--jython '$__tool_directory__/imagej2_skeletonize3d_jython_script.py' +'$error_log' +'$input_with_ext' +'$black_background' +'$output_filename' +'$input.ext' +&>'$error_log'; +if [[ $? -ne 0 ]]; then + cat '$error_log' >&2; +else + mv '$output_filename' '$output'; +fi +]]></command> <inputs> - <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="input" type="data" label="Select grayscale image"/> - <expand macro="black_background_param" /> + <expand macro="param_input"/> + <expand macro="black_background_param"/> </inputs> <outputs> <data name="output" format_source="input" label="${tool.name} on ${on_string}"/> </outputs> <tests> <test> - <param name="input" value="blobs.gif" /> - <param name="input_datatype" value="gif" /> - <param name="output_datatype" value="gif" /> - <output name="output" file="skeletonized_blobs.gif" compare="sim_size" /> + <param name="input" value="blobs.gif"/> + <output name="output" file="skeletonized_blobs.gif" compare="sim_size"/> </test> <test> - <param name="input" value="clown.jpg" /> - <param name="input_datatype" value="jpg" /> - <param name="output_datatype" value="jpg" /> - <output name="output" file="skeletonized_clown.jpg" compare="sim_size" /> + <param name="input" value="clown.jpg"/> + <output name="output" file="skeletonized_clown.jpg" compare="sim_size"/> </test> </tests> <help>