From a91215fd31871dffa74f480240d31be4d96fe943 Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Thu, 25 Apr 2024 09:26:43 +0200 Subject: [PATCH 1/3] Update `voronoi_tessellation` tool UI --- tools/voronoi_tessellation/voronoi_tessellation.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/voronoi_tessellation/voronoi_tessellation.xml b/tools/voronoi_tessellation/voronoi_tessellation.xml index 1e949cc3..b4f801b4 100644 --- a/tools/voronoi_tessellation/voronoi_tessellation.xml +++ b/tools/voronoi_tessellation/voronoi_tessellation.xml @@ -3,7 +3,7 @@ creators.xml 0.22.0 - 2 + 3 operation_3443 @@ -31,7 +31,7 @@ ]]> - + @@ -54,7 +54,7 @@ - **Computes Voronoi tessellations for labeled images.** + **Computes Voronoi tessellations for label maps (labeled images).** Voronoi tessellations are also known as Vornoi diagrams, or Dirichlet tessellations. Zero labels are treated as image background. From 0e7796234f46c8328f543af6b7e79dabeb1053fe Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Thu, 25 Apr 2024 09:28:52 +0200 Subject: [PATCH 2/3] Update `overlay_images` tool UI --- tools/overlay_images/overlay_images.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/overlay_images/overlay_images.xml b/tools/overlay_images/overlay_images.xml index 289834ed..31bb5a12 100644 --- a/tools/overlay_images/overlay_images.xml +++ b/tools/overlay_images/overlay_images.xml @@ -4,7 +4,7 @@ creators.xml tests.xml 0.0.4 - 2 + 3 @@ -51,13 +51,13 @@ - - + + - - - + + + From 50c4ea6b35090aac53dcad3c3634bd95986e4493 Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Thu, 25 Apr 2024 10:44:25 +0200 Subject: [PATCH 3/3] Add `repeat_channels` tool --- tools/repeat_channels/.shed.yml | 8 +++ tools/repeat_channels/creators.xml | 1 + tools/repeat_channels/repeat_channels.py | 19 ++++++ tools/repeat_channels/repeat_channels.xml | 61 ++++++++++++++++++ tools/repeat_channels/test-data/input1.tif | Bin 0 -> 70481 bytes tools/repeat_channels/test-data/input1_c3.tif | Bin 0 -> 210947 bytes tools/repeat_channels/tests.xml | 1 + 7 files changed, 90 insertions(+) create mode 100644 tools/repeat_channels/.shed.yml create mode 120000 tools/repeat_channels/creators.xml create mode 100644 tools/repeat_channels/repeat_channels.py create mode 100644 tools/repeat_channels/repeat_channels.xml create mode 100644 tools/repeat_channels/test-data/input1.tif create mode 100644 tools/repeat_channels/test-data/input1_c3.tif create mode 120000 tools/repeat_channels/tests.xml diff --git a/tools/repeat_channels/.shed.yml b/tools/repeat_channels/.shed.yml new file mode 100644 index 00000000..a9ea49f4 --- /dev/null +++ b/tools/repeat_channels/.shed.yml @@ -0,0 +1,8 @@ +categories: + - Imaging +description: Convert single-channel to multi-channel image +long_description: This tools converts a single-channel image to a multi-channel image by repeating the channel multiple times. +name: repeat_channels +owner: imgteam +homepage_url: https://github.com/bmcv +remote_repository_url: https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/repeat_channels/ diff --git a/tools/repeat_channels/creators.xml b/tools/repeat_channels/creators.xml new file mode 120000 index 00000000..5d2b71e0 --- /dev/null +++ b/tools/repeat_channels/creators.xml @@ -0,0 +1 @@ +../../macros/creators.xml \ No newline at end of file diff --git a/tools/repeat_channels/repeat_channels.py b/tools/repeat_channels/repeat_channels.py new file mode 100644 index 00000000..2ce499c1 --- /dev/null +++ b/tools/repeat_channels/repeat_channels.py @@ -0,0 +1,19 @@ +import argparse + +import giatools.io +import numpy as np +import skimage.io + + +if __name__ == '__main__': + + parser = argparse.ArgumentParser() + parser.add_argument('input', type=str) + parser.add_argument('count', type=int) + parser.add_argument('output', type=str) + args = parser.parse_args() + + im = giatools.io.imread(args.input) + im = np.squeeze(im) + im = np.dstack([im] * args.count) + skimage.io.imsave(args.output, im) diff --git a/tools/repeat_channels/repeat_channels.xml b/tools/repeat_channels/repeat_channels.xml new file mode 100644 index 00000000..6350e499 --- /dev/null +++ b/tools/repeat_channels/repeat_channels.xml @@ -0,0 +1,61 @@ + + with NumPy + + creators.xml + tests.xml + 1.26.4 + 0 + + + + + + operation_3443 + + + galaxy_image_analysis + + + numpy + scikit-image + giatools + + + + + + + + + + + + + + + + + + + + **Convert single-channel to multi-channel image.** + + This tools converts a single-channel image to a multi-channel image by repeating the channel multiple times. + + + + 10.1038/s41586-020-2649-2 + + diff --git a/tools/repeat_channels/test-data/input1.tif b/tools/repeat_channels/test-data/input1.tif new file mode 100644 index 0000000000000000000000000000000000000000..4ddc063fb22beb31008acd56a3a059537c77b47a GIT binary patch literal 70481 zcmeHQON(7a5WbVBC`drT2)dY%m52xmy6_)l=~`U4$Y8)lKsO@(rtJJRE?xQ`#&hqS zM?b2ntGcV|oN;Pk=62WXdvu>WlQ6~?FFrrLdpez-oK9D7ovxWd^W%B_{fAelPp;m+%>R4p{d8XcGp#>M zdcT_HzdyzPoj%VWe?0&7=bv7`eE!|DAHM$fn=hVCUw-`aE|q*evrIpKdv$Yj^XiwE zU%vi5sfuMd5DtU`;XpVL4uk{YKsXQ%gahF~I1mnm1K~h85DtU`;XpVL4uk{YKsXQ% zgahF~I1mnm1K~h85DtU`;XpVL4jkKo>*ZsjnJkY@T94iJ^<~zgynfY#I_9KWF&;Ul zf?-y;U_3JndZ+=oPEO`fQo6}-l(uWS;g8bTmdLF*ilQzaT#>B0E(V8aV#$*f9YU3u zghU~~R!n2}2EI07VWBKsGw@PO>uc^hCY5t1JYD_HoQRuNb^OqDglHv zl##XEq@cVtOCGaG#X=&OZ*`jLB2~E89|zlCS?aKuSS8-2^%L!NHi&zChS0w!-&lqlN+&(7p;WnD=(+m zJSZcmw@V8nDC4P|{D`F;6uN;E6daY4%97Vp=m#=_{R@?H2j&i6BPcXF*Da9UNa3qr z2?~tPvGw#95(Expg#EKY{TDCVMi8DiQ~f8+@5D(cJAnhWGkiG%l_(8eBTyJtVn83e z6(#b}j6i?Bd~il!P8`VykMA4!cMer2&?k_WU_a?Yg$S1;8R2s!;DIH)8nFm>3QnHMbdXLiI*y7~$f?y)a@YCvrO z+G|=m2CP$RfL5eO#&}Q7YL%d~r~&B6xTMYr6)he8>y&Cf8R!(D(N^(VCFm@w`9wfN zPxp+HmyY~oN(q4PyEUjZmb?-PI?ECO+pDM<7*g`mQJ+pJ5y1U`0;SfHRw_YfT_Qkx zB{3soN?JPNvneG+y&n;v)?3iZBuCG=qadeH>xyc{I1-oDY(lZ;H-pdPpp+51HE zL~n0zn>C6B+bJQ(s2bkTnoq{$gR2u8HC4sfuobR#mKPs9uf)pC@aM|Rl^L*M#GMbG zSHj(h`Hg}$V)4Q8N~}g?$7Z{kFi9U)8$55s`irNw+KcIw5s3}|eTCjTy>nUwB^hMplTap%1_Fqvc&ZlEL+vU^h68utp)E9&rhTGC%{Ona7e(+D+CW2DIwTs@eA5nkaR^_jBpOcABSTX2 zO?t@1F?_XBXgEio48_eg=OY(KaTQB|;S9Yp1Ub)?ms}jjQ!S2#^YhE#>>M+Ga&aU_ zxhNFQ&NGA3^GkTj#j*VKVn{eQ-wejjE$%B9M{^U50O8EMGYCPiu(wiC(!^5#cGEfz|bkQgIE&MNp=N8lG-I%QFICHBDDePBD@4?aM~wbl62Vb zBeaR?pgf0YGTN;m=V`s$O(p}_T6;R5L1)L3l&S4{N0B^eTlwpB9+_RMR<4$dT@`Y{ zEe)7wbE)iHXYIt!@+9!4R!E5KUu$Q@{@P>=telXsI6}3F6Gspx=b&$eoWnsnbgeju zs6HBcR`lT?s7u9)1L+x|GUmky@&SAM%s8MB4N4+2Gyo4hgXPAd6)2LU%}@loFQXPi zX1+W88&dbhso)t7gahF~I1mnm1K~h85DtU`;XpVL4uk{YKsXQ%gahF~I1mnm1K~h8 F@E>a&-+=%C literal 0 HcmV?d00001 diff --git a/tools/repeat_channels/test-data/input1_c3.tif b/tools/repeat_channels/test-data/input1_c3.tif new file mode 100644 index 0000000000000000000000000000000000000000..b3307345e669603ef87cc6e1f88dffc088b64781 GIT binary patch literal 210947 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2tWV=5P$## zAOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;| ufB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOL|D0{;i5;(uTO literal 0 HcmV?d00001 diff --git a/tools/repeat_channels/tests.xml b/tools/repeat_channels/tests.xml new file mode 120000 index 00000000..e20d710a --- /dev/null +++ b/tools/repeat_channels/tests.xml @@ -0,0 +1 @@ +../../macros/tests.xml \ No newline at end of file