-
Notifications
You must be signed in to change notification settings - Fork 88
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
DICOM object writing #35
Merged
Merged
Conversation
This file contains 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
- rename parser to stateful decoder - rename printer to stateful encoder - reorganize modules accordingly - change some value reading functions to use inner buffer - [encoding] add generic lifetime to transfer_syntax encoder()
- already addressed in #22
- to `items` and `into_items`
- fix UI values being improperly separated by 00h - fix character set changes not being triggered via read_value_preserved - add a few tests to the stateful decoder - fix `value_reader` to take without limit on unknown length
- add `HasLength` trait - rename `len` or `size` to `HasLength::length` - relax constraints of `I` in `Value<I>` - make a distinction between size and cardinality in DicomValueType
- add more impls to DataToken - add IntoTokens and various implementations
- add `tokens` module, InMemObjectTokens turns objects into tokens - rename `from_element_iter` and `from_iter_with_dict` - to `from_element_source` and `from_element_source_with_dict` - replace former names with non-fallible versions
Zero type enables representing DICOM values not containing objects
- do not impl EncodeTo for all Encode, - instead use wrapper type EncoderFor
- utility for creating primitive DICOM values of variable cardinality
- impl IntoTokens for &InMemDicomObject - refactor current implementation
- make better FileMetaTableBuilder errors - tweak FileMetaTableBuilder to automatically fill in meta group length - add RootDicomObject::new_empty_with_meta - add means to turn FileMetaTable into data elements (then into tokens) - add RootDicomObject::write_to_file
write preamble and magic code via write_all instead of write
- make builder field setters generic - apply padding to ensure even length
- file meta information group length is not included - refactor object smoke_test to test writing and reading - add builder test
Enet4
commented
May 10, 2020
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 is another bulky set of contributions that ultimately enable users of DICOM-rs to write objects to a file. Resolves #15 as the MVP to writing, future issues related with the writing process can be made into more specific issues.
This was accompanied by several major changes, but I will summarize them here:
IntoTokens
trait and multiple useful implementations of it (including for the in-memory DICOM object type and for the file meta table).dicom_value!
macro for constructing primitive values of variable cardinality.RootDicomObject.write_to_file(path)
lets you write a complete DICOM object to disk.