PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
nm_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
18#ifndef PACS_SERVICES_SOP_CLASSES_NM_STORAGE_HPP
19#define PACS_SERVICES_SOP_CLASSES_NM_STORAGE_HPP
20
21#include <array>
22#include <cstdint>
23#include <string>
24#include <string_view>
25#include <vector>
26
28
29// =============================================================================
30// NM Storage SOP Class UIDs
31// =============================================================================
32
35
37inline constexpr std::string_view nm_image_storage_uid =
38 "1.2.840.10008.5.1.4.1.1.20";
39
41
44
46inline constexpr std::string_view nm_image_storage_retired_uid =
47 "1.2.840.10008.5.1.4.1.1.5";
48
50
51// =============================================================================
52// NM-Specific Transfer Syntaxes
53// =============================================================================
54
64[[nodiscard]] std::vector<std::string> get_nm_transfer_syntaxes();
65
66// =============================================================================
67// NM Photometric Interpretations
68// =============================================================================
69
80
86[[nodiscard]] std::string_view to_string(nm_photometric_interpretation interp) noexcept;
87
94parse_nm_photometric_interpretation(std::string_view value) noexcept;
95
101[[nodiscard]] bool is_valid_nm_photometric(std::string_view value) noexcept;
102
103// =============================================================================
104// NM SOP Class Information
105// =============================================================================
106
111 std::string_view uid;
112 std::string_view name;
113 std::string_view description;
116};
117
127[[nodiscard]] std::vector<std::string>
128get_nm_storage_sop_classes(bool include_retired = true);
129
136[[nodiscard]] const nm_sop_class_info*
137get_nm_sop_class_info(std::string_view uid) noexcept;
138
145[[nodiscard]] bool is_nm_storage_sop_class(std::string_view uid) noexcept;
146
153[[nodiscard]] bool is_nm_multiframe_sop_class(std::string_view uid) noexcept;
154
155// =============================================================================
156// NM Image Type Codes
157// =============================================================================
158
162enum class nm_type_of_data {
164 dynamic,
165 gated,
166 whole_body,
167 recon_tomo,
169 tomo,
171};
172
178[[nodiscard]] std::string_view to_string(nm_type_of_data type) noexcept;
179
185[[nodiscard]] nm_type_of_data parse_nm_type_of_data(std::string_view value) noexcept;
186
187// =============================================================================
188// NM Detector Information
189// =============================================================================
190
195 planar,
196 ring,
198 curved,
200};
201
206 parallel,
207 fan_beam,
208 cone_beam,
209 pinhole,
210 diverging,
211 converging,
212 none
213};
214
220[[nodiscard]] std::string_view to_string(nm_collimator_type collimator) noexcept;
221
227[[nodiscard]] nm_collimator_type parse_nm_collimator_type(std::string_view value) noexcept;
228
229// =============================================================================
230// NM Energy Window Information
231// =============================================================================
232
237 double lower_limit;
238 double upper_limit;
239 std::string name;
240};
241
245enum class nm_radioisotope {
246 tc99m,
247 i131,
248 i123,
249 tl201,
250 ga67,
251 in111,
252 f18,
253 other
254};
255
261[[nodiscard]] std::string_view to_string(nm_radioisotope isotope) noexcept;
262
268[[nodiscard]] double get_primary_energy_kev(nm_radioisotope isotope) noexcept;
269
270// =============================================================================
271// NM Acquisition Information
272// =============================================================================
273
278 cw,
279 cc
280};
281
285enum class nm_scan_arc {
286 arc_180,
287 arc_360
288};
289
298
304[[nodiscard]] std::string_view to_string(nm_whole_body_technique technique) noexcept;
305
306} // namespace kcenon::pacs::services::sop_classes
307
308#endif // PACS_SERVICES_SOP_CLASSES_NM_STORAGE_HPP
nm_rotation_direction
NM rotation direction for SPECT.
Definition nm_storage.h:277
nm_collimator_type
NM collimator type.
Definition nm_storage.h:205
nm_photometric_interpretation
Supported photometric interpretations for NM images.
Definition nm_storage.h:76
@ palette_color
Pseudo-color via lookup table (for display)
bool is_valid_nm_photometric(std::string_view value) noexcept
Check if photometric interpretation is valid for NM.
nm_type_of_data parse_nm_type_of_data(std::string_view value) noexcept
Parse NM type of data from DICOM string.
nm_radioisotope
Common radioisotopes used in NM imaging.
Definition nm_storage.h:245
nm_photometric_interpretation parse_nm_photometric_interpretation(std::string_view value) noexcept
Parse DICOM photometric interpretation string.
@ cc
Craniocaudal - standard superior-inferior view.
nm_detector_geometry
NM detector geometry type.
Definition nm_storage.h:194
constexpr std::string_view nm_image_storage_retired_uid
Nuclear Medicine Image Storage (Retired) - for legacy systems.
Definition nm_storage.h:46
bool is_nm_multiframe_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID supports multi-frame.
nm_whole_body_technique
Patient orientation for whole body scan.
Definition nm_storage.h:293
@ multi_pass
2PASS - Multiple pass (anterior/posterior)
std::vector< std::string > get_nm_transfer_syntaxes()
Get recommended transfer syntaxes for NM images.
double get_primary_energy_kev(nm_radioisotope isotope) noexcept
Get primary photopeak energy for radioisotope.
bool is_nm_storage_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is a NM Storage SOP Class.
nm_type_of_data
NM image type (Type of Data)
Definition nm_storage.h:162
@ gated
GATED - cardiac gated acquisition.
@ gated_tomo
GATED TOMO - gated SPECT projections.
@ dynamic
DYNAMIC - dynamic study (time series)
@ tomo
TOMO - SPECT raw projection data.
@ recon_tomo
RECON TOMO - reconstructed SPECT.
@ recon_gated_tomo
RECON GATED TOMO - reconstructed gated SPECT.
constexpr std::string_view nm_image_storage_uid
Nuclear Medicine Image Storage SOP Class UID.
Definition nm_storage.h:37
std::vector< std::string > get_nm_storage_sop_classes(bool include_retired=true)
Get all NM Storage SOP Class UIDs.
nm_scan_arc
NM scan arc for SPECT.
Definition nm_storage.h:285
@ arc_360
360 degree arc (full rotation)
nm_collimator_type parse_nm_collimator_type(std::string_view value) noexcept
Parse collimator type from DICOM string.
std::string_view to_string(dx_photometric_interpretation interp) noexcept
Convert photometric interpretation enum to DICOM string.
const nm_sop_class_info * get_nm_sop_class_info(std::string_view uid) noexcept
Get information about a specific NM SOP Class.
Energy window information for NM acquisition.
Definition nm_storage.h:236
std::string name
Window name (e.g., "Tc-99m", "I-131")
Definition nm_storage.h:239
Information about a NM Storage SOP Class.
Definition nm_storage.h:110
std::string_view description
Brief description.
Definition nm_storage.h:113
std::string_view name
Human-readable name.
Definition nm_storage.h:112
bool supports_multiframe
Whether multi-frame is supported.
Definition nm_storage.h:115
bool is_retired
Whether this SOP class is retired.
Definition nm_storage.h:114
std::string_view uid