PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
parametric_map_storage.cpp
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
13
14#include <array>
15
17
18// =============================================================================
19// Transfer Syntaxes
20// =============================================================================
21
22std::vector<std::string> get_parametric_map_transfer_syntaxes() {
23 return {
24 // Explicit VR Little Endian (preferred for interoperability)
25 "1.2.840.10008.1.2.1",
26 // Implicit VR Little Endian (universal baseline)
27 "1.2.840.10008.1.2",
28 // JPEG 2000 Lossless (preserves float data integrity)
29 "1.2.840.10008.1.2.4.90",
30 // HTJ2K Lossless (high-throughput lossless)
31 "1.2.840.10008.1.2.4.201",
32 // RLE Lossless
33 "1.2.840.10008.1.2.5"
34 };
35}
36
37// =============================================================================
38// Pixel Value Representation
39// =============================================================================
40
42 switch (repr) {
44 return 32;
46 return 64;
47 }
48 return 32;
49}
50
52parse_pixel_value_representation(uint16_t bits_allocated) noexcept {
53 if (bits_allocated == 64) {
55 }
57}
58
59bool is_valid_parametric_map_bits_allocated(uint16_t bits_allocated) noexcept {
60 return bits_allocated == 32 || bits_allocated == 64;
61}
62
63// =============================================================================
64// SOP Class Information
65// =============================================================================
66
67namespace {
68
69constexpr std::array<parametric_map_sop_class_info, 1> pmap_sop_classes = {{
70 {
72 "Parametric Map Storage",
73 "Voxel-level quantitative parameter maps (ADC, perfusion, T1/T2)",
74 false
75 }
76}};
77
78} // namespace
79
80std::vector<std::string> get_parametric_map_storage_sop_classes() {
81 return {
83 };
84}
85
86const parametric_map_sop_class_info*
87get_parametric_map_sop_class_info(std::string_view uid) noexcept {
89 return &pmap_sop_classes[0];
90 }
91 return nullptr;
92}
93
94bool is_parametric_map_storage_sop_class(std::string_view uid) noexcept {
96}
97
98// =============================================================================
99// Photometric Interpretation Validation
100// =============================================================================
101
102bool is_valid_parametric_map_photometric(std::string_view value) noexcept {
103 return value == "MONOCHROME2";
104}
105
106} // namespace kcenon::pacs::services::sop_classes
const parametric_map_sop_class_info * get_parametric_map_sop_class_info(std::string_view uid) noexcept
Get information about the Parametric Map SOP Class.
uint16_t get_bits_allocated(pixel_value_representation repr) noexcept
Get bits allocated for a pixel value representation.
bool is_parametric_map_storage_sop_class(std::string_view uid) noexcept
Check if a SOP Class UID is Parametric Map Storage.
bool is_valid_parametric_map_bits_allocated(uint16_t bits_allocated) noexcept
Check if a BitsAllocated value is valid for parametric maps.
pixel_value_representation parse_pixel_value_representation(uint16_t bits_allocated) noexcept
Parse pixel value representation from BitsAllocated value.
pixel_value_representation
Pixel value representation for parametric map data.
@ float32
32-bit IEEE 754 floating point (BitsAllocated=32)
@ float64
64-bit IEEE 754 floating point (BitsAllocated=64)
constexpr std::string_view parametric_map_storage_uid
Parametric Map Storage SOP Class UID.
std::vector< std::string > get_parametric_map_storage_sop_classes()
Get all Parametric Map Storage SOP Class UIDs.
std::vector< std::string > get_parametric_map_transfer_syntaxes()
Get recommended transfer syntaxes for Parametric Map objects.
bool is_valid_parametric_map_photometric(std::string_view value) noexcept
Check if photometric interpretation is valid for parametric maps.
Parametric Map Storage SOP Class.
std::string_view uid