PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
generate_test_data.cpp File Reference

Generate minimal DICOM test data files for binary integration tests. More...

#include "test_fixtures.h"
#include "kcenon/pacs/core/dicom_file.h"
#include <filesystem>
#include <iostream>
Include dependency graph for generate_test_data.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Generate minimal DICOM test data files for binary integration tests.

Creates minimal DICOM files that can be used for testing storage and query operations without requiring external test data.

See also
Issue #136 - Binary Integration Test Scripts

Usage: generate_test_data [output_dir]

Output files: ct_minimal.dcm - Minimal CT image mr_minimal.dcm - Minimal MR image xa_minimal.dcm - Minimal XA image

Definition in file generate_test_data.cpp.

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 93 of file generate_test_data.cpp.

93 {
94 std::cout << R"(
95 ____ ___ ____ ___ __ __ _____ _
96 | _ \|_ _/ ___/ _ \| \/ | |_ _|__ ___| |_
97 | | | || | | | | | | |\/| | | |/ _ \/ __| __|
98 | |_| || | |__| |_| | | | | | | __/\__ \ |_
99 |____/|___\____\___/|_| |_| |_|\___||___/\__|
100
101 Data Generator for Integration Tests
102)" << "\n";
103
104 // Determine output directory
105 std::filesystem::path output_dir;
106
107 if (argc > 1) {
108 output_dir = argv[1];
109 } else {
110 // Default: test_data directory relative to executable
111 output_dir = std::filesystem::path(argv[0]).parent_path() / ".." / ".." /
112 "examples" / "integration_tests" / "test_data";
113 }
114
115 if (!generate_all(output_dir)) {
116 std::cerr << "\nSome files failed to generate\n";
117 return 1;
118 }