PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
character_set.cpp File Reference

Implementation of DICOM Character Set registry, ISO 2022 parser, and decoder. More...

#include "kcenon/pacs/encoding/character_set.h"
#include <algorithm>
#include <array>
#include <cstring>
#include <unicode/ucnv.h>
#include <unicode/utypes.h>
Include dependency graph for character_set.cpp:

Go to the source code of this file.

Namespaces

namespace  kcenon
 
namespace  kcenon::pacs
 
namespace  kcenon::pacs::encoding
 

Functions

Character Set Registry
const character_set_infokcenon::pacs::encoding::find_character_set (std::string_view defined_term) noexcept
 Look up character set info by DICOM Defined Term.
 
const character_set_infokcenon::pacs::encoding::find_character_set_by_ir (int iso_ir_number) noexcept
 Look up character set info by ISO-IR number.
 
const character_set_infokcenon::pacs::encoding::default_character_set () noexcept
 Get the default character set (ISO-IR 6, ASCII).
 
std::vector< const character_set_info * > kcenon::pacs::encoding::all_character_sets () noexcept
 Get all registered character sets.
 
Specific Character Set Parsing
specific_character_set kcenon::pacs::encoding::parse_specific_character_set (std::string_view value)
 Parse a Specific Character Set (0008,0005) value.
 
ISO 2022 Escape Sequence Detection
std::vector< text_segmentkcenon::pacs::encoding::split_by_escape_sequences (std::string_view text, const specific_character_set &scs)
 Split a string into segments by ISO 2022 escape sequences.
 
String Decoding
std::string kcenon::pacs::encoding::convert_to_utf8 (std::string_view text, const character_set_info &charset)
 Decode a single segment from a specific encoding to UTF-8.
 
std::string kcenon::pacs::encoding::decode_to_utf8 (std::string_view text, const specific_character_set &scs)
 Decode a DICOM string to UTF-8 using the given character set.
 
std::string kcenon::pacs::encoding::decode_person_name (std::string_view pn_value, const specific_character_set &scs)
 Decode a Person Name (PN) value to UTF-8.
 
std::string kcenon::pacs::encoding::convert_from_utf8 (std::string_view utf8_text, const character_set_info &charset)
 Encode a single UTF-8 segment to a specific character set.
 
std::string kcenon::pacs::encoding::encode_from_utf8 (std::string_view utf8_text, const specific_character_set &scs)
 Encode a UTF-8 string to the target character set encoding.
 

Detailed Description

Implementation of DICOM Character Set registry, ISO 2022 parser, and decoder.

Definition in file character_set.cpp.