Patch to support JPEG2000 images with 16 bits allocated but 8 bits stored #1444
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Patch to DCM4CHE to allow support for JPEG2000 images that are 16 bits allocated but only 8 bits stored. Currently, these images are not correctly decompressed by DCM4CHE. DCM4CHE will remove some of the components of the image. This implements a patch in DCM4CHE to convert the
image to 8 bits allocated and 8 bits stored and removes the empty leading 00 bits. After this conversion DCM4CHE correctly decompresses the image and the pixel data checksum also passes. Since we are changing the BitsAllocated tag this will also update the BitsAllocated in the
ImageSetMetadata.
As an example in hex form the original images appear in the following form with each two-character sequence representing a byte (i.e. 8 bits) and each four-character sequence representing a short (i.e. 16 bits). For example, 001E represents 16-bits or a single pixel value for a single
image component. This will be converted to 8 bits 1E by stripping off leading 00s which do not contain any data.
Original Hex
001E0030 0048001E 00370048
After Hex
1E30 481E 3748