view imagej2_analyze_skeleton.xml @ 1:3272e0439968 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:52:29 +0000
parents bb84f130a4e1
children
line wrap: on
line source

<tool id="imagej2_analyze_skeleton" name="Analyze skeleton" version="@WRAPPER_VERSION@.0">
    <description></description>
    <macros>
        <import>imagej2_macros.xml</import>
    </macros>
    <expand macro="fiji_requirements"/>
    <command detect_errors="exit_code"><![CDATA[
#import os
#set error_log = 'output_log.txt'
#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' &&
ImageJ --ij2 --headless --debug
--jython '$__tool_directory__/imagej2_analyze_skeleton_jython_script.py'
'$error_log'
'$input_with_ext'
'$black_background'
'$prune_cycle_method'
'$prune_ends'
'$calculate_largest_shortest_path'
'no'
'$output'
&>'$error_log';
if [[ $? -ne 0 ]]; then
    cat '$error_log' >&2;
fi
]]></command>
    <inputs>
        <expand macro="param_input"/>
        <expand macro="black_background_param"/>
        <param name="prune_cycle_method" type="select" label="Prune cycle method">
            <option value="none" selected="True">None</option>
            <option value="shortest_branch">Shortest branch</option>
            <option value="lowest_intensity_voxel">Lowest intensity voxel</option>
            <option value="lowest_intensity_branch">Lowest intensity branch</option>
        </param>
        <param name="prune_ends" type="select" label="Prune ends">
            <option value="no" selected="True">No</option>
            <option value="yes">Yes</option>
        </param>
        <param name="calculate_largest_shortest_path" type="select" label="Calculate largest shortest path">
            <option value="no" selected="True">No</option>
            <option value="yes">Yes</option>
        </param>
        <!-- TODO: Uncomment this option when the tool has been enhanced to use the
        future "Display labeled skeletons" option.  See http://fiji.sc/AnalyzeSkeleton.
        <param name="show_detailed_info" type="select" label="Show detailed info">
            <option value="no" selected="True">No</option>
            <option value="yes">Yes</option>
        </param>
        -->
    </inputs>
    <outputs>
        <data name="output" format="tabular"/>
    </outputs>
    <tests>
        <test>
            <param name="input" value="skeletonized_blobs.gif"/>
            <output name="output" file="basic.tabular" ftype="tabular"/>
        </test>
        <test>
            <param name="input" value="skeletonized_clown.jpg"/>
            <param name="prune_cycle_method" value="shortest_branch"/>
            <output name="output" file="shortest_branch_basic.tabular" ftype="tabular"/>
        </test>
        <test>
            <param name="input" value="skeletonized_blobs.gif"/>
            <param name="calculate_largest_shortest_path" value="yes"/>
            <output name="output" file="largest_shortest_path_basic.tabular" ftype="tabular"/>
        </test>
        <test>
            <param name="input" value="skeletonized_clown.jpg"/>
            <param name="prune_cycle_method" value="shortest_branch"/>
            <param name="calculate_largest_shortest_path" value="yes"/>
            <output name="output" file="shortest_branch_all_yes.tabular" ftype="tabular"/>
        </test>
    </tests>
    <help>

.. class:: warningmark

The underlying AnalyzeSkeleton Fiji plugin works on binary images, so other image types will
automatically be converted to binary before they are analyzed.  This step is performed using the
ImageJ2 **Make Binary** command with the following settings: **Iterations:** 1, **Count:** 1,
**Black background:** No, **Pad edges when eroding:** No.  If these settings are not appropriate,
first manually convert the image to binary using the **Convert to binary (black and white) with
ImageJ2** tool, which allows you to change them.

.. class:: warningmark

The **Skeletonize images** tool produces skeleton images that can be used as input to this tool.
Images that have not been skeletonized will not result in errors, but the results may or may not
be useful.

**What it does**

<![CDATA[
Tags all pixel/voxels in a skeleton image and then counts all its junctions, triple and quadruple
points and branches, and measures their average and maximum length.  The voxels are classified into
three different categories depending on their 26 neighbors:

- **End-point** voxels: if they have less than 2 neighbors.
- **Junction** voxels: if they have more than 2 neighbors.
- **Slab** voxels: if they have exactly 2 neighbors.

-----

**Options**

- **Prune cycle method**: prune the possible loops in the skeleton.
- **Prune ends**: prunes any branch that ends in an end-point.
- **Calculate largest shortest path**: calculate the largest shortest path of each skeleton using the APSP (all pairs shortest path).
]]>
    </help>
    <citations>
        <citation type="doi">10.1002/jemt.20829</citation>
        <citation type="doi">10.1038/nmeth.2102</citation>
    </citations>
</tool>