view imagej2_shadows.xml @ 1:c8bb47840c8d draft default tip

"planemo upload for repository commit 2afb24f3c81d625312186750a714d702363012b5"
author imgteam
date Mon, 28 Sep 2020 16:51:33 +0000
parents 7baf811ed973
line wrap: on
line source

<tool id="imagej2_shadows" name="Add shadow effect" version="@WRAPPER_VERSION@.1">
    <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__/'
if [[ $? -ne 0 ]]; then
    cat '$error_log' >&2;
    mv '$output_filename' '$output';
        <expand macro="param_input"/>
        <param name="direction" type="select" label="Direction" help="Light will appear to come from the selected direction">
            <option value="East" selected="True">East</option>
            <option value="North">North</option>
            <option value="Northeast">Northeast</option>
            <option value="Northwest">Northwest</option>
            <option value="South">South</option>
            <option value="Southeast">Southeast</option>
            <option value="Southwest">Southwest</option>
            <option value="West">West</option>
        <data name="output" format_source="input"/>
            <param name="input" value="blobs.gif"/>
            <param name="direction" value="Northwest"/>
            <output name="output" file="blobs_northwest.gif" compare="sim_size"/>

**What it does**


Produces a shadow effect, with light appearing to come from the selected direction (East, North, Northeast,
Northwest, South, Southeast, Southwest and West). The underlying commands use Convolve 3 × 3, ImageJ’s 3 × 3
convolution function.


    <expand macro="fiji_headless_citations"/>