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

Revise DicomObject abstraction #524

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Enet4
Copy link
Owner

@Enet4 Enet4 commented Jun 23, 2024

Context

A new iteration of the trait-based DICOM object abstraction, which may help uniformize DICOM object handling regardless of the underlying implementation.

Summary

  • [object] Redesign DicomObject trait
  • [core] Add Value::shallow_clone
  • [object] Redesign DicomObject trait

Known caveats

  • Methods get are nice and short, but they conflict with InMemDicomObject::get and do not work the same way. I might need to rename them again.
  • No easy way to access nested attributes yet, although we already have an abstraction for attribute selectors

@Enet4 Enet4 added enhancement A-lib Area: library C-object Crate: dicom-object breaking change Hint that this may require a major version bump on release labels Jun 23, 2024
@Enet4 Enet4 force-pushed the change/object/dicom-object-revision-gats branch 2 times, most recently from 5236b94 to c757898 Compare June 29, 2024 17:25
@Enet4 Enet4 added this to the DICOM-rs 0.8 milestone Jul 25, 2024
- use GAT on Element type
- add element_opt and element_by_name_opt
- 1-level deep copy of a DICOM value
- add DicomAttributeValue trait,
  use it as output of most methods in DicomObject
- rename methods and add new ones in DicomObject
   - use GATs for the attribute value, item and pixel data types
- reimplement DicomObject
- provide access to items and pixel data fragments
- require DicomAttributeValue to impl DicomValueType
- add a few tests
- rename from DicomAttributeValue
- add `to_i32` and `to_u16`
- instead, meta attributes can be retrieved
  like any other attribute
- replace `to_dicom_value` with `to_primitive_value`
   - simplifies implementations
   and requires consumers to
   depend on other methods
   when working with sequences
- remove method `meta`
   - treat meta information attributes like any other attribute,
   retrievable through the same methods
- [core] add either crate
- impl many DICOM traits to `either::Either`
- implement DicomObject for FileMetaTable
- reimplement DICOM traits for FileDicomObject
  so that users can retrieve
  either meta info or main data set info
- elide lifetime
- fix formatting of doc comments
@Enet4 Enet4 force-pushed the change/object/dicom-object-revision-gats branch from eae2801 to e044a47 Compare November 2, 2024 12:16
@Enet4 Enet4 removed this from the DICOM-rs 0.8 milestone Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lib Area: library breaking change Hint that this may require a major version bump on release C-object Crate: dicom-object enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant