20 int main(
int argc,
char* argv[])
35 std::map<std::string, us::Any> parsedArgs = parser.
parseArguments(argc, argv);
37 if (parsedArgs.size()==0)
41 if ( parsedArgs.count(
"help") || parsedArgs.count(
"h"))
47 std::string inputName =
us::any_cast<std::string>(parsedArgs[
"input"]);
48 std::string outputName =
us::any_cast<std::string>(parsedArgs[
"output"]);
int main(int argc, char *argv[])
void setContributor(std::string contributor)
ValueType * any_cast(Any *operand)
std::map< std::string, us::Any > parseArguments(const StringContainerType &arguments, bool *ok=nullptr)
static bool SaveImage(mitk::Image::Pointer image, const std::string &path)
SaveImage Convenience method to save an arbitrary mitkImage.
void addArgument(const std::string &longarg, const std::string &shortarg, Type type, const std::string &argLabel, const std::string &argHelp=std::string(), const us::Any &defaultValue=us::Any(), bool optional=true, bool ignoreRest=false, bool deprecated=false)
void setCategory(std::string category)
void setArgumentPrefix(const std::string &longPrefix, const std::string &shortPrefix)
std::string helpText() const
void setTitle(std::string title)
void setDescription(std::string description)
static mitk::Image::Pointer LoadImage(const std::string &path)
LoadImage Convenience method to load an arbitrary mitkImage.