|
PACS System 0.1.0
PACS DICOM system library
|
Byte swapping utilities for endianness conversion. More...
#include <cstdint>#include <cstring>#include <span>#include <vector>#include "simd/simd_utils.h"

Go to the source code of this file.
Namespaces | |
| namespace | kcenon |
| namespace | kcenon::pacs |
| namespace | kcenon::pacs::encoding |
Functions | |
Single Value Byte Swapping | |
| constexpr uint16_t | kcenon::pacs::encoding::byte_swap16 (uint16_t value) noexcept |
| Swaps bytes in a 16-bit value. | |
| constexpr uint32_t | kcenon::pacs::encoding::byte_swap32 (uint32_t value) noexcept |
| Swaps bytes in a 32-bit value. | |
| constexpr uint64_t | kcenon::pacs::encoding::byte_swap64 (uint64_t value) noexcept |
| Swaps bytes in a 64-bit value. | |
Big Endian Read/Write Functions | |
| constexpr uint16_t | kcenon::pacs::encoding::read_be16 (const uint8_t *data) noexcept |
| Reads a 16-bit value from big-endian bytes. | |
| constexpr uint32_t | kcenon::pacs::encoding::read_be32 (const uint8_t *data) noexcept |
| Reads a 32-bit value from big-endian bytes. | |
| constexpr uint64_t | kcenon::pacs::encoding::read_be64 (const uint8_t *data) noexcept |
| Reads a 64-bit value from big-endian bytes. | |
| void | kcenon::pacs::encoding::write_be16 (std::vector< uint8_t > &buffer, uint16_t value) |
| Writes a 16-bit value in big-endian byte order. | |
| void | kcenon::pacs::encoding::write_be32 (std::vector< uint8_t > &buffer, uint32_t value) |
| Writes a 32-bit value in big-endian byte order. | |
| void | kcenon::pacs::encoding::write_be64 (std::vector< uint8_t > &buffer, uint64_t value) |
| Writes a 64-bit value in big-endian byte order. | |
Bulk Byte Swapping for VR Types | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_ow_bytes (std::span< const uint8_t > data) |
| Swaps bytes in-place for OW (Other Word) data. | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_ol_bytes (std::span< const uint8_t > data) |
| Swaps bytes in-place for OL (Other Long) data. | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_of_bytes (std::span< const uint8_t > data) |
| Swaps bytes in-place for OF (Other Float) data. | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_od_bytes (std::span< const uint8_t > data) |
| Swaps bytes in-place for OD (Other Double) data. | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_at_bytes (std::span< const uint8_t > data) |
| Swaps bytes for AT (Attribute Tag) data. | |
Numeric Value Byte Swapping | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_us_bytes (std::span< const uint8_t > data) |
| Swaps bytes for US (Unsigned Short) value in raw data. | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_ss_bytes (std::span< const uint8_t > data) |
| Swaps bytes for SS (Signed Short) value in raw data. | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_ul_bytes (std::span< const uint8_t > data) |
| Swaps bytes for UL (Unsigned Long) value in raw data. | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_sl_bytes (std::span< const uint8_t > data) |
| Swaps bytes for SL (Signed Long) value in raw data. | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_fl_bytes (std::span< const uint8_t > data) |
| Swaps bytes for FL (Float) value in raw data. | |
| std::vector< uint8_t > | kcenon::pacs::encoding::swap_fd_bytes (std::span< const uint8_t > data) |
| Swaps bytes for FD (Double) value in raw data. | |
Byte swapping utilities for endianness conversion.
This file provides constexpr functions for converting between little-endian and big-endian byte ordering. Bulk operations use SIMD optimization when available (SSE/AVX on x86, NEON on ARM).
Definition in file byte_swap.h.