diff imagej2_create_image.xml @ 1:1a7c29d5fc11 draft default tip

"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:43:06 +0000
parents dc3935a0165a
children
line wrap: on
line diff
--- a/imagej2_create_image.xml	Tue Sep 17 16:57:52 2019 -0400
+++ b/imagej2_create_image.xml	Mon Sep 28 16:43:06 2020 +0000
@@ -1,51 +1,55 @@
-<?xml version='1.0' encoding='UTF-8'?>
 <tool id="imagej2_create_image" name="Create new image" version="@WRAPPER_VERSION@.0">
     <description></description>
     <macros>
         <import>imagej2_macros.xml</import>
     </macros>
-    <expand macro="fiji_requirements" />
-    <command>
-<![CDATA[
-    python $__tool_directory__/imagej2_create_image.py
-    --width $width
-    --height $height
-    --depth $depth
-    --image_type $image_type
-    --image_title "$image_title"
-    --jython_script $__tool_directory__/imagej2_create_image_jython_script.py
-    --output_datatype $output_datatype
-    --out_fname "$output"
-]]>
-    </command>
+    <expand macro="fiji_requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+#set output_log = '$output_log.txt'
+#set output_name = '.'.join(['new_image', str($output_datatype)])
+ImageJ --ij2 --headless --debug
+--jython '$__tool_directory__/imagej2_create_image_jython_script.py'
+'$image_title'
+$width
+$height
+$depth
+'$image_type'
+'$output_name'
+&>'$output_log';
+if [[ $? -ne 0 ]]; then
+    cat '$output_log' >&2;
+else
+    mv '$output_name' '$output';
+fi
+]]></command>
     <inputs>
-        <expand macro="image_type" />
-        <param name="image_title" type="text" label="Image title" help="Leave blank for no title" />
-        <param name="width" type="integer" value="512" min="1" label="Image width in pixels" />
-        <param name="height" type="integer" value="512" min="1" label="Image height in pixels" />
-        <param name="depth" type="integer" value="1" min="1" label="Image depth" help="Specifies the number of stack slices" />
+        <expand macro="image_type"/>
+        <param name="image_title" type="text" label="Image title" help="Leave blank for no title"/>
+        <param name="width" type="integer" value="512" min="1" label="Image width in pixels"/>
+        <param name="height" type="integer" value="512" min="1" label="Image height in pixels"/>
+        <param name="depth" type="integer" value="1" min="1" label="Image depth" help="Specifies the number of stack slices"/>
         <param name="output_datatype" type="select" label="Save as format">
-            <expand macro="image_datatypes" />
+            <expand macro="image_datatypes"/>
         </param>
     </inputs>
     <outputs>
         <data name="output" format="jpg">
             <actions>
                 <action type="format">
-                    <option type="from_param" name="output_datatype" />
+                    <option type="from_param" name="output_datatype"/>
                  </action>
            </actions>
        </data>
     </outputs>
     <tests>
         <test>
-            <param name="image_type" value="8-bit_ramp" />
-            <param name="image_title" value="MyTitle" />
-            <param name="width" value="256" />
-            <param name="height" value="256" />
-            <param name="depth" value="1" />
-            <param name="output_datatype" value="jpg" />
-            <output name="output" file="create_image1.jpg" ftype="jpg" />
+            <param name="image_type" value="8-bit_ramp"/>
+            <param name="image_title" value="MyTitle"/>
+            <param name="width" value="256"/>
+            <param name="height" value="256"/>
+            <param name="depth" value="1"/>
+            <param name="output_datatype" value="jpg"/>
+            <output name="output" file="create_image1.jpg" ftype="jpg"/>
         </test>
     </tests>
     <help>
@@ -63,5 +67,5 @@
 ]]>
 
     </help>
-    <expand macro="fiji_headless_citations" />
+    <expand macro="fiji_headless_citations"/>
 </tool>