Mercurial > repos > imgteam > repeat_channels
view 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 |
line wrap: on
line source
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)