24 "1.2.840.10008.1.2.1",
28 "1.2.840.10008.1.2.4.50",
30 "1.2.840.10008.1.2.4.201",
32 "1.2.840.10008.1.2.4.70",
34 "1.2.840.10008.1.2.4.90",
36 "1.2.840.10008.1.2.4.91",
48constexpr std::string_view photometric_strings[] = {
60 auto index =
static_cast<size_t>(interp);
61 if (index < std::size(photometric_strings)) {
62 return photometric_strings[index];
69 if (value ==
"MONOCHROME1") {
72 if (value ==
"MONOCHROME2") {
75 if (value ==
"PALETTE COLOR") {
81 if (value ==
"YBR_FULL") {
84 if (value ==
"YBR_FULL_422") {
92 return value ==
"MONOCHROME1" ||
93 value ==
"MONOCHROME2" ||
94 value ==
"PALETTE COLOR" ||
96 value ==
"YBR_FULL" ||
97 value ==
"YBR_FULL_422";
107constexpr std::array<us_sop_class_info, 4> us_sop_classes = {{
111 "Single-frame ultrasound images",
117 "US Multi-frame Image Storage",
118 "Multi-frame ultrasound cine loops and 3D/4D volumes",
124 "US Image Storage (Retired)",
125 "Legacy single-frame ultrasound (retired)",
131 "US Multi-frame Image Storage (Retired)",
132 "Legacy multi-frame ultrasound (retired)",
141 std::vector<std::string> result;
142 result.reserve(include_retired ? 4 : 2);
144 for (
const auto& info : us_sop_classes) {
145 if (!info.is_retired || include_retired) {
146 result.emplace_back(info.uid);
153const us_sop_class_info*
155 auto it = std::find_if(
156 us_sop_classes.begin(),
157 us_sop_classes.end(),
158 [
uid](
const auto& info) { return info.uid == uid; }
161 if (it != us_sop_classes.end()) {
173 return info !=
nullptr && info->supports_multiframe;
us_photometric_interpretation parse_photometric_interpretation(std::string_view value) noexcept
Parse DICOM photometric interpretation string.
const us_sop_class_info * get_us_sop_class_info(std::string_view uid) noexcept
Get information about a specific US SOP Class.
bool is_us_multiframe_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is a multi-frame US Storage SOP Class.
bool is_us_storage_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is a US Storage SOP Class.
constexpr std::string_view us_image_storage_uid
US Image Storage SOP Class UID (single-frame)
constexpr std::string_view us_image_storage_retired_uid
US Image Storage (Retired) - for legacy systems.
bool is_valid_us_photometric(std::string_view value) noexcept
Check if photometric interpretation is valid for US.
us_photometric_interpretation
Supported photometric interpretations for US images.
@ palette_color
Pseudo-color via lookup table.
@ monochrome2
Minimum pixel = black (most common)
@ ybr_full
YCbCr full range.
@ monochrome1
Minimum pixel = white.
@ ybr_full_422
YCbCr 4:2:2 subsampled.
std::vector< std::string > get_us_storage_sop_classes(bool include_retired=true)
Get all US Storage SOP Class UIDs.
constexpr std::string_view us_multiframe_image_storage_uid
US Multi-frame Image Storage SOP Class UID (cine loops)
constexpr std::string_view us_multiframe_image_storage_retired_uid
US Multi-frame Image Storage (Retired) - for legacy systems.
std::string_view to_string(dx_photometric_interpretation interp) noexcept
Convert photometric interpretation enum to DICOM string.
std::vector< std::string > get_us_transfer_syntaxes()
Get recommended transfer syntaxes for US images.
Ultrasound Image Storage SOP Classes.