-
Notifications
You must be signed in to change notification settings - Fork 62
Add nvimgcodec GPU accelerated decoder to Pydicom for decoding compressed pixel data #570
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds GPU-accelerated DICOM image decompression capabilities using NVIDIA's nvImageCodec library. The implementation creates a custom pydicom decoder plugin that supports 9 JPEG and JPEG2000 transfer syntaxes, automatically registering during the DICOMSeriesToVolumeOperator initialization.
- Implements a new decoder plugin module (
decoder_nvimgcodec.py) that integrates with pydicom's pixels backend - Automatically registers the decoder plugin when creating DICOMSeriesToVolumeOperator instances
- Exposes the decoder module through the operators package interface
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
monai/deploy/operators/decoder_nvimgcodec.py |
New module implementing nvImageCodec-based decoder plugin with functions for availability checking, frame decoding, plugin registration, and helper utilities for module path resolution |
monai/deploy/operators/dicom_series_to_volume_operator.py |
Integrates decoder plugin by importing the module and calling registration during operator initialization |
monai/deploy/operators/__init__.py |
Exposes the decoder module through package imports and adds it to __all__ list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
|



This WIP pull request adds a custom pydicom decoder plugin using NVIDIA's nvImageCodec library to accelerate DICOM image decompression for various JPEG and JPEG2000 transfer syntaxes.
Key Changes:
Special note on testing:
The approach for testing is to compare the decoded pixel values from nvImgCodec against those from the built-in decoders, be it GDCM, libjpeg or else, essentially measuring against the known good ones.
It is observed that the decoded pixels by nvImgCodec for JPEG Baseline 8 bit 1.2.840.10008.1.2.4.50 and HTJ2K 1.2.840.10008.1.2.4.203 are different from those by Pydicom default decoders. The standards allow for some differences on decoding, and assertion is not applied to results with these transfer syntax's, even with comparison tolerances.
For the lossless ones, pixels are exactly matching between nvImgCodec and the default ones (tolerances were not really needed)
See the attached file for details results.
results_PAE_MSE.md