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

Entry point for PACS Server sample application. More...

#include "config.h"
#include "server_app.h"
#include <atomic>
#include <csignal>
#include <iostream>
Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

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

Detailed Description

Entry point for PACS Server sample application.

Definition in file main.cpp.

Function Documentation

◆ main()

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

Definition at line 57 of file main.cpp.

57 {
58 std::cout << R"(
59 ____ _ ____ ____ ____
60 | _ \ / \ / ___/ ___| / ___| ___ _ ____ _____ _ __
61 | |_) / _ \| | \___ \ \___ \ / _ \ '__\ \ / / _ \ '__|
62 | __/ ___ \ |___ ___) | ___) | __/ | \ V / __/ |
63 |_| /_/ \_\____|____/ |____/ \___|_| \_/ \___|_|
64
65 Complete DICOM Archive Server
66)" << "\n";
67
68 // Parse command line arguments
70 if (!config) {
71 return 1;
72 }
73
74 // Install signal handlers
75 install_signal_handlers();
76
77 // Create and initialize server
78 kcenon::pacs::example::pacs_server_app server(config.value());
79 g_server = &server;
80
81 if (!server.initialize()) {
82 std::cerr << "Failed to initialize PACS server\n";
83 return 1;
84 }
85
86 // Start server
87 if (!server.start()) {
88 std::cerr << "Failed to start PACS server\n";
89 return 1;
90 }
91
92 // Wait for shutdown
93 server.wait_for_shutdown();
94
static auto parse_args(int argc, char *argv[]) -> std::optional< pacs_server_config >
Parse configuration from command line arguments.
Definition config.cpp:18

References kcenon::pacs::example::pacs_server_app::initialize(), kcenon::pacs::example::pacs_server_config::parse_args(), kcenon::pacs::example::pacs_server_app::print_statistics(), kcenon::pacs::example::pacs_server_app::start(), and kcenon::pacs::example::pacs_server_app::wait_for_shutdown().

Here is the call graph for this function: