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

Limiting the number of cores for pixel data decoding #15

Open
Enet4 opened this issue Aug 18, 2024 · 1 comment
Open

Limiting the number of cores for pixel data decoding #15

Enet4 opened this issue Aug 18, 2024 · 1 comment

Comments

@Enet4
Copy link
Collaborator

Enet4 commented Aug 18, 2024

Just relaying the information from Enet4/dicom-rs#551, as this seems to be mostly an issue with the use of gdcm-rs. Is there a way to limit the number of cores in use for decoding?

I have noticed an issue/bug specifically when using the gdcm feature and decompressing pixel data with JPEG 2000. Specifically, the decompression process utilizes all system cores available (no matter what I do) while decompressing. It is particularly noticeable with large multiframe dicoms (mammo DBT).

image

As far as I can tell, it doesn't occur with any other encapsulated pixel data decompression from GDCM, and this is probably an upstream issue with GDCM itself. Using openjpeg-sys instead seems to be the solution :)

@PRadeckiDH
Copy link

PRadeckiDH commented Sep 4, 2024

@Enet4 Thanks for reposting the issue here!

@pevers I see reference to it here in the GDCM repo, where it defaults to all system cores detected.

https://github.com/malaterre/GDCM/blob/5819053476f1efe8a5e92c66a91bdaf6e1356436/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx#L480

JPEG2000Codec::JPEG2000Codec()
{
  Internals = new JPEG2000Internals;
  SetNumberOfThreadsForDecompression( -1 );
}

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

No branches or pull requests

2 participants