view background_removal.xml @ 1:6e9e98a7be4e draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/background_removal commit 649a1e6ecb925bed885a8477fe82dfd9dfea8baa
author imgteam
date Tue, 30 Jul 2024 08:08:50 +0000
parents e2c6bedc6b73
children
line wrap: on
line source

<tool id="background_removal" name="Remove image background" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05">
        <description>with scikit-image</description>  
    <macros>  
        <import>creators.xml</import>
        <import>tests.xml</import>
        <token name="@TOOL_VERSION@">0.24.0</token>  
        <token name="@VERSION_SUFFIX@">1</token>  
    </macros>  
    <creator>
        <expand macro="creators/rmassei"/>
    </creator>
    <requirements>
        <requirement type="package" version="0.24.0">scikit-image</requirement>
    </requirements>
    <command detect_errors="aggressive">
        <![CDATA[
        python "$__tool_directory__/background_removal.py" $input_image $filter $radius $output
        ]]>
    </command>
    <inputs>
        <param name="input_image" type="data" format="tiff, jpg, jpeg, png, tif" label="Input Image"/>
        <param name="filter" type="select" label="Method">
            <option value="rolling_ball">Rolling-ball algorithm</option>
            <option value="dog">Difference of Gaussians</option>
            <option value="top_hat">Top-hat filter</option>
        </param>
        <param name="radius" type="float" label="Radius" value="20" help="The radius of the local neighborhood (in pixels)."/>
    </inputs>
    <outputs>
        <data name="output" format="tiff" label="Background substraction output"/>
    </outputs>
    <tests>
        <!-- uint8 tests -->  
        <test>  
            <param name="input_image" value="input1_uint8.tif"/>  
            <param name="filter" value="dog"/>  
            <param name="radius" value="20"/>  
            <expand macro="tests/intensity_image_diff" name="output" value="input1_output_dog.tif" ftype="tiff"/>  
        </test> 
        <test>
            <param name="input_image" value="input3_uint8.tif"/>
            <param name="filter" value="top_hat"/>
            <param name="radius" value="15"/>
            <expand macro="tests/intensity_image_diff" name="output" value="input3_output_tophat.tif" ftype="tiff"/>
        </test>
        <!-- uint16 tests -->  
        <test>  
            <param name="input_image" value="input2_uint16.tif"/>
            <param name="filter" value="rolling_ball"/>
            <param name="radius" value="20"/>
            <expand macro="tests/intensity_image_diff" name="output" value="input2_output_rb.tif" ftype="tiff"/>
        </test>
        <test>
            <param name="input_image" value="input2_uint16.tif"/>
            <param name="filter" value="dog"/>
            <param name="radius" value="20"/>
            <expand macro="tests/intensity_image_diff" name="output" value="input2_output_dog.tif" ftype="tiff"/>
        </test>
    </tests>
    <help>
        This tool applies different background removal algorithms to an image:

        - Rolling-ball algorithm

        - Difference of Gaussians

        - Top-hat filter
    </help>
    <citations>
        <citation type="doi">10.1109/MC.1983.1654163</citation>
    </citations>
</tool>