83 [[nodiscard]]
static auto from_string(std::string_view str)
84 -> std::optional<dicom_tag>;
90 [[nodiscard]]
constexpr auto group() const noexcept -> uint16_t {
91 return static_cast<uint16_t
>(
combined_ >> 16);
98 [[nodiscard]]
constexpr auto element() const noexcept -> uint16_t {
99 return static_cast<uint16_t
>(
combined_ & 0xFFFF);
106 [[nodiscard]]
constexpr auto combined() const noexcept -> uint32_t {
119 [[nodiscard]]
constexpr auto is_private() const noexcept ->
bool {
120 const auto grp =
group();
121 return (grp & 1) != 0 && grp > 0x0008;
145 return elem >= 0x0010 && elem <= 0x00FF;
170 -> std::optional<uint8_t> {
174 return static_cast<uint8_t
>(
element() >> 8);
208 const auto block =
static_cast<uint16_t
>(
element() << 8);
219 [[nodiscard]]
auto to_string() const -> std::
string;
227 [[nodiscard]] constexpr auto operator<=>(const
dicom_tag& other) const noexcept
228 -> std::strong_ordering = default;
233 [[nodiscard]] constexpr auto operator==(const
dicom_tag& other) const noexcept
248 return std::hash<uint32_t>{}(tag.combined());
constexpr auto private_block_number() const noexcept -> std::optional< uint8_t >
Extract the Private Creator block number from this tag.
constexpr auto private_data_range() const noexcept -> std::optional< std::pair< dicom_tag, dicom_tag > >
Get the data element range owned by this Private Creator tag.
constexpr auto is_private() const noexcept -> bool
Check if this is a private tag.
constexpr auto is_group_length() const noexcept -> bool
Check if this is a group length tag (xxxx,0000)
static auto from_string(std::string_view str) -> std::optional< dicom_tag >
Parse tag from string representation.
constexpr auto is_private_creator() const noexcept -> bool
Check if this is a private creator tag.
constexpr dicom_tag(uint16_t group, uint16_t element) noexcept
Construct from group and element numbers.
constexpr auto private_creator_tag() const noexcept -> std::optional< dicom_tag >
Get the Private Creator tag that owns this data element.
auto to_string() const -> std::string
Convert to string representation.
constexpr dicom_tag(uint32_t combined) noexcept
Construct from combined 32-bit value.
constexpr auto group() const noexcept -> uint16_t
Get the group number.
constexpr auto is_private_data() const noexcept -> bool
Check if this is a private data element.
constexpr auto element() const noexcept -> uint16_t
Get the element number.
constexpr dicom_tag() noexcept
Default constructor - creates tag (0000,0000)
constexpr auto combined() const noexcept -> uint32_t
Get the combined 32-bit value.
auto operator()(const kcenon::pacs::core::dicom_tag &tag) const noexcept -> size_t