suever / pydicom-experimental

pydicom test
0 stars 1 forks source link

Use numpy.memmap() instead of loading pixel data to memory #138

Open suever opened 9 years ago

suever commented 9 years ago

From thomas.p...@gmail.com on January 23, 2014 09:18:37

Hello all, I have to deal with rather large DICOM files (1GB+). Most of the time, I don't need the entire pixel data all at once, so using numpy.memmap() would be a huge time saver.

Initially, I wanted to change _pixel_data_numpy() in dataset.py accordingly, but unfortunately, the pixel data has already been loaded in this stage. Maybe one of the developers sees a simple way to integrate this consistently.

Cheers, Tom

Original issue: http://code.google.com/p/pydicom/issues/detail?id=138

suever commented 9 years ago

From darcymason@gmail.com on January 23, 2014 19:01:28

This has come up from time to time, and I think it is a reasonable suggestion. Will give some thought as to how best to work it in. I don't like assuming numpy is available (many users have much simpler needs), so it should be some kind of configurable option.

Status: Accepted
Labels: -Type-Defect Type-Enhancement

suever commented 9 years ago

From thomas.p...@gmail.com on January 23, 2014 23:37:35

Thanks for considering. If someone doesn't have or does not want to use numpy, chances are that the pixel data is not of interest anyway or that a plain mmap handle would be sufficient.