PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
rt_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
19#ifndef PACS_SERVICES_SOP_CLASSES_RT_STORAGE_HPP
20#define PACS_SERVICES_SOP_CLASSES_RT_STORAGE_HPP
21
22#include <array>
23#include <cstdint>
24#include <string>
25#include <string_view>
26#include <vector>
27
29
30// =============================================================================
31// RT Storage SOP Class UIDs
32// =============================================================================
33
36
38inline constexpr std::string_view rt_plan_storage_uid =
39 "1.2.840.10008.5.1.4.1.1.481.5";
40
42inline constexpr std::string_view rt_dose_storage_uid =
43 "1.2.840.10008.5.1.4.1.1.481.2";
44
46inline constexpr std::string_view rt_structure_set_storage_uid =
47 "1.2.840.10008.5.1.4.1.1.481.3";
48
50inline constexpr std::string_view rt_image_storage_uid =
51 "1.2.840.10008.5.1.4.1.1.481.1";
52
54inline constexpr std::string_view rt_beams_treatment_record_storage_uid =
55 "1.2.840.10008.5.1.4.1.1.481.4";
56
58inline constexpr std::string_view rt_brachy_treatment_record_storage_uid =
59 "1.2.840.10008.5.1.4.1.1.481.6";
60
62inline constexpr std::string_view rt_treatment_summary_record_storage_uid =
63 "1.2.840.10008.5.1.4.1.1.481.7";
64
66inline constexpr std::string_view rt_ion_plan_storage_uid =
67 "1.2.840.10008.5.1.4.1.1.481.8";
68
70inline constexpr std::string_view rt_ion_beams_treatment_record_storage_uid =
71 "1.2.840.10008.5.1.4.1.1.481.9";
72
74
75// =============================================================================
76// RT-Specific Transfer Syntaxes
77// =============================================================================
78
89[[nodiscard]] std::vector<std::string> get_rt_transfer_syntaxes();
90
91// =============================================================================
92// RT SOP Class Information
93// =============================================================================
94
99 std::string_view uid;
100 std::string_view name;
101 std::string_view description;
104};
105
115[[nodiscard]] std::vector<std::string>
116get_rt_storage_sop_classes(bool include_retired = true);
117
124[[nodiscard]] const rt_sop_class_info*
125get_rt_sop_class_info(std::string_view uid) noexcept;
126
133[[nodiscard]] bool is_rt_storage_sop_class(std::string_view uid) noexcept;
134
141[[nodiscard]] bool is_rt_plan_sop_class(std::string_view uid) noexcept;
142
149[[nodiscard]] bool rt_sop_class_has_pixel_data(std::string_view uid) noexcept;
150
151// =============================================================================
152// RT Plan Type
153// =============================================================================
154
158enum class rt_plan_intent {
159 curative,
160 palliative,
163 machine_qa,
164 research,
165 service
166};
167
173[[nodiscard]] std::string_view to_string(rt_plan_intent intent) noexcept;
174
180[[nodiscard]] rt_plan_intent parse_rt_plan_intent(std::string_view value) noexcept;
181
186 patient,
188};
189
195[[nodiscard]] std::string_view to_string(rt_plan_geometry geometry) noexcept;
196
202[[nodiscard]] rt_plan_geometry parse_rt_plan_geometry(std::string_view value) noexcept;
203
204// =============================================================================
205// RT Dose Type
206// =============================================================================
207
211enum class rt_dose_type {
212 physical,
213 effective,
214 error
215};
216
222[[nodiscard]] std::string_view to_string(rt_dose_type type) noexcept;
223
229[[nodiscard]] rt_dose_type parse_rt_dose_type(std::string_view value) noexcept;
230
246
252[[nodiscard]] std::string_view to_string(rt_dose_summation_type type) noexcept;
253
259[[nodiscard]] rt_dose_summation_type parse_rt_dose_summation_type(std::string_view value) noexcept;
260
264enum class rt_dose_units {
265 gy,
266 relative
267};
268
274[[nodiscard]] std::string_view to_string(rt_dose_units units) noexcept;
275
281[[nodiscard]] rt_dose_units parse_rt_dose_units(std::string_view value) noexcept;
282
283// =============================================================================
284// RT Structure Set
285// =============================================================================
286
314
320[[nodiscard]] std::string_view to_string(rt_roi_interpreted_type type) noexcept;
321
327[[nodiscard]] rt_roi_interpreted_type parse_rt_roi_interpreted_type(std::string_view value) noexcept;
328
337
343[[nodiscard]] std::string_view to_string(rt_roi_generation_algorithm algorithm) noexcept;
344
350[[nodiscard]] rt_roi_generation_algorithm
351parse_rt_roi_generation_algorithm(std::string_view value) noexcept;
352
353// =============================================================================
354// RT Beam Information
355// =============================================================================
356
360enum class rt_beam_type {
362 dynamic
363};
364
370[[nodiscard]] std::string_view to_string(rt_beam_type type) noexcept;
371
377[[nodiscard]] rt_beam_type parse_rt_beam_type(std::string_view value) noexcept;
378
383 photon,
384 electron,
385 neutron,
386 proton,
387 ion
388};
389
395[[nodiscard]] std::string_view to_string(rt_radiation_type type) noexcept;
396
402[[nodiscard]] rt_radiation_type parse_rt_radiation_type(std::string_view value) noexcept;
403
414
420[[nodiscard]] std::string_view to_string(rt_treatment_delivery_type type) noexcept;
421
427[[nodiscard]] rt_treatment_delivery_type
428parse_rt_treatment_delivery_type(std::string_view value) noexcept;
429
430// =============================================================================
431// RT Image Information
432// =============================================================================
433
437enum class rt_image_plane {
438 axial,
439 localizer,
440 drr,
441 portal,
442 fluence
443};
444
450[[nodiscard]] std::string_view to_string(rt_image_plane plane) noexcept;
451
457[[nodiscard]] rt_image_plane parse_rt_image_plane(std::string_view value) noexcept;
458
459} // namespace kcenon::pacs::services::sop_classes
460
461#endif // PACS_SERVICES_SOP_CLASSES_RT_STORAGE_HPP
rt_plan_intent parse_rt_plan_intent(std::string_view value) noexcept
Parse RT plan intent from DICOM string.
const rt_sop_class_info * get_rt_sop_class_info(std::string_view uid) noexcept
Get information about a specific RT SOP Class.
rt_dose_units parse_rt_dose_units(std::string_view value) noexcept
Parse RT dose units from DICOM string.
constexpr std::string_view rt_structure_set_storage_uid
RT Structure Set Storage SOP Class UID.
Definition rt_storage.h:46
constexpr std::string_view rt_image_storage_uid
RT Image Storage SOP Class UID.
Definition rt_storage.h:50
constexpr std::string_view rt_ion_plan_storage_uid
RT Ion Plan Storage SOP Class UID.
Definition rt_storage.h:66
rt_roi_generation_algorithm
RT ROI Generation Algorithm.
Definition rt_storage.h:332
@ semiautomatic
SEMIAUTOMATIC - Semi-automated with user input.
constexpr std::string_view rt_dose_storage_uid
RT Dose Storage SOP Class UID.
Definition rt_storage.h:42
rt_roi_generation_algorithm parse_rt_roi_generation_algorithm(std::string_view value) noexcept
Parse RT ROI generation algorithm from DICOM string.
std::vector< std::string > get_rt_transfer_syntaxes()
Get recommended transfer syntaxes for RT objects.
rt_image_plane parse_rt_image_plane(std::string_view value) noexcept
Parse RT image plane from DICOM string.
bool rt_sop_class_has_pixel_data(std::string_view uid) noexcept
Check if a SOP Class UID contains pixel data.
rt_treatment_delivery_type
RT Treatment Delivery Type.
Definition rt_storage.h:407
@ continuation
CONTINUATION - Continuation of interrupted treatment.
@ trmt_portfilm
TRMT_PORTFILM - Treatment field portal image.
@ open_portfilm
OPEN_PORTFILM - Open field portal image.
rt_plan_geometry parse_rt_plan_geometry(std::string_view value) noexcept
Parse RT plan geometry from DICOM string.
rt_beam_type parse_rt_beam_type(std::string_view value) noexcept
Parse RT beam type from DICOM string.
@ effective
EFFECTIVE - Effective dose (RBE weighted)
@ error
ERROR - Dose error/uncertainty.
bool is_rt_storage_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is an RT Storage SOP Class.
rt_dose_summation_type parse_rt_dose_summation_type(std::string_view value) noexcept
Parse RT dose summation type from DICOM string.
bool is_rt_plan_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is an RT Plan type.
constexpr std::string_view rt_beams_treatment_record_storage_uid
RT Beams Treatment Record Storage SOP Class UID.
Definition rt_storage.h:54
rt_roi_interpreted_type parse_rt_roi_interpreted_type(std::string_view value) noexcept
Parse RT ROI interpreted type from DICOM string.
constexpr std::string_view rt_ion_beams_treatment_record_storage_uid
RT Ion Beams Treatment Record Storage SOP Class UID.
Definition rt_storage.h:70
std::vector< std::string > get_rt_storage_sop_classes(bool include_retired=true)
Get all RT Storage SOP Class UIDs.
rt_dose_summation_type
RT Dose Summation Type.
Definition rt_storage.h:234
@ brachy_session
BRACHY_SESSION - Brachytherapy session dose.
@ beam_session
BEAM_SESSION - Single beam session dose.
@ control_point
CONTROL_POINT - Single control point dose.
@ fraction_session
FRACTION_SESSION - Single fraction session dose.
rt_dose_type parse_rt_dose_type(std::string_view value) noexcept
Parse RT dose type from DICOM string.
@ treatment_device
TREATMENT_DEVICE - Device-based plan.
rt_radiation_type parse_rt_radiation_type(std::string_view value) noexcept
Parse RT radiation type from DICOM string.
@ curative
CURATIVE - Treatment with curative intent.
@ prophylactic
PROPHYLACTIC - Preventive treatment.
@ machine_qa
MACHINE_QA - Machine quality assurance.
@ verification
VERIFICATION - Plan verification.
@ palliative
PALLIATIVE - Treatment for symptom relief.
rt_image_plane
RT Image Type values (as used in Image Type attribute)
Definition rt_storage.h:437
@ drr
DRR - Digitally Reconstructed Radiograph.
@ localizer
LOCALIZER - Localizer/scout image.
constexpr std::string_view rt_brachy_treatment_record_storage_uid
RT Brachy Treatment Record Storage SOP Class UID.
Definition rt_storage.h:58
constexpr std::string_view rt_treatment_summary_record_storage_uid
RT Treatment Summary Record Storage SOP Class UID.
Definition rt_storage.h:62
@ dynamic
DYNAMIC - dynamic study (time series)
rt_roi_interpreted_type
RT ROI Interpreted Type.
Definition rt_storage.h:290
@ contrast_agent
CONTRAST_AGENT - Contrast agent region.
@ registration
REGISTRATION - Registration structure.
@ dose_region
DOSE_REGION - Dose reference region.
@ brachy_chnl_shld
BRACHY_CHNL_SHLD - Brachytherapy channel shield.
@ brachy_channel
BRACHY_CHANNEL - Brachytherapy channel.
@ brachy_accessory
BRACHY_ACCESSORY - Brachytherapy accessory.
@ brachy_src_appl
BRACHY_SRC_APPL - Brachytherapy source applicator.
constexpr std::string_view rt_plan_storage_uid
RT Plan Storage SOP Class UID.
Definition rt_storage.h:38
rt_treatment_delivery_type parse_rt_treatment_delivery_type(std::string_view value) noexcept
Parse RT treatment delivery type from DICOM string.
std::string_view to_string(dx_photometric_interpretation interp) noexcept
Convert photometric interpretation enum to DICOM string.
Information about an RT Storage SOP Class.
Definition rt_storage.h:98
std::string_view description
Brief description.
Definition rt_storage.h:101
bool has_pixel_data
Whether this SOP class contains pixel data.
Definition rt_storage.h:103
bool is_retired
Whether this SOP class is retired.
Definition rt_storage.h:102
std::string_view name
Human-readable name.
Definition rt_storage.h:100
std::string_view uid