comparison landmark_registration.xml @ 4:aee73493bf53 draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/landmark_registration/ commit ba383a4f617791d0c84737a179e5b4b66cecc334
author imgteam
date Mon, 18 Jul 2022 18:41:19 +0000
parents 9ccd642e7ae2
children 12997d4c5b00
comparison
equal deleted inserted replaced
3:9ccd642e7ae2 4:aee73493bf53
1 <tool id="ip_landmark_registration" name="Landmark Registration" version="0.0.4" profile="20.05"> 1 <tool id="ip_landmark_registration" name="Landmark Registration" version="0.0.5" profile="20.05">
2 <description>estimates the affine transformation matrix</description> 2 <description>estimates the affine transformation matrix or performs piecewise affine transformation</description>
3 <requirements> 3 <requirements>
4 <requirement type="package" version="0.18.1">scikit-image</requirement> 4 <requirement type="package" version="0.18.1">scikit-image</requirement>
5 <requirement type="package" version="1.6.2">scipy</requirement> 5 <requirement type="package" version="1.6.2">scipy</requirement>
6 <requirement type="package" version="1.2.4">pandas</requirement> 6 <requirement type="package" version="1.2.4">pandas</requirement>
7 <requirement type="package" version="1.20.2">numpy</requirement> 7 <requirement type="package" version="1.20.2">numpy</requirement>
8 </requirements> 8 </requirements>
9 <command detect_errors="aggressive"> 9 <command detect_errors="aggressive">
10 <![CDATA[ 10 <![CDATA[
11 python '$__tool_directory__/landmark_registration.py' 11 python '$__tool_directory__/landmark_registration.py'
12 '$fn_pts1' 12 '$fn_lmkmov'
13 '$fn_pts2' 13 '$fn_lmkfix'
14 '$fn_tmat' 14 '$fn_out'
15 #if '$algo_option.algo' == 'ransac': 15 #if $algo_option.algo == "pwat"
16 --res_th $algo_option.res_thr 16 --pwlt '$algo_option.fn_ptsmov'
17 --max_ite $algo_option.max_iter 17 #elif $algo_option.algo == "ransac"
18 --res_th $algo_option.res_th
19 --max_ite $algo_option.max_ite
18 #end if 20 #end if
19 ]]></command> 21 ]]>
22 </command>
20 <inputs> 23 <inputs>
21 <param name="fn_pts1" type="data" format="tabular" label="Coordinates of SRC landmarks (tsv file)" /> 24 <param name="fn_lmkmov" type="data" format="tabular" label="Coordinates of moving landmarks (tsv file)" />
22 <param name="fn_pts2" type="data" format="tabular" label="Coordinates of DST landmarks (tsv file)" /> 25 <param name="fn_lmkfix" type="data" format="tabular" label="Coordinates of fixed landmarks (tsv file)" />
23 <conditional name="algo_option"> 26 <conditional name="algo_option">
24 <param name="algo" type="select" label="Select the algorithm"> 27 <param name="algo" type="select" label="Select the algorithm">
25 <option value="ransac" selected="True">RANSAC</option> 28 <option value="ransac">Affine Transformation (based on RANSAC)</option>
26 <option value="ls">Least Squares</option> 29 <option value="ls">Affine Transformation (based on Least Squares)</option>
30 <option value="pwat" selected="True">Piecewise Affine Transformation</option>
27 </param> 31 </param>
28 <when value="ransac"> 32 <when value="ransac">
29 <param name="res_thr" type="float" value="2.0" label="Maximum distance for a data point to be classified as an inlier." /> 33 <param name="res_th" type="float" value="2.0" label="Maximum distance for a data point to be classified as an inlier." />
30 <param name="max_iter" type="integer" value="100" label="Maximum number of iterations for random sample selection." /> 34 <param name="max_ite" type="integer" value="100" label="Maximum number of iterations for random sample selection." />
31 </when> 35 </when>
32 <when value="ls"></when> 36 <when value="ls"></when>
37 <when value="pwat">
38 <param name="fn_ptsmov" type="data" format="tabular" label="Coordinates of points to be transformed (tsv file)" />
39 </when>
33 </conditional> 40 </conditional>
34 </inputs> 41 </inputs>
35 <outputs> 42 <outputs>
36 <data format="tabular" name="fn_tmat" /> 43 <data format="tabular" name="fn_out" />
37 </outputs> 44 </outputs>
38 <tests> 45 <tests>
39 <test> 46 <test>
40 <param name="fn_pts1" value="points_moving.tsv"/> 47 <param name="fn_lmkmov" value="points_moving.tsv"/>
41 <param name="fn_pts2" value="points_fixed.tsv"/> 48 <param name="fn_lmkfix" value="points_fixed.tsv"/>
42 <conditional name="algo_option"> 49 <param name="algo" value="ls"/>
43 <param name="algo" value="ls"/> 50 <output name="fn_out" value="tmat.tsv" ftype="tabular" compare="diff" lines_diff="6"/>
44 </conditional>
45 <output name="fn_tmat" value="tmat.tsv" ftype="tabular" compare="diff" lines_diff="6"/>
46 </test> 51 </test>
47 <test> 52 <test>
48 <param name="fn_pts1" value="points_moving.tsv"/> 53 <param name="fn_lmkmov" value="points_moving.tsv"/>
49 <param name="fn_pts2" value="points_fixed.tsv"/> 54 <param name="fn_lmkfix" value="points_fixed.tsv"/>
50 <conditional name="algo_option"> 55 <param name="algo" value="ransac"/>
51 <param name="algo" value="ransac"/> 56 <param name="res_th" value="2.0"/>
52 <param name="res_thr" value="2"/> 57 <param name="max_ite" value="100"/>
53 <param name="max_iter" value="100"/> 58 <output name="fn_out" value="tmat.tsv" ftype="tabular" compare="diff" lines_diff="6"/>
54 </conditional> 59 </test>
55 <output name="fn_tmat" value="tmat.tsv" ftype="tabular" compare="diff" lines_diff="6"/> 60 <test>
61 <param name="fn_lmkmov" value="lmk_mov.tsv"/>
62 <param name="fn_lmkfix" value="lmk_fix.tsv"/>
63 <param name="algo" value="pwat"/>
64 <param name="fn_ptsmov" value="points.tsv"/>
65 <output name="fn_out" value="points_pwlt.tsv" ftype="tabular"/>
56 </test> 66 </test>
57 </tests> 67 </tests>
58 <help> 68 <help>
59 **What it does** 69 **What it does**
60 70
61 This tool estimates the transformation matrix between two sets of 2d points. 71 1) Estimation of the affine transformation matrix between two sets of 2d points;
72 2) Piecewise affine transformation of points based on landmark pairs.
62 73
63 About the format of landmark coordinates in the input TSV table: Columns with header "x" and "y" are for x- and y-coordinate, respectively. 74 About the format of landmark/point coordinates in the input TSV table: Columns with header "x" and "y" are for x- and y-coordinate, respectively.
64 </help> 75 </help>
65 <citations> 76 <citations>
66 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> 77 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation>
67 </citations> 78 </citations>
68 </tool> 79 </tool>