Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: allow read value from unprocessed data #1

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

ducquangkstn
Copy link
Owner

@ducquangkstn ducquangkstn commented Mar 1, 2024

Rationale:

  • According to this issue readNativeFrames Performance Optimizations suyashkumar/dicom#161, we have OOM issues and it happens when the DICOM is about 784Mb and server memory is 16Gb, and the DICOM contains multiple frames.
  • Reason 1: the pixel data is always int (64 bits - 8 bytes), even the bitAllocated can be 16 bit, which means this can takes up to 4 times of memory
  • Reason 2: the way the DICOM library storing data is [[[sample for sample in pixel] for pixel in frame] for frame in image]. B/c the number of pixel per frame is usually 1M (1000 * 1000 image) and sample per pixel can be 1 => this structure takes 4x of memory.
  • Anyway to change this issue direcly from the library will make a breaking change to end users.

Solution:

  • Thanks for contributors, we now have an option to skip processing data and the value of pixel data will be stored in byte array. It is called raw data or unprocessing data.
  • Instead of loading and manipulating the loaded 3-dimension data, we modify the data directly this unprocessed pixeldata. It can be called in-place read/write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant