Mercurial > repos > imgteam > libcarna_render
comparison render.py @ 3:e07bfdcb1d26 draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/libcarna/ commit 9abf60fee6ba4f5d4f4a18d8f4d33e6263b3c065
| author | imgteam |
|---|---|
| date | Tue, 06 Jan 2026 11:26:30 +0000 |
| parents | 8cd3d5261f28 |
| children | 8fa86f0ebca2 |
comparison
equal
deleted
inserted
replaced
| 2:7188234ae8f6 | 3:e07bfdcb1d26 |
|---|---|
| 124 ) | 124 ) |
| 125 cmap_kwargs['ramp'] = tuple(ramp_values) | 125 cmap_kwargs['ramp'] = tuple(ramp_values) |
| 126 mode.cmap(tool.args.params['colormap'], **cmap_kwargs) | 126 mode.cmap(tool.args.params['colormap'], **cmap_kwargs) |
| 127 | 127 |
| 128 # Render | 128 # Render |
| 129 colorbars = list() | |
| 130 if tool.args.params['colorbar']: | |
| 131 colorbars.append(mode.cmap.bar(intensities_volume)) | |
| 129 html = libcarna.imshow( | 132 html = libcarna.imshow( |
| 130 libcarna.animate( | 133 libcarna.animate( |
| 131 libcarna.animate.rotate_local(camera), | 134 libcarna.animate.rotate_local(camera), |
| 132 n_frames=tool.args.params['video']['frames'], | 135 n_frames=tool.args.params['video']['frames'], |
| 133 ).render(r, camera), | 136 ).render(r, camera), |
| 134 mode.cmap.bar(intensities_volume), | 137 *colorbars, |
| 135 fps=tool.args.params['video']['fps'], | 138 fps=tool.args.params['video']['fps'], |
| 136 ) | 139 ) |
| 137 | 140 |
| 138 # Write the result | 141 # Write the result |
| 139 with open(tool.args.raw_args.html, 'w') as fhtml: | 142 with open(tool.args.raw_args.html, 'w') as fhtml: |
