rii-mango / Daikon

A JavaScript DICOM reader.
Other
221 stars 54 forks source link

Cannot extract single frames without allocating memory for all #15

Closed DLiblik closed 6 years ago

DLiblik commented 6 years ago

Many files have multiple image frames, but getInterpolatedData() does not have an option to extract only a single frame in this situation. It can be done by the calling code, but a large amount of memory must be allocated to interpret all of the data.

As a first step to resolve, getInterpolatedData() can be updated to only process the frame of interest. I did this in PR #12

Next step would be to extend this to only decompress the frame of interest as well, but this is a start.

rii-mango commented 6 years ago

Merged. Agree about not needing to decompress everything. I recently added getJPEGs() and decompressJPEG(jpeg) to improve that.