fepegar / torchio

Medical imaging toolkit for deep learning
https://torchio.org
Apache License 2.0
2.08k stars 239 forks source link

Enable plotting of PNG images with alpha channel #1150

Closed ChristianHinge closed 9 months ago

ChristianHinge commented 9 months ago

Fixes #724

Description

ImagePIL.fromarray accepts and correctly interprets the fourth channel of a png-derived tensor as an alpha channel. I believe that simply allowing for four channels should do the trick. I have tested on a single image with alpha channel.

Checklist

fepegar commented 9 months ago

@all-contributors please add @ChristianHinge for bug

allcontributors[bot] commented 9 months ago

@fepegar

I've put up a pull request to add @ChristianHinge! :tada: