python-pillow / Pillow

Python Imaging Library (Fork)
https://python-pillow.org
Other
12.33k stars 2.24k forks source link

3-D Volumes #4672

Open lukasfolle opened 4 years ago

lukasfolle commented 4 years ago

What did you do?

I tried to load a .dcm MRI scan with PIL.

What did you expect to happen?

PIL to be able to deal with 3-D data.

What actually happened?

.dcm or in general 3-D volumes are not supported in general. Thus, the file couldn't be opened.

What are your OS, Python and Pillow versions?

from PIL import Image
im = Image.open("brain_scan.dcm")
lukasfolle commented 4 years ago

@radarhere I believe this would enhance the Pillow package substantially. Especially using Pillow with 3-D support as the backend for torchvision would be awesome.

radarhere commented 3 weeks ago

Do you have an example file, ideally one with a small file size that could be added to our test suite and distributed under the Pillow license?

lukasfolle commented 3 weeks ago

A public dataset would probably be a great choice, something like this for example: https://www.cancerimagingarchive.net/collection/tcga-lgg/

radarhere commented 3 weeks ago

Thanks for the link. It is helpful to understand what you're after - but just to be clear,

Some data in this collection contains images that could potentially be used to reconstruct a human face. To safeguard the privacy of participants, users must sign and submit a TCIA Restricted License Agreement to help@cancerimagingarchive.net before accessing the data.

isn't going to be compatible with our license.

lukasfolle commented 3 weeks ago

Good point! How about this sample data from Slicer? https://www.slicer.org/wiki/SampleData

aclark4life commented 3 weeks ago

How about this sample data from Slicer?

A medical imager in the house, welcome! I spent many years providing IT support to neuroscientists at NIH and love to see overlap of medical imaging and Pillow.