diff 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
line wrap: on
line diff
--- a/landmark_registration.xml	Sat Feb 26 17:14:05 2022 +0000
+++ b/landmark_registration.xml	Mon Jul 18 18:41:19 2022 +0000
@@ -1,5 +1,5 @@
-<tool id="ip_landmark_registration" name="Landmark Registration" version="0.0.4" profile="20.05">
-    <description>estimates the affine transformation matrix</description>
+<tool id="ip_landmark_registration" name="Landmark Registration" version="0.0.5" profile="20.05">
+    <description>estimates the affine transformation matrix or performs piecewise affine transformation</description>
     <requirements>
         <requirement type="package" version="0.18.1">scikit-image</requirement>
         <requirement type="package" version="1.6.2">scipy</requirement>
@@ -9,58 +9,69 @@
     <command detect_errors="aggressive">
     <![CDATA[ 
         python '$__tool_directory__/landmark_registration.py'
-        '$fn_pts1'
-        '$fn_pts2'
-        '$fn_tmat'
-        #if '$algo_option.algo' == 'ransac':
-            --res_th $algo_option.res_thr
-            --max_ite $algo_option.max_iter
+        '$fn_lmkmov'
+        '$fn_lmkfix'
+        '$fn_out'
+        #if $algo_option.algo == "pwat"
+        --pwlt '$algo_option.fn_ptsmov'
+        #elif $algo_option.algo == "ransac"
+        --res_th $algo_option.res_th
+        --max_ite $algo_option.max_ite
         #end if
-]]></command>
+    ]]>
+    </command>
     <inputs>
-        <param name="fn_pts1" type="data" format="tabular" label="Coordinates of SRC landmarks (tsv file)" />
-        <param name="fn_pts2" type="data" format="tabular" label="Coordinates of DST landmarks (tsv file)" />
+        <param name="fn_lmkmov" type="data" format="tabular" label="Coordinates of moving landmarks (tsv file)" />
+        <param name="fn_lmkfix" type="data" format="tabular" label="Coordinates of fixed landmarks (tsv file)" />
         <conditional name="algo_option">
             <param name="algo" type="select" label="Select the algorithm">
-                <option value="ransac" selected="True">RANSAC</option>
-                <option value="ls">Least Squares</option>
+                <option value="ransac">Affine Transformation (based on RANSAC)</option>
+                <option value="ls">Affine Transformation (based on Least Squares)</option>
+                <option value="pwat" selected="True">Piecewise Affine Transformation</option>
             </param>
             <when value="ransac">
-                <param name="res_thr" type="float" value="2.0" label="Maximum distance for a data point to be classified as an inlier." />
-                <param name="max_iter" type="integer" value="100" label="Maximum number of iterations for random sample selection." />
+                <param name="res_th" type="float" value="2.0" label="Maximum distance for a data point to be classified as an inlier." />
+                <param name="max_ite" type="integer" value="100" label="Maximum number of iterations for random sample selection." />
             </when>
             <when value="ls"></when>
+            <when value="pwat">
+                <param name="fn_ptsmov" type="data" format="tabular" label="Coordinates of points to be transformed (tsv file)" />
+            </when>
         </conditional>
     </inputs>
     <outputs>
-        <data format="tabular" name="fn_tmat" />
+        <data format="tabular" name="fn_out" />
     </outputs>
     <tests>
         <test>
-            <param name="fn_pts1" value="points_moving.tsv"/>
-            <param name="fn_pts2" value="points_fixed.tsv"/>
-            <conditional name="algo_option">
-                <param name="algo" value="ls"/>
-            </conditional>
-            <output name="fn_tmat" value="tmat.tsv" ftype="tabular" compare="diff" lines_diff="6"/>
+            <param name="fn_lmkmov" value="points_moving.tsv"/>
+            <param name="fn_lmkfix" value="points_fixed.tsv"/>
+            <param name="algo" value="ls"/>
+            <output name="fn_out" value="tmat.tsv" ftype="tabular" compare="diff" lines_diff="6"/>
         </test>
         <test>
-            <param name="fn_pts1" value="points_moving.tsv"/>
-            <param name="fn_pts2" value="points_fixed.tsv"/>
-            <conditional name="algo_option">
-                <param name="algo" value="ransac"/>
-                <param name="res_thr" value="2"/>
-                <param name="max_iter" value="100"/>
-            </conditional>
-            <output name="fn_tmat" value="tmat.tsv" ftype="tabular" compare="diff" lines_diff="6"/>
+            <param name="fn_lmkmov" value="points_moving.tsv"/>
+            <param name="fn_lmkfix" value="points_fixed.tsv"/>
+            <param name="algo" value="ransac"/>
+            <param name="res_th" value="2.0"/>
+            <param name="max_ite" value="100"/>
+            <output name="fn_out" value="tmat.tsv" ftype="tabular" compare="diff" lines_diff="6"/>
+        </test>
+        <test>
+            <param name="fn_lmkmov" value="lmk_mov.tsv"/>
+            <param name="fn_lmkfix" value="lmk_fix.tsv"/>
+            <param name="algo" value="pwat"/>
+            <param name="fn_ptsmov" value="points.tsv"/>
+            <output name="fn_out" value="points_pwlt.tsv" ftype="tabular"/>
         </test>
     </tests>
     <help>
     **What it does**
 
-    This tool estimates the transformation matrix between two sets of 2d points.
+    1) Estimation of the affine transformation matrix between two sets of 2d points; 
+    2) Piecewise affine transformation of points based on landmark pairs.
 
-    About the format of landmark coordinates in the input TSV table: Columns with header "x" and "y" are for x- and y-coordinate, respectively.
+    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.
     </help>
     <citations>
         <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation>