2 #include <tclap/CmdLine.h> 8 int main(
int argc,
char **argv)
10 TCLAP::CmdLine cmd(
"INRIA / IRISA - VisAGeS/Empenn Team",
' ',ANIMA_VERSION);
12 TCLAP::ValueArg<std::string> refLTArg(
"i",
"inputlogtens",
"Log-Tensor Test Image",
true,
"",
"log-tensor test image",cmd);
13 TCLAP::ValueArg<std::string> dataLTArg(
"I",
"databaselogtens",
"Log-Tensor Database Image List",
true,
"",
"log-tensor database image list",cmd);
15 TCLAP::ValueArg<std::string> maskArg(
"m",
"maskname",
"Computation mask",
true,
"",
"computation mask",cmd);
16 TCLAP::ValueArg<std::string> resArg(
"o",
"outputname",
"output image prefix",
true,
"",
"output image prefix",cmd);
17 TCLAP::ValueArg<std::string> resPValArg(
"O",
"outpvalname",
"P-value output image",
true,
"",
"P-Value output image",cmd);
19 TCLAP::ValueArg<std::string> statTestArg(
"t",
"stat-test",
"Statistical test to use ([fisher],chi)",
false,
"fisher",
"statistical test",cmd);
20 TCLAP::ValueArg<double> expVarArg(
"e",
"expvar",
"PCA threshold: threshold on eigenvalues to compute the new basis (default: 0.9)",
false,0.9,
"PCA threshold",cmd);
21 TCLAP::ValueArg<unsigned int> numEigenArg(
"E",
"numeigenpca",
"Number of eigenvalues to keep (default: 6)",
false,6,
"Number of PCA eigen values",cmd);
23 TCLAP::ValueArg<unsigned int> nbpArg(
"p",
"numberofthreads",
"Number of threads to run on (default : all cores)",
false,itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads(),
"number of threads",cmd);
25 TCLAP::ValueArg<unsigned int> splitsArg(
"s",
"split",
"Split image for low memory (default: 2)",
false,2,
"Number of splits",cmd);
26 TCLAP::ValueArg<int> specSplitArg(
"S",
"splittoprocess",
"Specific split to process (use to run on cluster (default: -1 = all)",
false,-1,
"Split to process",cmd);
27 TCLAP::SwitchArg genOutputDescroArg(
"G",
"generateouputdescription",
"Generate ouptut description data",cmd,
false);
33 catch (TCLAP::ArgException& e)
35 std::cerr <<
"Error: " << e.error() <<
"for argument " << e.argId() << std::endl;
39 string dataLTName, maskName;
40 dataLTName = dataLTArg.getValue();
41 maskName = maskArg.getValue();
45 MultiAtlasZScoreBridgeType *mainFilter =
new MultiAtlasZScoreBridgeType;
47 mainFilter->SetNumberOfWorkUnits(nbpArg.getValue());
49 mainFilter->SetNumEigenValuesPCA(numEigenArg.getValue());
50 mainFilter->SetExplainedRatio(expVarArg.getValue());
52 mainFilter->SetDataLTFileNames(dataLTName);
53 mainFilter->SetTestLTFileName(refLTArg.getValue());
55 mainFilter->SetOutputName(resArg.getValue());
56 mainFilter->SetOutputPValName(resPValArg.getValue());
58 mainFilter->SetNbSplits(splitsArg.getValue());
60 if (statTestArg.getValue() ==
"chi")
61 mainFilter->SetStatisticalTestType(MultiAtlasZScoreBridgeType::MainFilterType::CHI_SQUARE);
63 mainFilter->SetStatisticalTestType(MultiAtlasZScoreBridgeType::MainFilterType::FISHER);
67 mainFilter->Update(specSplitArg.getValue(),genOutputDescroArg.getValue());
69 catch(itk::ExceptionObject &e)
71 std::cerr << e << std::endl;
int main(int argc, char **argv)
void SetComputationMask(std::string &cMask)