MCPcopy Create free account
hub / github.com/SimpleITK/SimpleITK / main

Function main

Examples/DicomConvert/DicomConvert.cxx:84–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83
84int
85main(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}

Callers

nothing calls this directly

Calls 1

ConvertImageFunction · 0.85

Tested by

no test coverage detected