Source code

Download source archive ↓

upstream/tools/image_processing/imagej2/imagej2_find_edges.xml

1<tool id="imagej2_find_edges" name="Find edges" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0">
2    <description>with ImageJ2</description>
3    <macros>
4        <import>imagej2_macros.xml</import>
5    </macros>
6    <edam_operations>
7        <edam_operation>operation_3443</edam_operation>
8    </edam_operations>
9    <xrefs>
10        <xref type="bio.tools">imagej</xref>
11        <xref type="biii">imagej2</xref>
12    </xrefs>
13    <expand macro="fiji_requirements" />
14    <command detect_errors="exit_code"><![CDATA[
15#import os
16#set input_sans_ext = $os.path.splitext($os.path.basename($input.file_name))[0]
17#set input_with_ext = './' + '.'.join([input_sans_ext, $input.ext])
18ln -s '$input.file_name' '$input_with_ext' &&
19#set output_filename = '.'.join(['output', $input.ext])
20touch '$output_filename' &&
21ImageJ --ij2 --headless --debug
22--jython '$__tool_directory__/imagej2_find_edges_jython_script.py'
23'$input_with_ext'
24'$output_filename'
25'$input.ext'
26&& mv '$output_filename' '$output';
27]]></command>
28    <inputs>
29        <expand macro="param_input"/>
30    </inputs>
31    <outputs>
32        <data name="output" format_source="input"/>
33    </outputs>
34    <tests>
35        <test>
36            <param name="input" value="blobs.gif"/>
37            <output name="output" file="blobs_find_edges.gif" compare="image_diff"/>
38        </test>
39    </tests>
40    <help>
41
42**What it does**
43
44Uses a Sobel edge detector to highlight sharp changes in intensity in the active image.
45The two 3x3 convolution kernels shown below are used to generate vertical and horizontal
46derivatives.  The final image is produced by combining the two derivatives using the square
47root of the sum of the squares.
48
49``1  2  1     1  0 -1``
50
51``0  0  0     2  0 -2``
52
53``-1 -2 -1    1  0 -1``
54
55    </help>
56    <expand macro="fiji_headless_citations"/>
57</tool>