| 116 | } |
| 117 | |
| 118 | OutputFormat ParseOutputFormat(const mitk::IFileIO::Options& args) |
| 119 | { |
| 120 | auto it = args.find("format"); |
| 121 | |
| 122 | if (it != args.end()) |
| 123 | { |
| 124 | auto format = us::any_cast<std::string>(it->second); |
| 125 | |
| 126 | if (format == "multilabel") |
| 127 | return OutputFormat::Multilabel; |
| 128 | |
| 129 | if (format == "label") |
| 130 | return OutputFormat::Label; |
| 131 | |
| 132 | if (format != "binary") |
| 133 | mitkThrow() << "Unknown output format \"" << format << "\" (must be \"binary\", \"label\" or \"multilabel\")."; |
| 134 | } |
| 135 | |
| 136 | return OutputFormat::Binary; |
| 137 | } |
| 138 | |
| 139 | std::vector<mitk::ContourModelSet::Pointer> FilterValidInputs(const std::vector<mitk::BaseData::Pointer>& inputs) |
| 140 | { |