view imagej2_watershed_binary.xml @ 2:aeae7e29d525 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2 commit 57a0433defa3cbc37ab34fbb0ebcfaeb680db8d5
author imgteam
date Sun, 05 Nov 2023 10:47:25 +0000
parents 5b154339fd90
children
line wrap: on
line source

<tool id="imagej2_watershed_binary" name="Perform segmentation using watershed transformation" version="@WRAPPER_VERSION@.2">
    <description>with ImageJ2</description>
    <macros>
        <import>imagej2_macros.xml</import>
    </macros>
    <edam_operations>
        <edam_operation>operation_3443</edam_operation>
    </edam_operations>
    <xrefs>
        <xref type="bio.tools">imagej</xref>
        <xref type="biii">imagej2</xref>
    </xrefs>
    <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_watershed_binary_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>
        <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"/>
            <output name="output" file="blobs_watershed_binary.gif" compare="sim_size"/>
        </test>
    </tests>
    <help>
.. class:: warningmark

@requires_binary_input@

**What it does**

<![CDATA[
Watershed segmentation is a way of automatically separating or cutting apart particles that touch.
It first calculates the Euclidian distance map (EDM) and finds the ultimate eroded points (UEPs).
It then dilates each of the UEPs (the peaks or local maxima of the EDM) as far as possible — either
until the edge of the particle is reached, or the edge touches a region of another (growing) UEP.
Watershed segmentation works best for smooth convex objects that don’t overlap too much.
]]>

    </help>
    <expand macro="fiji_headless_citations"/>
</tool>