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

New UID constants + SOP class dictionary #372

Merged
merged 21 commits into from
Jun 24, 2023
Merged

New UID constants + SOP class dictionary #372

merged 21 commits into from
Jun 24, 2023

Conversation

Enet4
Copy link
Owner

@Enet4 Enet4 commented Jun 19, 2023

This preliminary set of major changes enable the core and standard dictionary components to harbor new kinds of DICOM dictionaries, namely those which involve recognized DICOM unique identifiers.

Summary

  • [dictionary-builder] moved to devtools folder
  • [dictionary-builder] now has two sub-commands:
    • The tags subcommand is equivalent to the previous version: produces a module of DICOM tags from the DCMTK DICOM dictionary.
    • The uid subcommand collects UID records from part 6 of the standard (in XML) and writes them as Rust code constants and in-memory static entries. Whether to include the static slices is gated on Cargo features, so that they do not incur a size cost when they are not used.
  • [core] renamed DictionaryEntry and a few other types to include the Data part, so that they are not mistaken with other dictionaries
  • [core] added submodules to dictionary module for describing data element dictionary types in data_element and UID dictionary types in uid
  • [dictionary-std] extended crate to support a run-time SOP class dictionary if the sop-class Cargo feature is enabled
  • [dump] the file meta group summary now also prints the name of the SOP class if it is known by the dictionary and the sop-class Cargo feature is enabled.

Open concerns

  • Tests for the SOP class dictionary are still missing
  • ❓ Should UID constants be separated by category into different submodules? There are 442 UIDs at the moment, each one is given a constant in dicom_dictionary_std::uids.
    • I'd say 👎, it does not seem to be that overwhelming.

Known caveats

  • Running dicom-dictionary-builder uid without the first argument will currently not work because the server hosting the standard (dicom.nema.org) is using outdated TLS protocols, and Rustls will not accept negotiating with it directly. The workaround is to download part06.xml separately and pass it along.

@Enet4 Enet4 added breaking change Hint that this may require a major version bump on release C-dictionary Crate: dictionary-std C-core Crate: dicom-core C-dictionary-builder Crate: dicom-dictionary-builder labels Jun 19, 2023
@Enet4 Enet4 marked this pull request as draft June 19, 2023 15:08
@Enet4 Enet4 marked this pull request as ready for review June 20, 2023 15:03
Enet4 added 21 commits June 24, 2023 16:08
- rename DictionaryEntry to pertain more about data element
- update stub dictionary module
- [dictionary-builder] adjust generated Rust code output accordingly
- [dictionary-std] move impl to data_element module
- [dictionary-std] only expose StandardDictionaryRegistry and StandardDataDictionary
  in crate root
- [dictionary-std] update tags module according to changes
- not necessarily a primitive data element
- move to devtools directory
- move data element dictionary generation
  to `data-elements` (tags as alias)
- update documentation accordingly
- move data element (tag) type definitions to `dictionary::data_element`
- add `dictionary::uid` and respective types
- add better module-level documentation
- split UIDs by types into different array declarations
- add Cargo features for run-time entries
- add uids module
- also update tags
- add module-level documentation to `data_element` nad `sop`
- allow dead code in some parts
  (since with feature gating they might be unused)
- allow dead code and unused imports in some parts
  (since with feature gating they might be unused)
- [core] declare and export trait UidDictionary
- move test data_element::constants_available to root
- add test uids_constants_available
- reimplement SOP class dictionary indexing
  through an `index_all` method
- implement SOP class dictionary proper
- add tests for SOP class dictionary
- deprecate retired UIDs
…ds module

[dictionary-std] and fix uids module in crate accordingly
- add Cargo feature sop-class, enabled by default
- if available, look up standard SOP class dictionary
  and show name in meta dump
@Enet4 Enet4 added the C-dump Crate: dicom-dump label Jun 24, 2023
@Enet4 Enet4 merged commit b9d1d60 into master Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Hint that this may require a major version bump on release C-core Crate: dicom-core C-dictionary Crate: dictionary-std C-dictionary-builder Crate: dicom-dictionary-builder C-dump Crate: dicom-dump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant