|
PACS System 0.1.0
PACS DICOM system library
|
DICOM Data Dictionary singleton class. More...
#include <dicom_dictionary.h>

Public Member Functions | |
| dicom_dictionary (const dicom_dictionary &)=delete | |
| dicom_dictionary (dicom_dictionary &&)=delete | |
| auto | operator= (const dicom_dictionary &) -> dicom_dictionary &=delete |
| auto | operator= (dicom_dictionary &&) -> dicom_dictionary &=delete |
| auto | find (dicom_tag tag) const -> std::optional< tag_info > |
| Find tag metadata by DICOM tag. | |
| auto | find_by_keyword (std::string_view keyword) const -> std::optional< tag_info > |
| Find tag metadata by keyword. | |
| auto | contains (dicom_tag tag) const -> bool |
| Check if a tag exists in the dictionary. | |
| auto | contains_keyword (std::string_view keyword) const -> bool |
| Check if a keyword exists in the dictionary. | |
| auto | validate_vm (dicom_tag tag, uint32_t count) const -> bool |
| Validate that a value count is valid for a tag's VM. | |
| auto | get_vr (dicom_tag tag) const -> uint16_t |
| Get the VR type for a tag. | |
| auto | register_private_tag (const tag_info &info) -> bool |
| Register a private tag at runtime. | |
| auto | size () const -> size_t |
| Get the total number of tags in the dictionary. | |
| auto | standard_tag_count () const -> size_t |
| Get the number of standard (non-private) tags. | |
| auto | private_tag_count () const -> size_t |
| Get the number of registered private tags. | |
| auto | get_tags_in_group (uint16_t group) const -> std::vector< tag_info > |
| Get all tags in a specific group. | |
Static Public Member Functions | |
| static auto | instance () -> dicom_dictionary & |
| Get the singleton instance. | |
Private Member Functions | |
| dicom_dictionary () | |
| Private constructor - initializes with standard tags. | |
| void | initialize_standard_tags () |
| Initialize the dictionary with standard PS3.6 tags. | |
Private Attributes | |
| std::unordered_map< dicom_tag, tag_info > | tag_map_ |
| Hash map for O(1) lookup by tag. | |
| std::unordered_map< std::string_view, dicom_tag > | keyword_map_ |
| Hash map for O(1) lookup by keyword. | |
| size_t | standard_count_ {0} |
| Count of standard tags (vs private) | |
| std::shared_mutex | mutex_ |
| Mutex for thread-safe private tag registration. | |
DICOM Data Dictionary singleton class.
Provides O(1) lookup for DICOM tag metadata including VR, VM, keyword, and name. The dictionary is initialized with all standard tags from PS3.6 and supports runtime registration of private tags.
Thread Safety:
Definition at line 65 of file dicom_dictionary.h.
|
delete |
|
delete |
|
private |
Private constructor - initializes with standard tags.
Definition at line 25 of file dicom_dictionary.cpp.
References initialize_standard_tags().

|
nodiscard |
Check if a tag exists in the dictionary.
| tag | The DICOM tag to check |
Definition at line 69 of file dicom_dictionary.cpp.
|
nodiscard |
Check if a keyword exists in the dictionary.
| keyword | The keyword to check |
Definition at line 74 of file dicom_dictionary.cpp.
|
nodiscard |
Find tag metadata by DICOM tag.
| tag | The DICOM tag to look up |
O(1) average time complexity using hash table lookup. Thread-safe for concurrent reads.
Definition at line 45 of file dicom_dictionary.cpp.
|
nodiscard |
Find tag metadata by keyword.
| keyword | The tag keyword (e.g., "PatientName") |
O(1) average time complexity using hash table lookup. Thread-safe for concurrent reads.
Definition at line 55 of file dicom_dictionary.cpp.
|
nodiscard |
Get all tags in a specific group.
| group | The group number to filter by |
Definition at line 130 of file dicom_dictionary.cpp.
|
nodiscard |
Get the VR type for a tag.
| tag | The DICOM tag |
Definition at line 87 of file dicom_dictionary.cpp.
|
private |
Initialize the dictionary with standard PS3.6 tags.
Definition at line 29 of file dicom_dictionary.cpp.
References kcenon::pacs::core::get_standard_tags(), keyword_map_, standard_count_, and tag_map_.
Referenced by dicom_dictionary().


|
staticnodiscard |
Get the singleton instance.
Thread-safe initialization using C++11 static initialization guarantee.
Definition at line 20 of file dicom_dictionary.cpp.
Referenced by kcenon::pacs::encoding::implicit_vr_codec::decode_element(), and kcenon::pacs::core::dicom_file::decode_implicit_vr_le().

|
delete |
|
delete |
|
nodiscard |
Get the number of registered private tags.
Definition at line 125 of file dicom_dictionary.cpp.
References mutex_, standard_count_, and tag_map_.
| auto kcenon::pacs::core::dicom_dictionary::register_private_tag | ( | const tag_info & | info | ) | -> bool |
Register a private tag at runtime.
| info | The tag_info for the private tag |
Only private tags (odd group numbers > 0x0008) can be registered. Thread-safe, serializes write operations.
Definition at line 95 of file dicom_dictionary.cpp.
|
nodiscard |
|
nodiscard |
Get the number of standard (non-private) tags.
Definition at line 121 of file dicom_dictionary.cpp.
References standard_count_.
|
nodiscard |
Validate that a value count is valid for a tag's VM.
| tag | The DICOM tag to validate against |
| count | The number of values to validate |
Definition at line 79 of file dicom_dictionary.cpp.
|
private |
Hash map for O(1) lookup by keyword.
Definition at line 182 of file dicom_dictionary.h.
Referenced by initialize_standard_tags().
|
mutableprivate |
Mutex for thread-safe private tag registration.
Definition at line 188 of file dicom_dictionary.h.
Referenced by private_tag_count(), and size().
|
private |
Count of standard tags (vs private)
Definition at line 185 of file dicom_dictionary.h.
Referenced by initialize_standard_tags(), private_tag_count(), and standard_tag_count().
Hash map for O(1) lookup by tag.
Definition at line 179 of file dicom_dictionary.h.
Referenced by initialize_standard_tags(), private_tag_count(), and size().