PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
dx_storage.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2021-2025, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
24#ifndef PACS_SERVICES_SOP_CLASSES_DX_STORAGE_HPP
25#define PACS_SERVICES_SOP_CLASSES_DX_STORAGE_HPP
26
27#include <array>
28#include <cstdint>
29#include <string>
30#include <string_view>
31#include <vector>
32
34
35// =============================================================================
36// Digital X-Ray Storage SOP Class UIDs
37// =============================================================================
38
41
44inline constexpr std::string_view dx_image_storage_for_presentation_uid =
45 "1.2.840.10008.5.1.4.1.1.1.1";
46
49inline constexpr std::string_view dx_image_storage_for_processing_uid =
50 "1.2.840.10008.5.1.4.1.1.1.1.1";
51
53
56
58inline constexpr std::string_view mammography_image_storage_for_presentation_uid =
59 "1.2.840.10008.5.1.4.1.1.1.2";
60
62inline constexpr std::string_view mammography_image_storage_for_processing_uid =
63 "1.2.840.10008.5.1.4.1.1.1.2.1";
64
66
69
71inline constexpr std::string_view intraoral_image_storage_for_presentation_uid =
72 "1.2.840.10008.5.1.4.1.1.1.3";
73
75inline constexpr std::string_view intraoral_image_storage_for_processing_uid =
76 "1.2.840.10008.5.1.4.1.1.1.3.1";
77
79
80// =============================================================================
81// DX-Specific Transfer Syntaxes
82// =============================================================================
83
93[[nodiscard]] std::vector<std::string> get_dx_transfer_syntaxes();
94
95// =============================================================================
96// DX Photometric Interpretations
97// =============================================================================
98
109
115[[nodiscard]] std::string_view to_string(dx_photometric_interpretation interp) noexcept;
116
123parse_dx_photometric_interpretation(std::string_view value) noexcept;
124
130[[nodiscard]] bool is_valid_dx_photometric(std::string_view value) noexcept;
131
132// =============================================================================
133// DX Image Types
134// =============================================================================
135
143
149[[nodiscard]] std::string_view to_string(dx_image_type type) noexcept;
150
151// =============================================================================
152// DX View Position
153// =============================================================================
154
162 ap,
163 pa,
164 lateral,
165 oblique,
166 other
167};
168
174[[nodiscard]] std::string_view to_string(dx_view_position position) noexcept;
175
181[[nodiscard]] dx_view_position parse_view_position(std::string_view value) noexcept;
182
183// =============================================================================
184// DX Detector Type
185// =============================================================================
186
193 direct,
194 indirect,
195 storage,
196 film
197};
198
204[[nodiscard]] std::string_view to_string(dx_detector_type type) noexcept;
205
211[[nodiscard]] dx_detector_type parse_detector_type(std::string_view value) noexcept;
212
213// =============================================================================
214// DX SOP Class Information
215// =============================================================================
216
221 std::string_view uid;
222 std::string_view name;
223 std::string_view description;
227};
228
239[[nodiscard]] std::vector<std::string>
240get_dx_storage_sop_classes(bool include_mammography = true,
241 bool include_intraoral = true);
242
249[[nodiscard]] const dx_sop_class_info*
250get_dx_sop_class_info(std::string_view uid) noexcept;
251
260[[nodiscard]] bool is_dx_storage_sop_class(std::string_view uid) noexcept;
261
271[[nodiscard]] bool is_dx_for_processing_sop_class(std::string_view uid) noexcept;
272
281[[nodiscard]] bool is_dx_for_presentation_sop_class(std::string_view uid) noexcept;
282
289[[nodiscard]] bool is_mammography_sop_class(std::string_view uid) noexcept;
290
291// =============================================================================
292// DX Body Part Information
293// =============================================================================
294
300enum class dx_body_part {
301 chest,
302 abdomen,
303 pelvis,
304 spine,
305 skull,
306 hand,
307 foot,
308 knee,
309 elbow,
310 shoulder,
311 hip,
312 wrist,
313 ankle,
314 extremity,
315 breast,
316 other
317};
318
324[[nodiscard]] std::string_view to_string(dx_body_part part) noexcept;
325
331[[nodiscard]] dx_body_part parse_body_part(std::string_view value) noexcept;
332
333} // namespace kcenon::pacs::services::sop_classes
334
335#endif // PACS_SERVICES_SOP_CLASSES_DX_STORAGE_HPP
constexpr std::string_view dx_image_storage_for_processing_uid
Digital X-Ray Image Storage - For Processing SOP Class UID Used for raw detector data requiring addit...
Definition dx_storage.h:49
dx_detector_type
DX detector technology types.
Definition dx_storage.h:192
@ indirect
Indirect conversion (scintillator + photodiode)
std::vector< std::string > get_dx_transfer_syntaxes()
Get recommended transfer syntaxes for DX images.
bool is_dx_for_processing_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is a For Processing SOP Class.
dx_photometric_interpretation
Supported photometric interpretations for DX images.
Definition dx_storage.h:105
dx_photometric_interpretation parse_dx_photometric_interpretation(std::string_view value) noexcept
Parse DICOM photometric interpretation string for DX.
std::vector< std::string > get_dx_storage_sop_classes(bool include_mammography=true, bool include_intraoral=true)
Get all DX Storage SOP Class UIDs.
constexpr std::string_view dx_image_storage_for_presentation_uid
Digital X-Ray Image Storage - For Presentation SOP Class UID Used for images ready for display and cl...
Definition dx_storage.h:44
dx_view_position
Common radiographic view positions for DX images.
Definition dx_storage.h:161
constexpr std::string_view intraoral_image_storage_for_processing_uid
Digital Intra-Oral X-Ray Image Storage - For Processing.
Definition dx_storage.h:75
constexpr std::string_view mammography_image_storage_for_processing_uid
Digital Mammography X-Ray Image Storage - For Processing.
Definition dx_storage.h:62
bool is_dx_for_presentation_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is a For Presentation SOP Class.
dx_detector_type parse_detector_type(std::string_view value) noexcept
Parse DICOM detector type string.
constexpr std::string_view intraoral_image_storage_for_presentation_uid
Digital Intra-Oral X-Ray Image Storage - For Presentation.
Definition dx_storage.h:71
bool is_valid_dx_photometric(std::string_view value) noexcept
Check if photometric interpretation is valid for DX.
bool is_dx_storage_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is a DX Storage SOP Class.
const dx_sop_class_info * get_dx_sop_class_info(std::string_view uid) noexcept
Get information about a specific DX SOP Class.
dx_image_type
DX image purpose classification.
Definition dx_storage.h:139
@ for_presentation
Ready for display and diagnosis.
@ for_processing
Raw data requiring further processing.
dx_body_part
Common body parts for DX imaging.
Definition dx_storage.h:300
dx_view_position parse_view_position(std::string_view value) noexcept
Parse DICOM view position string.
bool is_mammography_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is a mammography SOP Class.
constexpr std::string_view mammography_image_storage_for_presentation_uid
Digital Mammography X-Ray Image Storage - For Presentation.
Definition dx_storage.h:58
std::string_view to_string(dx_photometric_interpretation interp) noexcept
Convert photometric interpretation enum to DICOM string.
dx_body_part parse_body_part(std::string_view value) noexcept
Parse DICOM body part examined string.
Information about a DX Storage SOP Class.
Definition dx_storage.h:220
bool is_mammography
True if this is a mammography class.
Definition dx_storage.h:225
std::string_view description
Brief description.
Definition dx_storage.h:223
std::string_view name
Human-readable name.
Definition dx_storage.h:222
bool is_intraoral
True if this is an intra-oral class.
Definition dx_storage.h:226
dx_image_type image_type
For Presentation or For Processing.
Definition dx_storage.h:224
std::string_view uid