Pillow icon indicating copy to clipboard operation
Pillow copied to clipboard

3-D Volumes

Open lukasfolle opened this issue 5 years ago • 6 comments

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?

  • OS: MacOs Catalina
  • Python: Python3.7
  • Pillow: Master
from PIL import Image
im = Image.open("brain_scan.dcm")

lukasfolle avatar Jun 06 '20 11:06 lukasfolle

@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.

lukasfolle avatar Jun 21 '20 10:06 lukasfolle

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?

radarhere avatar Nov 01 '24 04:11 radarhere

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

lukasfolle avatar Nov 01 '24 06:11 lukasfolle

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 [email protected] before accessing the data.

isn't going to be compatible with our license.

radarhere avatar Nov 01 '24 07:11 radarhere

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

lukasfolle avatar Nov 01 '24 07:11 lukasfolle

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.

aclark4life avatar Nov 01 '24 10:11 aclark4life