Repository navigation
docs: a library-oriented EXAMPLES.md with runnable streaming recipes - #558
Merged
Merged
Conversation
Adapted from the CLI-oriented EXAMPLES.md on the docs/examples branch of awatson1978/dcmjs-commands, rewritten against the library APIs on this branch: DicomMessage.readFile (+ allowMissingHeader), the DicomEventStream facade, NaturalizedListener, StreamingPart10Writer, the DICOMweb JSON source/sink pair, and the cancellable async event iterable. Every snippet was executed against real downloadable data before being written down, including a live whole-slide-imaging recipe against the public OHIF demo DICOMweb and a memory-boundedness demonstration (211 MB file, 15.6 MB peak live ArrayBuffer memory vs 379 MB on the eager path). Co-Authored-By: Claude Fable 5 <[email protected]>
|
🎉 This PR is included in version 1.0.0-beta.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
This brings the "by example" document forward from the dcmjs-commands CLI repo and rewrites it for the library itself. Same spirit — every snippet ran against real files before it was written down — but the recipes now exercise the APIs on this branch directly:
readFilewith the newallowMissingHeaderopt-in, theDicomEventStreamfacade,NaturalizedListener,StreamingPart10Writerwith end-to-end backpressure, the DICOMweb JSON source/sink pair, and early-exit cancellation through the async event iterable.The reviewer test-drive section at the bottom is the part I'd start with: it fetches real fixtures from the dcmjs-org/data releases, synthesizes a 211 MB stress file through an event-stream filter, and then reads it back at a measured 15.6 MB peak of live ArrayBuffer memory (the eager path sits at 379 MB on the same file). The whole-slide recipe runs against the public OHIF demo DICOMweb with no downloads at all — a four-level SM pyramid, 21,710 frames at the base, naturalized from live server metadata. All URLs verified serving at time of writing.
🤖 Generated with Claude Code