2 #include <tclap/CmdLine.h> 6 int main(
int argc,
char **argv)
8 TCLAP::CmdLine cmd(
"INRIA / IRISA - VisAGeS/Empenn Team",
' ',ANIMA_VERSION);
10 TCLAP::ValueArg<std::string> dataLTArg(
"i",
"database",
"Database Image List",
true,
"",
"database image list",cmd);
12 TCLAP::ValueArg<std::string> maskArg(
"m",
"maskname",
"Computation mask",
true,
"",
"computation mask",cmd);
13 TCLAP::ValueArg<std::string> resArg(
"o",
"outputmean",
"Average distance output image",
true,
"",
"Average distance output image",cmd);
15 TCLAP::ValueArg<std::string> resStdArg(
"O",
"outputstd",
"Standard deviation output image",
false,
"",
"Standard deviation output image",cmd);
17 TCLAP::ValueArg<unsigned int> nbpArg(
"p",
"numberofthreads",
"Number of threads to run on (default: all cores)",
false,itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads(),
"number of threads",cmd);
19 TCLAP::ValueArg<unsigned int> patchHSArg(
"",
"patchhalfsize",
"Patch half size in each direction (default: 1)",
false,1,
"patch half size",cmd);
21 TCLAP::ValueArg<unsigned int> splitsArg(
"s",
"split",
"Split image for low memory (default: 2)",
false,2,
"Number of splits",cmd);
22 TCLAP::ValueArg<int> specSplitArg(
"S",
"splittoprocess",
"Specific split to process (use to run on cluster (default: -1 = all)",
false,-1,
"Split to process",cmd);
23 TCLAP::SwitchArg genOutputDescroArg(
"G",
"generateouputdescription",
"Generate ouptut description data",cmd,
false);
29 catch (TCLAP::ArgException& e)
31 std::cerr <<
"Error: " << e.error() <<
"for argument " << e.argId() << std::endl;
35 std::string dataName, maskName;
36 dataName = dataLTArg.getValue();
37 maskName = maskArg.getValue();
41 MainBridgeType *mainFilter =
new MainBridgeType;
43 mainFilter->SetNumberOfWorkUnits(nbpArg.getValue());
45 mainFilter->SetPatchHalfSize(patchHSArg.getValue());
46 mainFilter->SetDatabaseNames(dataName);
48 mainFilter->SetOutputMeanName(resArg.getValue());
49 mainFilter->SetOutputStdName(resStdArg.getValue());
51 mainFilter->SetNbSplits(splitsArg.getValue());
55 mainFilter->Update(specSplitArg.getValue(),genOutputDescroArg.getValue());
57 catch(itk::ExceptionObject &e)
59 std::cerr << e << std::endl;
int main(int argc, char **argv)
void SetComputationMask(std::string &cMask)