|
PACS System 0.1.0
PACS DICOM system library
|
Encoder/decoder for Implicit VR Little Endian transfer syntax. More...
#include <implicit_vr_codec.h>

Public Types | |
| template<typename T > | |
| using | result = kcenon::pacs::Result<T> |
| Result type for decode operations using kcenon::pacs::Result<T> pattern. | |
Static Public Member Functions | |
| static std::vector< uint8_t > | encode (const core::dicom_dataset &dataset) |
| Encode a dataset to bytes using Implicit VR Little Endian. | |
| static result< core::dicom_dataset > | decode (std::span< const uint8_t > data) |
| Decode bytes to a dataset using Implicit VR Little Endian. | |
| static std::vector< uint8_t > | encode_element (const core::dicom_element &element) |
| Encode a single element to bytes. | |
| static result< core::dicom_element > | decode_element (std::span< const uint8_t > &data) |
| Decode a single element from bytes. | |
Static Private Member Functions | |
| static void | encode_sequence (std::vector< uint8_t > &buffer, const core::dicom_element &element) |
| static void | encode_sequence_item (std::vector< uint8_t > &buffer, const core::dicom_dataset &item) |
| static result< core::dicom_element > | decode_undefined_length (core::dicom_tag tag, vr_type vr, std::span< const uint8_t > &data) |
| static result< core::dicom_dataset > | decode_sequence_item (std::span< const uint8_t > &data) |
Encoder/decoder for Implicit VR Little Endian transfer syntax.
Implicit VR encoding format: ┌─────────────────────────────────────────┐ │ Data Element │ ├───────────┬───────────┬─────────────────┤ │ Group │ Element │ Length │Value│ │ (2 bytes) │ (2 bytes) │ (4 bytes) │ │ │ LE │ LE │ LE │ │ └───────────┴───────────┴───────────┴─────┘
Notes:
Definition at line 53 of file implicit_vr_codec.h.
| using kcenon::pacs::encoding::implicit_vr_codec::result = kcenon::pacs::Result<T> |
Result type for decode operations using kcenon::pacs::Result<T> pattern.
Definition at line 59 of file implicit_vr_codec.h.
|
staticnodiscard |
Decode bytes to a dataset using Implicit VR Little Endian.
| data | The bytes to decode |
Definition at line 168 of file implicit_vr_codec.cpp.
References decode_element(), kcenon::pacs::core::dicom_dataset::insert(), and kcenon::pacs::pacs_error().
Referenced by kcenon::pacs::network::dimse::dimse_message::decode(), and decode_sequence_item().


|
staticnodiscard |
Decode a single element from bytes.
The span reference is advanced past the decoded element.
| data | Reference to the data span (will be modified) |
Definition at line 202 of file implicit_vr_codec.cpp.
References decode_undefined_length(), kcenon::pacs::core::dicom_dictionary::instance(), kcenon::pacs::error_codes::insufficient_data, kcenon::pacs::encoding::UN, and vr.
Referenced by decode(), and decode_sequence_item().


|
staticprivate |
Definition at line 343 of file implicit_vr_codec.cpp.
References decode(), decode_element(), kcenon::pacs::error_codes::insufficient_data, and kcenon::pacs::error_codes::invalid_sequence.
Referenced by decode_undefined_length().


|
staticprivate |
Definition at line 255 of file implicit_vr_codec.cpp.
References decode_sequence_item(), kcenon::pacs::error_codes::insufficient_data, kcenon::pacs::error_codes::invalid_sequence, kcenon::pacs::core::dicom_element::sequence_items(), kcenon::pacs::encoding::SQ, and vr.
Referenced by decode_element().


|
staticnodiscard |
Encode a dataset to bytes using Implicit VR Little Endian.
| dataset | The dataset to encode |
Definition at line 91 of file implicit_vr_codec.cpp.
References encode_element().
Referenced by kcenon::pacs::network::dimse::dimse_message::encode(), encode_sequence_item(), and kcenon::pacs::network::dimse::dimse_message::update_command_group_length().


|
staticnodiscard |
Encode a single element to bytes.
| element | The element to encode |
Definition at line 104 of file implicit_vr_codec.cpp.
References encode_sequence(), kcenon::pacs::core::dicom_element::is_sequence(), kcenon::pacs::encoding::pad_to_even(), kcenon::pacs::core::dicom_element::raw_data(), kcenon::pacs::core::dicom_element::tag(), and kcenon::pacs::core::dicom_element::vr().
Referenced by encode().


|
staticprivate |
Definition at line 131 of file implicit_vr_codec.cpp.
References encode_sequence_item(), and kcenon::pacs::core::dicom_element::sequence_items().
Referenced by encode_element().


|
staticprivate |
Definition at line 148 of file implicit_vr_codec.cpp.
References encode().
Referenced by encode_sequence().

