Kiyokawa / pydicom

Automatically exported from code.google.com/p/pydicom
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 reported on code.google.com by thomas.p...@gmail.com on 23 Jan 2014 at 2:18

GoogleCodeExporter commented 8 years ago
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.

Original comment by darcymason@gmail.com on 24 Jan 2014 at 3:01

GoogleCodeExporter commented 8 years ago
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.

Original comment by thomas.p...@gmail.com on 24 Jan 2014 at 7:37