[Insight-users] How to get whether an option has been set using
metaCommand?
kurt Zhao
kurtzhao at yeah.net
Sat Jun 16 16:44:56 EDT 2007
Hi,
If I use the example below:
./example input.mha –w 2 output.mha
This will be coded as:
MetaCommand command;
command.SetOption("Write","w",false,"writes the current image to the
designated file with a type");
command.AddOptionField("Write","filename",MetaCommand::STRING,true);
command.AddOptionField("Write","Type",MetaCommand::INT,false,"1");
//by default type=1
command.AddField("infile","infile filename",MetaCommand::STRING,true);
if I want to also handle ./example input.mha -w 2 output.mha
./example input.mha differnetly, how can I know if the caller has set
the the option -w or not.
Thanks a lot!
-Kurt
More information about the Insight-users
mailing list