MCPcopy Create free account
hub / github.com/MITK/MITK / ParseOutputFormat

Function ParseOutputFormat

Modules/Segmentation/cmdapps/ContoursToImage.cpp:118–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118OutputFormat 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
139std::vector<mitk::ContourModelSet::Pointer> FilterValidInputs(const std::vector<mitk::BaseData::Pointer>& inputs)
140{

Callers 1

mainFunction · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected