Mercurial > repos > imgteam > repeat_channels
comparison repeat_channels.py @ 0:7cdb50fee601 draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/repeat_channels/ commit 60cf803236ef94f414056823688e6fd008b7a1b6
author | imgteam |
---|---|
date | Thu, 25 Apr 2024 10:57:53 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7cdb50fee601 |
---|---|
1 import argparse | |
2 | |
3 import giatools.io | |
4 import numpy as np | |
5 import skimage.io | |
6 | |
7 | |
8 if __name__ == '__main__': | |
9 | |
10 parser = argparse.ArgumentParser() | |
11 parser.add_argument('input', type=str) | |
12 parser.add_argument('count', type=int) | |
13 parser.add_argument('output', type=str) | |
14 args = parser.parse_args() | |
15 | |
16 im = giatools.io.imread(args.input) | |
17 im = np.squeeze(im) | |
18 im = np.dstack([im] * args.count) | |
19 skimage.io.imsave(args.output, im) |