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

Decode a single frame via object pixel data decoding API #421

Merged
merged 4 commits into from
Oct 7, 2023

Conversation

Enet4
Copy link
Owner

@Enet4 Enet4 commented Oct 5, 2023

Although it was possible to retrieve a single frame from a blob of decoded pixel data, the API provided by PixelDecoder required the user to decode all of the frames first.
This PR extends this trait for the possibility to decode only one of the frames in a DICOM object. dicom-toimage has also been optimized by using it.

Enet4 added 3 commits October 5, 2023 22:35
- A method that retrieves about the same imaging metadata,
  but only decodes one frame.
- Contains default implementation
  (inefficient but prevents breaking changes)
- Implement it for default DICOM object (not gdcm)
- Clear some redundancy using new struct ImagingProperties
   - from_obj provides lots of metadata at once
- add specific error variant for no pixel data
- decodes only what's necessary, makes things more efficient
- do no copies if the raw pixel data is native and needed no processing
@Enet4 Enet4 added enhancement A-lib Area: library A-tool Area: tooling C-pixeldata Crate: dicom-pixeldata C-toimage Crate: dicom-toimage labels Oct 5, 2023
- InnerError was mistakenly made public
@Enet4 Enet4 force-pushed the imp/pixeldata/decode_frame branch from f9ea72e to 34be166 Compare October 6, 2023 07:24
@Enet4 Enet4 merged commit b714dcc into master Oct 7, 2023
4 checks passed
@Enet4 Enet4 deleted the imp/pixeldata/decode_frame branch October 7, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lib Area: library A-tool Area: tooling C-pixeldata Crate: dicom-pixeldata C-toimage Crate: dicom-toimage enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant