Mercurial > repos > imgteam > permutate_axis
comparison permutate_axis.py @ 1:5b82f2186244 draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/permutate_axis/ commit b2acc1845a25828181597fe5b6982fe116a7796d
| author | imgteam |
|---|---|
| date | Mon, 22 Jul 2019 05:04:15 -0400 |
| parents | 0bbe34198e24 |
| children | 91e255c78eb5 |
comparison
equal
deleted
inserted
replaced
| 0:0bbe34198e24 | 1:5b82f2186244 |
|---|---|
| 7 | 7 |
| 8 def permutate_axis(input_image_path, output_image_path, axis, permutate): | 8 def permutate_axis(input_image_path, output_image_path, axis, permutate): |
| 9 images = [] | 9 images = [] |
| 10 raw_image = skimage.io.imread(input_image_path, plugin='tifffile') | 10 raw_image = skimage.io.imread(input_image_path, plugin='tifffile') |
| 11 for i in permutate: | 11 for i in permutate: |
| 12 # TODO generalise | 12 # TODO generalise |
| 13 if axis == 0: | 13 if axis == 0: |
| 14 a_slice = raw_image[i] | 14 a_slice = raw_image[i] |
| 15 elif axis == 1: | 15 elif axis == 1: |
| 16 a_slice = raw_image[:,i] | 16 a_slice = raw_image[:,i] |
| 17 elif axis == 2: | 17 elif axis == 2: |
