Skip to content

Add transcoder API#408

Merged
Enet4 merged 12 commits intomasterfrom
imp/pixeldata/transcode
Oct 15, 2023
Merged

Add transcoder API#408
Enet4 merged 12 commits intomasterfrom
imp/pixeldata/transcode

Conversation

@Enet4
Copy link
Copy Markdown
Owner

@Enet4 Enet4 commented Sep 2, 2023

This is revision 1 of the new transcoding API and CLI, a convenient trait for converting an object to another transfer syntax.

Summary

  • add dicom_pixeldata::transcode module, contains Transcode trait and transcoder error type
  • add some module-level test coverage for transcode
  • Adjust transcoder module according to changes in v0.6
  • [encoding] Fix default impl of PixelDataWriter::encode so that it doesn't throw an error on missing Number of Frames (already done in Fix padding skipping in multiframe JPEG decoding #414)
  • [ts-registry] Fix JPEG adapter's handling of native pixel data
  • [ts-registry] Implement narrowing of high depth pixel data to 8 bits
    • Results are a bit better, although they may be off the expected value range. Better check first whether transcoding to JPEG baseline really suits your use case.
  • Add binary package dicom-transcode, a CLI tool for transcoding DICOM files.

@Enet4 Enet4 added A-lib Area: library C-encoding Crate: dicom-encoding C-pixeldata Crate: dicom-pixeldata new This provides a new, mostly independent feature C-transfer-syntax Crate: dicom-transfer-syntax-registry bug This is a bug labels Sep 2, 2023
@Enet4 Enet4 marked this pull request as ready for review September 4, 2023 11:07
@Enet4 Enet4 force-pushed the imp/pixeldata/transcode branch from edd3a42 to da335dd Compare September 9, 2023 12:31
@Enet4 Enet4 force-pushed the imp/pixeldata/transcode branch from 9c49a67 to 63cf247 Compare September 23, 2023 16:36
Enet4 added 12 commits October 7, 2023 09:54
- `Transcode` trait
  can convert objects inline
  between transfer syntaxes
- expose `Transcode` and error/result types
- add root module documentation
- add `Transcode::transcode_with_options`
  and add default impl for `Transcode::transcode`
- fix implementation according to v0.6
- add more docs to `Transcode`
- add more module-level tests
- fix frame retrieval from native pixel data
- improve handling of high bit depth dat
  by narrowing it down to 8 bits if necessary
- CLI tool for transcoding files,
  gated behind feature "cli"
- include "cli" feature in CI
- new Cargo feature "transcode"
   - feature-gate dicom-pixeldata on "transcode"
   - if enabled, try to decode the file to explicit VR LE
     when the SCP does not accept the original TS
- add option never_transcode,
  to support retaining the previous behavior
@Enet4 Enet4 force-pushed the imp/pixeldata/transcode branch from 63cf247 to 88d3edf Compare October 7, 2023 08:56
@Enet4 Enet4 merged commit f45d714 into master Oct 15, 2023
@Enet4 Enet4 deleted the imp/pixeldata/transcode branch October 15, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lib Area: library bug This is a bug C-encoding Crate: dicom-encoding C-pixeldata Crate: dicom-pixeldata C-transfer-syntax Crate: dicom-transfer-syntax-registry new This provides a new, mostly independent feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant