Repository navigation
feat(dicom): decode HTJ2K with OpenJPH - #1053
Merged
Merged
Conversation
HTJ2K transfer syntaxes had no decoder. They now decode whole in OpenJPH workers, started on first use, and the samples are finished by the same code as native frames, so the HTJ2K decoder declines what native decoding declines. The GDCM decoder and the new one share a lane pool. The corpus gains the two pydicom-data HTJ2K files and a generated file of three signed 12 bit frames, checked against the reference.
Collaborator
Author
|
Folded into #1046: this commit is now on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on #1046 (
dicom-loading). Review and merge that first; this PR then retargets tomain.VolView had no decoder for the High-Throughput JPEG 2000 transfer syntaxes (1.2.840.10008.1.2.4.201, .202 and .203). This adds one.
Changes
@cornerstonejs/codec-openjph, MIT) workers. A worker starts on the first HTJ2K decode, so sessions without HTJ2K data load no extra code or WASM.splitEncapsulatedFrames, and finishes samples with the native frame code (masking, sign extension from Bits Stored, modality rescale). It declines what native decoding declines, so photometric and bit-depth rules stay in one place. YBR_RCT and YBR_ICT labelled files are declined for now.lanePool.tsthat both decoders use.createDicomRuntime'sdecodersoption now receives{ gdcm, htj2k }instead of the GDCM decoder alone.Test data
The volume corpus gains the two pydicom-data HTJ2K files (RGB lossless and lossy) and a generated file of three signed 12 bit greyscale frames, encoded with OpenJPH at test time and checked against the pydicom reference, which decodes with OpenJPEG. An application spec opens an HTJ2K file and checks the decoded colour image reaches the slice view.