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

DICOM to XML Converter - DICOM Native XML PS3.19. More...

#include "kcenon/pacs/core/dicom_dictionary.h"
#include "kcenon/pacs/core/dicom_file.h"
#include "kcenon/pacs/core/dicom_tag_constants.h"
#include "kcenon/pacs/encoding/transfer_syntax.h"
#include "kcenon/pacs/encoding/vr_type.h"
#include <algorithm>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

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

Detailed Description

DICOM to XML Converter - DICOM Native XML PS3.19.

Definition in file main.cpp.

Function Documentation

◆ main()

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

Definition at line 830 of file main.cpp.

830 {
831 options opts;
832
833 if (!parse_arguments(argc, argv, opts)) {
834 std::cout << R"(
835 ____ ____ __ __ _____ ___ __ ____ __ _
836 | _ \ / ___| \/ | |_ _|/ _ \ \ \/ / \/ | |
837 | | | | | | |\/| | | | | | | | \ /| |\/| | |
838 | |_| | |___| | | | | | | |_| | / \| | | | |___
839 |____/ \____|_| |_| |_| \___/ /_/\_\_| |_|_____|
840
841 DICOM to XML Converter (PS3.19)
842)" << "\n";
843 print_usage(argv[0]);
844 return 1;
845 }
846
847 // Check if input path exists
848 if (!std::filesystem::exists(opts.input_path)) {
849 std::cerr << "Error: Path does not exist: " << opts.input_path.string() << "\n";
850 return 2;
851 }
852
853 // Create bulk data directory if needed
854 if (opts.bulk_mode == bulk_data_mode::uri && !opts.bulk_data_dir.empty()) {
855 std::filesystem::create_directories(opts.bulk_data_dir);
856 }
857
858 // Show banner in non-quiet mode
859 if (!opts.quiet) {
860 std::cout << R"(
861 ____ ____ __ __ _____ ___ __ ____ __ _
862 | _ \ / ___| \/ | |_ _|/ _ \ \ \/ / \/ | |
863 | | | | | | |\/| | | | | | | | \ /| |\/| | |
864 | |_| | |___| | | | | | | |_| | / \| | | | |___
865 |____/ \____|_| |_| |_| \___/ /_/\_\_| |_|_____|
866
867 DICOM to XML Converter (PS3.19)
868)" << "\n";
869 }
870
871 // Handle directory vs file
872 if (std::filesystem::is_directory(opts.input_path)) {
873 return process_directory(opts.input_path, opts);
874 } else {