PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
xa_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
28#ifndef PACS_SERVICES_SOP_CLASSES_XA_STORAGE_HPP
29#define PACS_SERVICES_SOP_CLASSES_XA_STORAGE_HPP
30
31#include <array>
32#include <cstdint>
33#include <string>
34#include <string_view>
35#include <vector>
36
38
39// =============================================================================
40// X-Ray Angiographic Storage SOP Class UIDs
41// =============================================================================
42
45
47inline constexpr std::string_view xa_image_storage_uid =
48 "1.2.840.10008.5.1.4.1.1.12.1";
49
51inline constexpr std::string_view enhanced_xa_image_storage_uid =
52 "1.2.840.10008.5.1.4.1.1.12.1.1";
53
55inline constexpr std::string_view xrf_image_storage_uid =
56 "1.2.840.10008.5.1.4.1.1.12.2";
57
59
62
64inline constexpr std::string_view xray_3d_angiographic_image_storage_uid =
65 "1.2.840.10008.5.1.4.1.1.13.1.1";
66
68inline constexpr std::string_view xray_3d_craniofacial_image_storage_uid =
69 "1.2.840.10008.5.1.4.1.1.13.1.2";
70
72
73// =============================================================================
74// XA-Specific Transfer Syntaxes
75// =============================================================================
76
86[[nodiscard]] std::vector<std::string> get_xa_transfer_syntaxes();
87
88// =============================================================================
89// XA Photometric Interpretations
90// =============================================================================
91
103
109[[nodiscard]] std::string_view to_string(xa_photometric_interpretation interp) noexcept;
110
117parse_xa_photometric_interpretation(std::string_view value) noexcept;
118
124[[nodiscard]] bool is_valid_xa_photometric(std::string_view value) noexcept;
125
126// =============================================================================
127// XA SOP Class Information
128// =============================================================================
129
134 std::string_view uid;
135 std::string_view name;
136 std::string_view description;
138 bool is_3d;
140};
141
151[[nodiscard]] std::vector<std::string>
152get_xa_storage_sop_classes(bool include_3d = true);
153
160[[nodiscard]] const xa_sop_class_info*
161get_xa_sop_class_info(std::string_view uid) noexcept;
162
169[[nodiscard]] bool is_xa_storage_sop_class(std::string_view uid) noexcept;
170
177[[nodiscard]] bool is_xa_multiframe_sop_class(std::string_view uid) noexcept;
178
185[[nodiscard]] bool is_enhanced_xa_sop_class(std::string_view uid) noexcept;
186
193[[nodiscard]] bool is_xa_3d_sop_class(std::string_view uid) noexcept;
194
195// =============================================================================
196// XA Positioner Information
197// =============================================================================
198
205 stationary,
206 dynamic
207};
208
214[[nodiscard]] std::string_view to_string(xa_positioner_motion motion) noexcept;
215
225
230 [[nodiscard]] bool is_valid() const noexcept;
231};
232
233// =============================================================================
234// XA Frame Information
235// =============================================================================
236
243enum class xa_frame_rate : uint16_t {
244 fps_7_5 = 8,
245 fps_15 = 15,
246 fps_30 = 30
247};
248
253[[nodiscard]] constexpr uint16_t get_default_xa_cine_rate() noexcept {
254 return 15;
255}
256
265[[nodiscard]] constexpr size_t get_max_xa_frame_count() noexcept {
266 return 2000; // Typical max for long cardiac runs
267}
268
269// =============================================================================
270// XA Calibration Information
271// =============================================================================
272
280 double imager_pixel_spacing[2];
283
288 [[nodiscard]] double magnification_factor() const noexcept;
289
294 [[nodiscard]] double isocenter_pixel_spacing() const noexcept;
295
300 [[nodiscard]] bool is_valid() const noexcept;
301};
302
303} // namespace kcenon::pacs::services::sop_classes
304
305#endif // PACS_SERVICES_SOP_CLASSES_XA_STORAGE_HPP
std::vector< std::string > get_xa_transfer_syntaxes()
Get recommended transfer syntaxes for XA images.
xa_photometric_interpretation
Supported photometric interpretations for XA/XRF images.
Definition xa_storage.h:99
xa_frame_rate
Common XA frame rates in frames per second.
Definition xa_storage.h:243
@ fps_30
30 fps (high temporal resolution)
constexpr std::string_view enhanced_xa_image_storage_uid
Enhanced XA Image Storage SOP Class UID (enhanced IOD)
Definition xa_storage.h:51
constexpr uint16_t get_default_xa_cine_rate() noexcept
Get typical cine rate for cardiac XA.
Definition xa_storage.h:253
bool is_xa_multiframe_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is a multi-frame XA Storage SOP Class.
std::vector< std::string > get_xa_storage_sop_classes(bool include_3d=true)
Get all XA/XRF Storage SOP Class UIDs.
bool is_enhanced_xa_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is an enhanced XA SOP Class.
constexpr std::string_view xrf_image_storage_uid
XRF Image Storage SOP Class UID (X-Ray Radiofluoroscopic)
Definition xa_storage.h:55
bool is_valid_xa_photometric(std::string_view value) noexcept
Check if photometric interpretation is valid for XA.
constexpr size_t get_max_xa_frame_count() noexcept
Get maximum recommended frame count for XA acquisitions.
Definition xa_storage.h:265
constexpr std::string_view xray_3d_craniofacial_image_storage_uid
X-Ray 3D Craniofacial Image Storage SOP Class UID.
Definition xa_storage.h:68
constexpr std::string_view xray_3d_angiographic_image_storage_uid
X-Ray 3D Angiographic Image Storage SOP Class UID (3D rotational)
Definition xa_storage.h:64
const xa_sop_class_info * get_xa_sop_class_info(std::string_view uid) noexcept
Get information about a specific XA SOP Class.
bool is_xa_storage_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is an XA/XRF Storage SOP Class.
constexpr std::string_view xa_image_storage_uid
XA Image Storage SOP Class UID (single/multi-frame)
Definition xa_storage.h:47
xa_positioner_motion
Positioner motion type.
Definition xa_storage.h:204
xa_photometric_interpretation parse_xa_photometric_interpretation(std::string_view value) noexcept
Parse DICOM photometric interpretation string for XA.
@ dynamic
DYNAMIC - dynamic study (time series)
bool is_xa_3d_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is a 3D XA SOP Class.
std::string_view to_string(dx_photometric_interpretation interp) noexcept
Convert photometric interpretation enum to DICOM string.
XA calibration data for quantitative analysis.
Definition xa_storage.h:279
bool is_valid() const noexcept
Check if angles are within valid range.
double secondary_angle
Cranial/Caudal angle in degrees.
Definition xa_storage.h:224
Information about an XA/XRF Storage SOP Class.
Definition xa_storage.h:133
std::string_view description
Brief description.
Definition xa_storage.h:136
bool is_3d
Whether this is a 3D acquisition.
Definition xa_storage.h:138
bool is_enhanced
Whether this is an enhanced IOD.
Definition xa_storage.h:137
bool supports_multiframe
Whether multi-frame is supported.
Definition xa_storage.h:139
std::string_view name
Human-readable name.
Definition xa_storage.h:135
std::string_view uid