| 41 | }; |
| 42 | |
| 43 | void setupParser(mitkCommandLineParser& parser) |
| 44 | { |
| 45 | // set general information about your MiniApp |
| 46 | parser.setCategory("Registration Tools"); |
| 47 | parser.setTitle("Map Image"); |
| 48 | parser.setDescription("MiniApp that allows to map a image into a given output geometry by using a given registration."); |
| 49 | parser.setContributor("MIC, German Cancer Research Center (DKFZ)"); |
| 50 | //! [create parser] |
| 51 | |
| 52 | //! [add arguments] |
| 53 | // how should arguments be prefixed |
| 54 | parser.setArgumentPrefix("--", "-"); |
| 55 | // add each argument, unless specified otherwise each argument is optional |
| 56 | // see mitkCommandLineParser::addArgument for more information |
| 57 | parser.beginGroup("Required I/O parameters"); |
| 58 | parser.addArgument( |
| 59 | "input", "i", mitkCommandLineParser::File, "Input image", "Path to the input images that should be mapped", us::Any(), false, false, false, mitkCommandLineParser::Input); |
| 60 | parser.addArgument("output", |
| 61 | "o", |
| 62 | mitkCommandLineParser::File, |
| 63 | "Output file path", |
| 64 | "Path to the mapped image.", |
| 65 | us::Any(), |
| 66 | false, false, false, mitkCommandLineParser::Output); |
| 67 | parser.endGroup(); |
| 68 | |
| 69 | parser.beginGroup("Optional parameters"); |
| 70 | parser.addArgument( |
| 71 | "registration", "r", mitkCommandLineParser::File, "Registration filee", "Path to the registration that should be used. If no registration is specified, an identity transform is assumed.", us::Any(), true, false, false, mitkCommandLineParser::Input); |
| 72 | parser.addArgument("template", |
| 73 | "t", |
| 74 | mitkCommandLineParser::File, |
| 75 | "Output template image.", |
| 76 | "File path to an image that serves as template for the output geometry. If no template is specified, the geometry of the input image will be used.", |
| 77 | us::Any(), |
| 78 | false, false, false, mitkCommandLineParser::Input); |
| 79 | parser.addArgument( |
| 80 | "registrations", "r", mitkCommandLineParser::StringList, "Registration files", "Paths to the registrations that should be used to map the input images. If this parameter is not set, identity transforms are assumed. If this parameter is set, it must have the same number of entries then the parameter inputs. If you want to use and identity transform for a specific input, specify an empty string. The application assumes that inputs and registrations have the same order, so the n-th input should use thr n-th registration.", us::Any(), true, false, false, mitkCommandLineParser::Input); |
| 81 | parser.addArgument("interpolator", "n", mitkCommandLineParser::Int, "Interpolator type", "Interpolator used for mapping the images. Default: 2; allowed values: 1: Nearest Neighbour, 2: Linear, 3: BSpline 3, 4: WSinc Hamming, 5: WSinc Welch", us::Any(2), true); |
| 82 | parser.addArgument("padding", "p", mitkCommandLineParser::Float, "Padding value", "Value used for output voxels that are not covered by any input image.", us::Any(0.), true); |
| 83 | parser.addArgument("super-sampling", "s", mitkCommandLineParser::StringList, "Super sampling factor", "Value used for super sampling of the result. E.g. factor 2 will lead to a doubled resolution compared to the used template. If not specified, no super sampling will be done.", us::Any(), true); |
| 84 | parser.addArgument("help", "h", mitkCommandLineParser::Bool, "Help:", "Show this help text"); |
| 85 | parser.endGroup(); |
| 86 | //! [add arguments] |
| 87 | } |
| 88 | |
| 89 | bool configureApplicationSettings(std::map<std::string, us::Any> parsedArgs, Settings& settings) |
| 90 | { |
no test coverage detected