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

patterns: add DICOM #162

Merged
merged 1 commit into from
Sep 26, 2023
Merged

patterns: add DICOM #162

merged 1 commit into from
Sep 26, 2023

Conversation

bgilbert
Copy link
Contributor

@bgilbert bgilbert commented Sep 10, 2023

DICOM files specify a "transfer syntax" which defines the image compression format, the encoding rules for the entire file, and any special-case encoding rules for particular fields. Many transfer syntaxes have common design features, but a transfer syntax is allowed to use completely custom encoding rules, and need not be publicly documented.

Explicitly reject transfer syntaxes we know we don't support: implicit VR (uncommon), explicit VR big-endian (deprecated), deflate-compressed. In all other cases, follow some general rules and hope it works out.

The large lookup functions were generated by a script, but I haven't included the code here, since its input is hand-massaged data copied from HTML tables.

Add a JPEG WSI test case from the WG26 2021 hackathon (CC0 license) and a synthetic LE Explicit VLP case produced with img2dcm.

@bgilbert bgilbert marked this pull request as ready for review September 10, 2023 08:15
@bgilbert
Copy link
Contributor Author

Rebased and marked ready for review!

@bgilbert bgilbert force-pushed the dicom branch 2 times, most recently from 6fb3d23 to d91c9fb Compare September 12, 2023 20:39
@WerWolv
Copy link
Owner

WerWolv commented Sep 24, 2023

Hi, thanks a lot for your PR! Sorry for not coming back to it earlier

I know this is currently a bit stupid but could you move the constants you defined in a library back into your pattern? Otherwise people will need to download that library that's very specific to that one file before they can use the pattern itself. We'll need to find a better solution at some point to allow for easy use of multiple files per pattern but we're not there yet right now.

Everything else looks great, I'll merge your PR if you could copy the data back into the pattern

DICOM files specify a "transfer syntax" which defines the image
compression format, the encoding rules for the entire file, and any
special-case encoding rules for particular fields.  Many transfer syntaxes
have common design features, but a transfer syntax is allowed to use
completely custom encoding rules, and need not be publicly documented.

Explicitly reject transfer syntaxes we know we don't support: implicit VR
(uncommon), explicit VR big-endian (deprecated), deflate-compressed.
In all other cases, follow some general rules and hope it works out.

The large lookup functions were generated by a script, but I haven't
included the code here, since its input is hand-massaged data copied from
HTML tables.

Add a JPEG WSI test case from the WG26 2021 hackathon (CC0 license) and a
synthetic LE Explicit VLP case produced with img2dcm.
@bgilbert
Copy link
Contributor Author

Okay, done!

@WerWolv WerWolv merged commit 917b05a into WerWolv:master Sep 26, 2023
@WerWolv
Copy link
Owner

WerWolv commented Sep 26, 2023

Thank you!

@bgilbert bgilbert deleted the dicom branch September 26, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants