|
PACS System 0.1.0
PACS DICOM system library
|
#include <container_adapter.h>

Public Types | |
| template<typename T > | |
| using | Result = kcenon::common::Result<T> |
| Result type alias for operations returning a value. | |
Static Public Member Functions | |
| static auto | to_container_value (const core::dicom_element &element) -> container_module::optimized_value |
| Convert a DICOM element to a container value. | |
| static auto | from_container_value (core::dicom_tag tag, encoding::vr_type vr, const container_module::optimized_value &val) -> core::dicom_element |
| Convert a container value back to a DICOM element. | |
| static auto | serialize_dataset (const core::dicom_dataset &dataset) -> std::shared_ptr< container_module::value_container > |
| Serialize a DICOM dataset to a value_container. | |
| static auto | deserialize_dataset (const container_module::value_container &container) -> Result< core::dicom_dataset > |
| Deserialize a value_container back to a DICOM dataset. | |
| static auto | to_binary (const core::dicom_dataset &dataset) -> std::vector< uint8_t > |
| Serialize a DICOM dataset to binary format. | |
| static auto | from_binary (std::span< const uint8_t > data) -> Result< core::dicom_dataset > |
| Deserialize binary data back to a DICOM dataset. | |
| static auto | get_container_type (encoding::vr_type vr) noexcept -> container_module::value_types |
| Get the container value type for a DICOM VR. | |
| static constexpr auto | maps_to_string (encoding::vr_type vr) noexcept -> bool |
| Check if a VR maps to a string value. | |
| static constexpr auto | maps_to_numeric (encoding::vr_type vr) noexcept -> bool |
| Check if a VR maps to a numeric value. | |
| static constexpr auto | maps_to_binary (encoding::vr_type vr) noexcept -> bool |
| Check if a VR maps to binary data. | |
Static Private Member Functions | |
| static auto | make_element_key (core::dicom_tag tag, encoding::vr_type vr) -> std::string |
| Create a key string for an element in the container. | |
| static auto | parse_element_key (std::string_view key) -> std::optional< std::pair< core::dicom_tag, encoding::vr_type > > |
| Parse an element key back to tag and VR. | |
| static auto | sequence_to_container (const core::dicom_element &element) -> std::shared_ptr< container_module::value_container > |
| Convert sequence items to container array. | |
| static auto | container_to_sequence (const container_module::value_container &container) -> std::vector< core::dicom_dataset > |
| Convert container array back to sequence items. | |
Static Private Attributes | |
| static constexpr std::string_view | kProtocolVersion = "1.0.0" |
| Protocol version for serialization format. | |
| static constexpr std::string_view | kVersionKey = "_pacs_version" |
| Key for protocol version in container. | |
| static constexpr std::string_view | kElementCountKey = "_element_count" |
| Key for element count in container. | |
Definition at line 70 of file container_adapter.h.
| using kcenon::pacs::integration::container_adapter::Result = kcenon::common::Result<T> |
Result type alias for operations returning a value.
Definition at line 74 of file container_adapter.h.
|
staticnodiscardprivate |
Convert container array back to sequence items.
| container | The container containing sequence items |
Definition at line 463 of file container_adapter.cpp.
|
staticnodiscard |
Deserialize a value_container back to a DICOM dataset.
Reconstructs a DICOM dataset from a previously serialized value_container.
| container | The container to deserialize |
Definition at line 289 of file container_adapter.cpp.
References kcenon::pacs::core::dicom_dataset::insert(), and vr.

|
staticnodiscard |
Deserialize binary data back to a DICOM dataset.
Reconstructs a DICOM dataset from binary data previously created by to_binary().
| data | The binary data to deserialize |
Definition at line 339 of file container_adapter.cpp.
|
staticnodiscard |
Convert a container value back to a DICOM element.
Reconstructs a DICOM element from a container value, using the provided tag and VR information.
| tag | The DICOM tag for the element |
| vr | The value representation |
| val | The container value to convert |
Definition at line 166 of file container_adapter.cpp.
References kcenon::pacs::encoding::FD, kcenon::pacs::encoding::FL, kcenon::pacs::core::dicom_element::from_numeric(), kcenon::pacs::core::dicom_element::from_string(), kcenon::pacs::encoding::is_numeric_vr(), kcenon::pacs::encoding::is_string_vr(), kcenon::pacs::encoding::SL, kcenon::pacs::encoding::SQ, kcenon::pacs::encoding::SS, kcenon::pacs::encoding::SV, kcenon::pacs::encoding::UL, kcenon::pacs::encoding::US, kcenon::pacs::encoding::UV, and vr.

|
staticnodiscardnoexcept |
Get the container value type for a DICOM VR.
| vr | The DICOM value representation |
Definition at line 358 of file container_adapter.cpp.
References kcenon::pacs::encoding::AT, kcenon::pacs::encoding::FD, kcenon::pacs::encoding::FL, kcenon::pacs::encoding::is_string_vr(), kcenon::pacs::encoding::SL, kcenon::pacs::encoding::SQ, kcenon::pacs::encoding::SS, kcenon::pacs::encoding::SV, kcenon::pacs::encoding::UL, kcenon::pacs::encoding::US, kcenon::pacs::encoding::UV, and vr.

|
staticnodiscardprivate |
Create a key string for an element in the container.
Format: "GGGG,EEEE:VR" (e.g., "0010,0020:LO")
| tag | The DICOM tag |
| vr | The value representation |
Definition at line 393 of file container_adapter.cpp.
References kcenon::pacs::encoding::to_string(), and vr.

|
inlinestaticnodiscardconstexprnoexcept |
Check if a VR maps to binary data.
| vr | The DICOM value representation |
Definition at line 215 of file container_adapter.h.
References kcenon::pacs::encoding::is_binary_vr(), and vr.

|
inlinestaticnodiscardconstexprnoexcept |
Check if a VR maps to a numeric value.
| vr | The DICOM value representation |
Definition at line 204 of file container_adapter.h.
References kcenon::pacs::encoding::is_numeric_vr(), and vr.

|
inlinestaticnodiscardconstexprnoexcept |
Check if a VR maps to a string value.
| vr | The DICOM value representation |
Definition at line 193 of file container_adapter.h.
References kcenon::pacs::encoding::is_string_vr(), and vr.

|
staticnodiscardprivate |
Parse an element key back to tag and VR.
| key | The key string to parse |
Definition at line 400 of file container_adapter.cpp.
References kcenon::pacs::encoding::from_string().

|
staticnodiscardprivate |
Convert sequence items to container array.
| element | The sequence element |
Definition at line 443 of file container_adapter.cpp.
|
staticnodiscard |
Serialize a DICOM dataset to a value_container.
Converts all elements in the dataset to container values and stores them in a value_container. The container includes metadata for reconstructing the dataset:
| dataset | The DICOM dataset to serialize |
Definition at line 272 of file container_adapter.cpp.
|
staticnodiscard |
Serialize a DICOM dataset to binary format.
Uses container_system's serialization for efficient binary encoding. The resulting format is suitable for network transmission or storage.
| dataset | The DICOM dataset to serialize |
Definition at line 328 of file container_adapter.cpp.
|
staticnodiscard |
Convert a DICOM element to a container value.
Maps the element's VR to the appropriate container value type:
| element | The DICOM element to convert |
Definition at line 22 of file container_adapter.cpp.
References kcenon::pacs::encoding::AT, kcenon::pacs::encoding::FD, kcenon::pacs::encoding::FL, kcenon::pacs::encoding::is_binary_vr(), kcenon::pacs::encoding::is_numeric_vr(), kcenon::pacs::encoding::is_string_vr(), kcenon::pacs::encoding::SL, kcenon::pacs::encoding::SS, kcenon::pacs::encoding::SV, kcenon::pacs::encoding::UL, kcenon::pacs::encoding::US, kcenon::pacs::encoding::UV, and vr.

|
staticconstexprprivate |
Key for element count in container.
Definition at line 228 of file container_adapter.h.
|
staticconstexprprivate |
Protocol version for serialization format.
Definition at line 222 of file container_adapter.h.
|
staticconstexprprivate |
Key for protocol version in container.
Definition at line 225 of file container_adapter.h.