4 #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> inArg(
"i",
"input",
"Non corrected P-value image",
true,
"",
"Non corrected P-value image",cmd);
11 TCLAP::ValueArg<std::string> resArg(
"o",
"output",
"FDR thresholded output image at q",
true,
"",
"FDR corrected output image at q",cmd);
12 TCLAP::ValueArg<double> qArg(
"q",
"q-val",
"FDR q value",
true,0.05,
"FDR q value",cmd);
13 TCLAP::SwitchArg byCorrArg(
"Y",
"by-corr",
"Use BY correction (if not set, BH correction is used)", cmd,
false);
14 TCLAP::ValueArg<std::string> maskArg(
"m",
"mask",
"Mask image (default: all pixels are in mask)",
false,
"",
"Mask image",cmd);
20 catch (TCLAP::ArgException& e)
22 std::cerr <<
"Error: " << e.error() <<
"for argument " << e.argId() << std::endl;
28 MainFilterType::Pointer mainFilter = MainFilterType::New();
30 mainFilter->SetInput(anima::readImage<MainFilterType::TInputImage> (inArg.getValue()));
31 mainFilter->SetQValue(qArg.getValue());
32 mainFilter->SetBYCorrection(byCorrArg.isSet());
34 if (maskArg.getValue() !=
"")
35 mainFilter->SetMaskImage(anima::readImage <MainFilterType::MaskImageType> (maskArg.getValue()));
39 std::cout <<
"Writing result to : " << resArg.getValue() << std::endl;
41 anima::writeImage<MainFilterType::TOutputImage>(resArg.getValue(), mainFilter->GetOutput());
int main(int argc, char **argv)