| 82 | |
| 83 | |
| 84 | int |
| 85 | main(int argc, char * argv[]) |
| 86 | { |
| 87 | if (argc < 3) |
| 88 | { |
| 89 | std::cout << "Usage: DicomConvert <input_file> <output_file> [--w width]\n"; |
| 90 | return 1; |
| 91 | } |
| 92 | std::string inputFile = argv[1]; |
| 93 | std::string outputFile = argv[2]; |
| 94 | int width = 0; |
| 95 | |
| 96 | for (int i = 3; i < argc; ++i) |
| 97 | { |
| 98 | if (std::string(argv[i]) == "--w" && i + 1 < argc) |
| 99 | { |
| 100 | width = std::stoi(argv[++i]); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | if (ConvertImage(inputFile, outputFile, width)) |
| 105 | { |
| 106 | return 0; |
| 107 | } |
| 108 | return 1; |
| 109 | } |
nothing calls this directly
no test coverage detected