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

The default threshold values are not corrected computed for 6 bit images or less #51

Closed
vbaderks opened this issue Jul 4, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@vbaderks
Copy link
Contributor

vbaderks commented Jul 4, 2019

The JPEG-LS standard ISO/IEC 14495-1, paragraph C.2.4.1.1.1 defines how to compute the default threshold values. 2 set of formulas are defined. One needs to switch between the two sets based on the MAXVAL >= 128 or not, MAXVAL = 2 ^ bits_per_sample.

CharLS only uses the set of formulas defined for MAXVAL >= 128. This may cause incorrect encoding and decoding of images with 2,4,5 or 6 bits per sample when the default threshold values are used. The typical case is to use the default threshold values.

@vbaderks vbaderks self-assigned this Jul 4, 2019
@vbaderks vbaderks added the bug label Jul 4, 2019
@vbaderks vbaderks added this to the 2.1.0 milestone Jul 4, 2019
@vbaderks
Copy link
Contributor Author

vbaderks commented Jul 4, 2019

Impact of usage of CharLS in the DICOM domain is practical absent as almost all IOD use 8 bits per sample or more. Only the legacy secondary capture IOD could use less.

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

No branches or pull requests

1 participant