# HG changeset patch # User imgteam # Date 1714042673 0 # Node ID 7cdb50fee60116fe71d9aff53048eb83b6e3656e planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/repeat_channels/ commit 60cf803236ef94f414056823688e6fd008b7a1b6 diff -r 000000000000 -r 7cdb50fee601 creators.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/creators.xml Thu Apr 25 10:57:53 2024 +0000 @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 7cdb50fee601 repeat_channels.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/repeat_channels.py Thu Apr 25 10:57:53 2024 +0000 @@ -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 -r 000000000000 -r 7cdb50fee601 repeat_channels.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/repeat_channels.xml Thu Apr 25 10:57:53 2024 +0000 @@ -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 -r 000000000000 -r 7cdb50fee601 test-data/input1.tif Binary file test-data/input1.tif has changed diff -r 000000000000 -r 7cdb50fee601 test-data/input1_c3.tif Binary file test-data/input1_c3.tif has changed diff -r 000000000000 -r 7cdb50fee601 tests.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests.xml Thu Apr 25 10:57:53 2024 +0000 @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +