PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
test_data_generator.cpp
Go to the documentation of this file.
1
9
11
12#include <algorithm>
13#include <atomic>
14#include <chrono>
15#include <ctime>
16#include <iomanip>
17#include <random>
18#include <set>
19#include <sstream>
20
22
23// =============================================================================
24// multi_modal_study Implementation
25// =============================================================================
26
27std::vector<core::dicom_dataset>
28multi_modal_study::get_by_modality(const std::string& modality) const {
29 std::vector<core::dicom_dataset> result;
30 for (const auto& ds : datasets) {
31 if (ds.get_string(core::tags::modality) == modality) {
32 result.push_back(ds);
33 }
34 }
35 return result;
36}
37
39 std::set<std::string> series_uids;
40 for (const auto& ds : datasets) {
41 auto uid = ds.get_string(core::tags::series_instance_uid);
42 if (!uid.empty()) {
43 series_uids.insert(uid);
44 }
45 }
46 return series_uids.size();
47}
48
49// =============================================================================
50// Utility Functions Implementation
51// =============================================================================
52
53std::string test_data_generator::generate_uid(const std::string& root) {
54 static std::atomic<uint64_t> counter{0};
55 auto now = std::chrono::system_clock::now();
56 auto timestamp = std::chrono::duration_cast<std::chrono::milliseconds>(
57 now.time_since_epoch()).count();
58
59 return root + "." + std::to_string(timestamp) + "." + std::to_string(++counter);
60}
61
63 auto now = std::chrono::system_clock::now();
64 auto time_t_now = std::chrono::system_clock::to_time_t(now);
65 std::tm tm_now{};
66#ifdef _WIN32
67 localtime_s(&tm_now, &time_t_now);
68#else
69 localtime_r(&time_t_now, &tm_now);
70#endif
71
72 std::ostringstream oss;
73 oss << std::put_time(&tm_now, "%Y%m%d");
74 return oss.str();
75}
76
78 auto now = std::chrono::system_clock::now();
79 auto time_t_now = std::chrono::system_clock::to_time_t(now);
80 std::tm tm_now{};
81#ifdef _WIN32
82 localtime_s(&tm_now, &time_t_now);
83#else
84 localtime_r(&time_t_now, &tm_now);
85#endif
86
87 std::ostringstream oss;
88 oss << std::put_time(&tm_now, "%H%M%S");
89 return oss.str();
90}
91
92// =============================================================================
93// Private Helper Functions
94// =============================================================================
95
98 const std::string& patient_name,
99 const std::string& patient_id,
100 const std::string& birth_date,
101 const std::string& sex) {
102
107}
108
111 const std::string& study_uid,
112 const std::string& accession_number,
113 const std::string& study_id,
114 const std::string& description) {
115
117 study_uid.empty() ? generate_uid() : study_uid);
123}
124
127 const std::string& series_uid,
128 const std::string& modality,
129 const std::string& series_number,
130 const std::string& description) {
131
133 series_uid.empty() ? generate_uid() : series_uid);
137}
138
141 uint16_t rows,
142 uint16_t columns,
143 uint16_t bits_allocated,
144 uint16_t bits_stored,
145 uint16_t samples_per_pixel,
146 const std::string& photometric) {
147
150 ds.set_numeric<uint16_t>(core::tags::bits_allocated, encoding::vr_type::US, bits_allocated);
153 static_cast<uint16_t>(bits_stored - 1));
155 ds.set_numeric<uint16_t>(core::tags::samples_per_pixel, encoding::vr_type::US, samples_per_pixel);
157}
158
161 uint16_t rows,
162 uint16_t columns,
163 uint16_t bits_allocated,
164 uint16_t samples_per_pixel,
165 uint16_t fill_value) {
166
167 size_t pixel_count = static_cast<size_t>(rows) * columns * samples_per_pixel;
168
169 if (bits_allocated == 8) {
170 std::vector<uint8_t> pixel_data(pixel_count, static_cast<uint8_t>(fill_value & 0xFF));
172 pixel_elem.set_value(std::span<const uint8_t>(pixel_data.data(), pixel_data.size()));
173 ds.insert(std::move(pixel_elem));
174 } else {
175 std::vector<uint16_t> pixel_data(pixel_count, fill_value);
177 pixel_elem.set_value(std::span<const uint8_t>(
178 reinterpret_cast<const uint8_t*>(pixel_data.data()),
179 pixel_data.size() * sizeof(uint16_t)));
180 ds.insert(std::move(pixel_elem));
181 }
182}
183
186 uint16_t rows,
187 uint16_t columns,
188 uint16_t bits_allocated,
189 uint32_t num_frames,
190 uint16_t samples_per_pixel) {
191
192 // Add Number of Frames attribute
193 constexpr core::dicom_tag number_of_frames{0x0028, 0x0008};
194 ds.set_string(number_of_frames, encoding::vr_type::IS, std::to_string(num_frames));
195
196 size_t frame_size = static_cast<size_t>(rows) * columns * samples_per_pixel;
197 size_t total_pixels = frame_size * num_frames;
198
199 // Use random generator for more realistic data
200 std::mt19937 gen(42); // Fixed seed for reproducibility
201
202 if (bits_allocated == 8) {
203 std::uniform_int_distribution<uint16_t> dist(0, 255);
204 std::vector<uint8_t> pixel_data(total_pixels);
205 for (size_t i = 0; i < total_pixels; ++i) {
206 pixel_data[i] = static_cast<uint8_t>(dist(gen));
207 }
209 pixel_elem.set_value(std::span<const uint8_t>(pixel_data.data(), pixel_data.size()));
210 ds.insert(std::move(pixel_elem));
211 } else {
212 std::uniform_int_distribution<uint16_t> dist(0, 4095);
213 std::vector<uint16_t> pixel_data(total_pixels);
214 for (size_t i = 0; i < total_pixels; ++i) {
215 pixel_data[i] = dist(gen);
216 }
218 pixel_elem.set_value(std::span<const uint8_t>(
219 reinterpret_cast<const uint8_t*>(pixel_data.data()),
220 pixel_data.size() * sizeof(uint16_t)));
221 ds.insert(std::move(pixel_elem));
222 }
223}
224
225// =============================================================================
226// Single Modality Generators
227// =============================================================================
228
229core::dicom_dataset test_data_generator::ct(const std::string& study_uid) {
231
232 add_patient_module(ds, "TEST^CT^PATIENT", "TESTCT001", "19800101", "M");
233 add_study_module(ds, study_uid, "ACCCT001", "STUDYCT001", "CT Integration Test");
234 add_series_module(ds, "", "CT", "1", "CT Test Series");
235
236 // SOP Common
238 "1.2.840.10008.5.1.4.1.1.2"); // CT Image Storage
240
241 // Image Pixel Module
242 add_image_pixel_module(ds, 64, 64, 16, 12);
243 add_pixel_data(ds, 64, 64, 16, 1, 512);
244
245 return ds;
246}
247
248core::dicom_dataset test_data_generator::mr(const std::string& study_uid) {
250
251 add_patient_module(ds, "TEST^MR^PATIENT", "TESTMR001", "19900215", "F");
252 add_study_module(ds, study_uid, "ACCMR001", "STUDYMR001", "MR Integration Test");
253 add_series_module(ds, "", "MR", "1", "T1 FLAIR");
254
255 // SOP Common
257 "1.2.840.10008.5.1.4.1.1.4"); // MR Image Storage
259
260 // Image Pixel Module
261 add_image_pixel_module(ds, 64, 64, 16, 12);
262 add_pixel_data(ds, 64, 64, 16, 1, 256);
263
264 return ds;
265}
266
267core::dicom_dataset test_data_generator::xa(const std::string& study_uid) {
269
270 add_patient_module(ds, "TEST^XA^PATIENT", "TESTXA001", "19750610", "F");
271 add_study_module(ds, study_uid, "ACCXA001", "STUDYXA001", "XA Integration Test");
272 add_series_module(ds, "", "XA", "1", "Coronary Angio");
273
274 // SOP Common
278
279 // Image Pixel Module (512x512 for XA)
280 add_image_pixel_module(ds, 512, 512, 16, 12);
281
282 // XA-specific attributes
283 constexpr core::dicom_tag positioner_primary_angle{0x0018, 0x1510};
284 constexpr core::dicom_tag positioner_secondary_angle{0x0018, 0x1511};
285 constexpr core::dicom_tag kvp{0x0018, 0x0060};
286 constexpr core::dicom_tag xray_tube_current{0x0018, 0x1151};
287 constexpr core::dicom_tag exposure_time{0x0018, 0x1150};
288
289 ds.set_string(positioner_primary_angle, encoding::vr_type::DS, "0");
290 ds.set_string(positioner_secondary_angle, encoding::vr_type::DS, "0");
291 ds.set_string(kvp, encoding::vr_type::DS, "80");
292 ds.set_string(xray_tube_current, encoding::vr_type::IS, "500");
293 ds.set_string(exposure_time, encoding::vr_type::IS, "100");
294
295 add_pixel_data(ds, 512, 512, 16, 1, 128);
296
297 return ds;
298}
299
300core::dicom_dataset test_data_generator::us(const std::string& study_uid) {
302
303 add_patient_module(ds, "TEST^US^PATIENT", "TESTUS001", "19850305", "M");
304 add_study_module(ds, study_uid, "ACCUS001", "STUDYUS001", "US Integration Test");
305 add_series_module(ds, "", "US", "1", "Cardiac Echo");
306
307 // SOP Common
311
312 // Image Pixel Module (640x480 typical for US)
313 add_image_pixel_module(ds, 480, 640, 8, 8);
314 add_pixel_data(ds, 480, 640, 8, 1, 64);
315
316 return ds;
317}
318
319// =============================================================================
320// Multi-frame Generators
321// =============================================================================
322
323core::dicom_dataset test_data_generator::xa_cine(uint32_t frames, const std::string& study_uid) {
325
326 add_patient_module(ds, "TEST^XACINE^PATIENT", "TESTXACINE001", "19700815", "M");
327 add_study_module(ds, study_uid, "ACCXACINE001", "STUDYXACINE001", "XA Cine Test");
328 add_series_module(ds, "", "XA", "1", "Coronary Cine Run");
329
330 // SOP Common - use standard XA (supports multiframe)
334
335 // Image Pixel Module (512x512 for XA)
336 add_image_pixel_module(ds, 512, 512, 16, 12);
337
338 // XA-specific attributes
339 constexpr core::dicom_tag positioner_primary_angle{0x0018, 0x1510};
340 constexpr core::dicom_tag positioner_secondary_angle{0x0018, 0x1511};
341 constexpr core::dicom_tag cine_rate{0x0018, 0x0040};
342 constexpr core::dicom_tag frame_time{0x0018, 0x1063};
343
344 ds.set_string(positioner_primary_angle, encoding::vr_type::DS, "30");
345 ds.set_string(positioner_secondary_angle, encoding::vr_type::DS, "-15");
346 ds.set_string(cine_rate, encoding::vr_type::IS, "15"); // 15 fps
347 ds.set_string(frame_time, encoding::vr_type::DS, "66.67"); // ~15 fps
348
349 add_multiframe_pixel_data(ds, 512, 512, 16, frames);
350
351 return ds;
352}
353
354core::dicom_dataset test_data_generator::us_cine(uint32_t frames, const std::string& study_uid) {
356
357 add_patient_module(ds, "TEST^USCINE^PATIENT", "TESTUSCINE001", "19880422", "F");
358 add_study_module(ds, study_uid, "ACCUSCINE001", "STUDYUSCINE001", "US Cine Test");
359 add_series_module(ds, "", "US", "1", "Cardiac Cine Loop");
360
361 // SOP Common - US Multi-frame Image Storage
365
366 // Image Pixel Module (640x480 typical for US)
367 add_image_pixel_module(ds, 480, 640, 8, 8);
368
369 // US-specific attributes
370 constexpr core::dicom_tag frame_time{0x0018, 0x1063};
371 ds.set_string(frame_time, encoding::vr_type::DS, "33.33"); // ~30 fps
372
373 add_multiframe_pixel_data(ds, 480, 640, 8, frames);
374
375 return ds;
376}
377
378core::dicom_dataset test_data_generator::enhanced_ct(uint32_t frames, const std::string& study_uid) {
380
381 add_patient_module(ds, "TEST^ENHCT^PATIENT", "TESTENHCT001", "19650110", "M");
382 add_study_module(ds, study_uid, "ACCENHCT001", "STUDYENHCT001", "Enhanced CT Test");
383 add_series_module(ds, "", "CT", "1", "Enhanced CT Volume");
384
385 // SOP Common - Enhanced CT Image Storage
387 "1.2.840.10008.5.1.4.1.1.2.1"); // Enhanced CT
389
390 // Image Pixel Module (use smaller size for enhanced multi-frame)
391 add_image_pixel_module(ds, 128, 128, 16, 12);
392
393 // Enhanced-specific: Image Type
395 "ORIGINAL\\PRIMARY\\VOLUME\\NONE");
396
397 add_multiframe_pixel_data(ds, 128, 128, 16, frames);
398
399 return ds;
400}
401
402core::dicom_dataset test_data_generator::enhanced_mr(uint32_t frames, const std::string& study_uid) {
404
405 add_patient_module(ds, "TEST^ENHMR^PATIENT", "TESTENHMR001", "19720520", "F");
406 add_study_module(ds, study_uid, "ACCENHMR001", "STUDYENHMR001", "Enhanced MR Test");
407 add_series_module(ds, "", "MR", "1", "Enhanced MR Volume");
408
409 // SOP Common - Enhanced MR Image Storage
411 "1.2.840.10008.5.1.4.1.1.4.1"); // Enhanced MR
413
414 // Image Pixel Module (use smaller size for enhanced multi-frame)
415 add_image_pixel_module(ds, 128, 128, 16, 12);
416
417 // Enhanced-specific: Image Type
419 "ORIGINAL\\PRIMARY\\VOLUME\\NONE");
420
421 add_multiframe_pixel_data(ds, 128, 128, 16, frames);
422
423 return ds;
424}
425
426// =============================================================================
427// Clinical Workflow Generators
428// =============================================================================
429
431 const std::string& patient_id,
432 const std::vector<std::string>& modalities) {
433
434 multi_modal_study study;
435 study.patient_id = patient_id.empty() ? "PATJOURNEY001" : patient_id;
436 study.patient_name = "TEST^MULTIMODAL^PATIENT";
437 study.study_uid = generate_uid();
438
439 for (const auto& modality : modalities) {
441
442 add_patient_module(ds, study.patient_name, study.patient_id, "19750101", "M");
443 add_study_module(ds, study.study_uid, "ACCMULTI001", "STUDYMULTI001",
444 "Multi-Modal Patient Journey");
445
446 std::string series_desc = modality + " Series";
447 add_series_module(ds, "", modality, std::to_string(study.datasets.size() + 1), series_desc);
448
449 // Set SOP Class based on modality
450 std::string sop_class_uid;
451 uint16_t rows = 64, columns = 64, bits = 16;
452
453 if (modality == "CT") {
454 sop_class_uid = "1.2.840.10008.5.1.4.1.1.2";
455 } else if (modality == "MR") {
456 sop_class_uid = "1.2.840.10008.5.1.4.1.1.4";
457 } else if (modality == "XA") {
458 sop_class_uid = std::string(services::sop_classes::xa_image_storage_uid);
459 rows = 512;
460 columns = 512;
461 } else if (modality == "US") {
462 sop_class_uid = std::string(services::sop_classes::us_image_storage_uid);
463 rows = 480;
464 columns = 640;
465 bits = 8;
466 } else {
467 // Default to Secondary Capture for unknown modalities
468 sop_class_uid = "1.2.840.10008.5.1.4.1.1.7";
469 }
470
473
474 add_image_pixel_module(ds, rows, columns, bits, static_cast<uint16_t>(bits - 4));
475 add_pixel_data(ds, rows, columns, bits);
476
477 study.datasets.push_back(std::move(ds));
478 }
479
480 return study;
481}
482
484 const std::string& patient_id,
485 const std::string& modality) {
486
488
489 std::string pid = patient_id.empty() ? "TESTWL001" : patient_id;
490 add_patient_module(ds, "WORKLIST^TEST^PATIENT", pid, "19850520", "M");
491
492 // Scheduled Procedure Step
494 current_date());
496 "090000");
499 modality + "_SCANNER");
501 modality + " Examination");
502
503 // Requested Procedure
507
508 return ds;
509}
510
511// =============================================================================
512// Edge Case Generators
513// =============================================================================
514
517
518 add_patient_module(ds, "TEST^LARGE^DATASET", "TESTLARGE001", "19700101", "M");
519 add_study_module(ds, "", "ACCLARGE001", "STUDYLARGE001", "Large Dataset Test");
520 add_series_module(ds, "", "OT", "1", "Large Test Series");
521
522 // SOP Common - Secondary Capture
524 "1.2.840.10008.5.1.4.1.1.7");
526
527 // Calculate dimensions to achieve target size
528 // target_size_mb * 1024 * 1024 = rows * columns * 2 (16-bit)
529 size_t total_bytes = target_size_mb * 1024 * 1024;
530 size_t total_pixels = total_bytes / 2;
531
532 // Use square dimensions
533 uint16_t dimension = static_cast<uint16_t>(std::sqrt(static_cast<double>(total_pixels)));
534 dimension = (std::min)(dimension, static_cast<uint16_t>(4096)); // Cap at 4096x4096
535
536 add_image_pixel_module(ds, dimension, dimension, 16, 12);
537 add_pixel_data(ds, dimension, dimension, 16, 1, 1024);
538
539 return ds;
540}
541
544
545 // Set specific character set for Unicode
547
548 // Unicode patient names (Korean, Japanese, Chinese examples)
549 add_patient_module(ds, "홍^길동", "TESTUNICODE001", "19801225", "M");
550 add_study_module(ds, "", "ACCUNICODE001", "STUDYUNICODE001",
551 "Unicode Test Study - 유니코드 테스트");
552 add_series_module(ds, "", "OT", "1", "Unicode Series - 한글 시리즈");
553
554 // SOP Common - Secondary Capture
556 "1.2.840.10008.5.1.4.1.1.7");
558
559 add_image_pixel_module(ds, 64, 64, 8, 8);
560 add_pixel_data(ds, 64, 64, 8);
561
562 return ds;
563}
564
567
568 add_patient_module(ds, "TEST^PRIVATE^TAGS", "TESTPRIVATE001", "19851231", "F");
569 add_study_module(ds, "", "ACCPRIVATE001", "STUDYPRIVATE001", "Private Tags Test");
570 add_series_module(ds, "", "OT", "1", "Private Tags Series");
571
572 // SOP Common - Secondary Capture
574 "1.2.840.10008.5.1.4.1.1.7");
576
577 // Add private creator identification
578 constexpr core::dicom_tag private_creator_tag{0x0011, 0x0010};
579 ds.set_string(private_creator_tag, encoding::vr_type::LO, creator_id);
580
581 // Add private data elements
582 constexpr core::dicom_tag private_data_tag_1{0x0011, 0x1001};
583 constexpr core::dicom_tag private_data_tag_2{0x0011, 0x1002};
584 constexpr core::dicom_tag private_data_tag_3{0x0011, 0x1003};
585
586 ds.set_string(private_data_tag_1, encoding::vr_type::LO, "Private String Value");
587 ds.set_string(private_data_tag_2, encoding::vr_type::DS, "123.456");
588 ds.set_string(private_data_tag_3, encoding::vr_type::IS, "42");
589
590 add_image_pixel_module(ds, 64, 64, 8, 8);
591 add_pixel_data(ds, 64, 64, 8);
592
593 return ds;
594}
595
598
599 // Start with a valid base dataset
600 add_patient_module(ds, "TEST^INVALID^DATASET", "TESTINVALID001", "19901010", "M");
601 add_study_module(ds, "", "ACCINVALID001", "STUDYINVALID001", "Invalid Dataset Test");
602 add_series_module(ds, "", "OT", "1", "Invalid Series");
603
604 // Set SOP Common (will be modified based on type)
606 "1.2.840.10008.5.1.4.1.1.7");
608
609 add_image_pixel_module(ds, 64, 64, 8, 8);
610 add_pixel_data(ds, 64, 64, 8);
611
612 // Now introduce the specific invalidity
613 switch (type) {
616 break;
617
620 break;
621
624 break;
625
628 break;
629
631 // Set a numeric value where UI is expected
633 break;
634
636 // Remove proper pixel data and add truncated data
638 std::vector<uint8_t> corrupted(100, 0xFF); // Way too small
640 pixel_elem.set_value(std::span<const uint8_t>(corrupted.data(), corrupted.size()));
641 ds.insert(std::move(pixel_elem));
642 break;
643 }
644
646 // SH VR has max 16 characters - exceed it
648 "THIS_ACCESSION_NUMBER_IS_WAY_TOO_LONG_FOR_SH_VR");
649 break;
650 }
651
652 return ds;
653}
654
655} // namespace kcenon::pacs::integration_test
void set_numeric(dicom_tag tag, encoding::vr_type vr, T value)
Set a numeric value for the given tag.
auto remove(dicom_tag tag) -> bool
Remove an element from the dataset.
void insert(dicom_element element)
Insert or replace an element in the dataset.
void set_string(dicom_tag tag, encoding::vr_type vr, std::string_view value)
Set a string value for the given tag.
void set_value(std::span< const uint8_t > data)
Set the raw value data.
static void add_series_module(core::dicom_dataset &ds, const std::string &series_uid, const std::string &modality, const std::string &series_number, const std::string &description)
Add common series module attributes.
static core::dicom_dataset us_cine(uint32_t frames=60, const std::string &study_uid="")
Generate a multi-frame US cine dataset.
static core::dicom_dataset invalid(invalid_dataset_type type)
Generate an intentionally invalid dataset.
static std::string generate_uid(const std::string &root="1.2.826.0.1.3680043.9.9999")
Generate a unique UID for testing.
static void add_multiframe_pixel_data(core::dicom_dataset &ds, uint16_t rows, uint16_t columns, uint16_t bits_allocated, uint32_t num_frames, uint16_t samples_per_pixel=1)
Generate pixel data for multi-frame image.
static core::dicom_dataset large(size_t target_size_mb)
Generate a large dataset for stress testing.
static void add_study_module(core::dicom_dataset &ds, const std::string &study_uid, const std::string &accession_number, const std::string &study_id, const std::string &description)
Add common study module attributes.
static core::dicom_dataset worklist(const std::string &patient_id="", const std::string &modality="CT")
Generate a worklist item dataset.
static core::dicom_dataset mr(const std::string &study_uid="")
Generate an MR Image dataset.
static core::dicom_dataset enhanced_ct(uint32_t frames=100, const std::string &study_uid="")
Generate an Enhanced CT multi-frame dataset.
static multi_modal_study patient_journey(const std::string &patient_id, const std::vector< std::string > &modalities={"CT", "MR", "XA"})
Generate a complete multi-modal patient study.
static void add_pixel_data(core::dicom_dataset &ds, uint16_t rows, uint16_t columns, uint16_t bits_allocated, uint16_t samples_per_pixel=1, uint16_t fill_value=512)
Generate pixel data for single-frame image.
static core::dicom_dataset unicode()
Generate a dataset with Unicode patient names.
static core::dicom_dataset ct(const std::string &study_uid="")
Generate a CT Image dataset.
static void add_image_pixel_module(core::dicom_dataset &ds, uint16_t rows, uint16_t columns, uint16_t bits_allocated, uint16_t bits_stored, uint16_t samples_per_pixel=1, const std::string &photometric="MONOCHROME2")
Add common image pixel module attributes.
static core::dicom_dataset enhanced_mr(uint32_t frames=50, const std::string &study_uid="")
Generate an Enhanced MR multi-frame dataset.
static core::dicom_dataset us(const std::string &study_uid="")
Generate a single-frame US Image dataset.
static core::dicom_dataset xa(const std::string &study_uid="")
Generate a single-frame XA Image dataset.
static core::dicom_dataset with_private_tags(const std::string &creator_id="TEST PRIVATE CREATOR")
Generate a dataset with private tags.
static void add_patient_module(core::dicom_dataset &ds, const std::string &patient_name, const std::string &patient_id, const std::string &birth_date="19800101", const std::string &sex="M")
Add common patient module attributes.
static std::string current_time()
Get current time in DICOM TM format (HHMMSS)
static std::string current_date()
Get current date in DICOM DA format (YYYYMMDD)
static core::dicom_dataset xa_cine(uint32_t frames=30, const std::string &study_uid="")
Generate a multi-frame XA cine dataset.
DICOM Data Element representation (Tag, VR, Value)
constexpr dicom_tag high_bit
High Bit.
constexpr dicom_tag scheduled_procedure_step_description
Scheduled Procedure Step Description.
constexpr dicom_tag study_description
Study Description.
constexpr dicom_tag patient_id
Patient ID.
constexpr dicom_tag bits_allocated
Bits Allocated.
constexpr dicom_tag rows
Rows.
constexpr dicom_tag specific_character_set
Specific Character Set.
constexpr dicom_tag columns
Columns.
constexpr dicom_tag scheduled_procedure_step_start_date
Scheduled Procedure Step Start Date.
constexpr dicom_tag sop_instance_uid
SOP Instance UID.
constexpr dicom_tag bits_stored
Bits Stored.
constexpr dicom_tag image_type
Image Type.
constexpr dicom_tag patient_birth_date
Patient's Birth Date.
constexpr dicom_tag pixel_data
Pixel Data.
constexpr dicom_tag pixel_representation
Pixel Representation.
constexpr dicom_tag accession_number
Accession Number.
constexpr dicom_tag modality
Modality.
constexpr dicom_tag scheduled_station_ae_title
Scheduled Station AE Title.
constexpr dicom_tag study_time
Study Time.
constexpr dicom_tag patient_sex
Patient's Sex.
constexpr dicom_tag samples_per_pixel
Samples per Pixel.
constexpr dicom_tag study_instance_uid
Study Instance UID.
constexpr dicom_tag series_number
Series Number.
constexpr dicom_tag photometric_interpretation
Photometric Interpretation.
constexpr dicom_tag series_description
Series Description.
constexpr dicom_tag sop_class_uid
SOP Class UID.
constexpr dicom_tag requested_procedure_id
Requested Procedure ID.
constexpr dicom_tag study_id
Study ID.
constexpr dicom_tag patient_name
Patient's Name.
constexpr dicom_tag study_date
Study Date.
constexpr dicom_tag scheduled_procedure_step_start_time
Scheduled Procedure Step Start Time.
constexpr dicom_tag series_instance_uid
Series Instance UID.
@ OB
Other Byte (variable length)
@ DA
Date (8 chars, format: YYYYMMDD)
@ IS
Integer String (12 chars max)
@ LO
Long String (64 chars max)
@ DS
Decimal String (16 chars max)
@ UI
Unique Identifier (64 chars max)
@ US
Unsigned Short (2 bytes)
@ PN
Person Name (64 chars max per component group)
@ CS
Code String (16 chars max, uppercase + digits + space + underscore)
@ OW
Other Word (variable length)
@ TM
Time (14 chars max, format: HHMMSS.FFFFFF)
@ AE
Application Entity (16 chars max)
@ SH
Short String (16 chars max)
invalid_dataset_type
Types of invalid datasets for error testing.
@ oversized_value
Value exceeds VR length limit.
@ missing_study_instance_uid
Missing Study Instance UID.
constexpr std::string_view us_image_storage_uid
US Image Storage SOP Class UID (single-frame)
Definition us_storage.h:39
constexpr std::string_view xa_image_storage_uid
XA Image Storage SOP Class UID (single/multi-frame)
Definition xa_storage.h:47
constexpr std::string_view us_multiframe_image_storage_uid
US Multi-frame Image Storage SOP Class UID (cine loops)
Definition us_storage.h:43
Represents a complete patient study with multiple modalities.
std::vector< core::dicom_dataset > get_by_modality(const std::string &modality) const
Get datasets filtered by modality.
std::vector< core::dicom_dataset > datasets
All datasets in study.
size_t series_count() const
Get total number of series in study.
Comprehensive DICOM test data generators for integration testing.
constexpr dicom_tag number_of_frames
std::string_view uid