5 #include <itkTimeProbe.h> 6 #include <tclap/CmdLine.h> 8 int main(
int argc,
char **argv)
10 TCLAP::CmdLine cmd(
"INRIA / IRISA - VisAGeS Team",
' ',ANIMA_VERSION);
12 TCLAP::ValueArg<std::string> inArg(
"i",
"mcm",
"MCM volume",
true,
"",
"MCM volume",cmd);
13 TCLAP::ValueArg<std::string> outFAArg(
"f",
"out-fa",
"Result FA image",
true,
"",
"result FA image",cmd);
14 TCLAP::ValueArg<std::string> outMDArg(
"m",
"out-md",
"Result MD image",
true,
"",
"result MD image",cmd);
15 TCLAP::ValueArg<std::string> outParDiffArg(
"p",
"out-par",
"Apparent parallel diffusivity image",
false,
"",
"apparent parallel diffusivity",cmd);
16 TCLAP::ValueArg<std::string> outPerpDiffArg(
"P",
"out-perp",
"Apparent perpendicular diffusivity image",
false,
"",
"apparent perpendicular diffusivity",cmd);
18 TCLAP::ValueArg<std::string> outIsoRWArg(
"r",
"out-iso-r-w",
"Result iso restricted weight image",
false,
"",
"result iso R image",cmd);
19 TCLAP::ValueArg<std::string> outAnisoRWArg(
"a",
"out-aniso-r-w",
"Result anisotropic weight image",
false,
"",
"result anisotropic image",cmd);
20 TCLAP::ValueArg<std::string> outFWArg(
"F",
"out-fw",
"Result free water weight image",
false,
"",
"result FW image",cmd);
22 TCLAP::SwitchArg includeIsoArg(
"I",
"inc-iso",
"Include isotropic contributions in FA and MD?", cmd,
false);
24 TCLAP::ValueArg<unsigned int> nbThreadsArg(
"T",
"nb-threads",
"Number of threads to run on (default: all cores)",
false, itk::MultiThreaderBase::GetGlobalDefaultNumberOfThreads(),
"number of threads", cmd);
30 catch (TCLAP::ArgException& e)
32 std::cerr <<
"Error: " << e.error() <<
"for argument " << e.argId() << std::endl;
36 typedef double ScalarType;
39 MainFilterType::Pointer mainFilter = MainFilterType::New();
46 mainFilter->SetIncludeIsotropicWeights(includeIsoArg.isSet());
47 mainFilter->SetNumberOfWorkUnits(nbThreadsArg.getValue());
50 anima::writeImage <MainFilterType::OutputImageType> (outFAArg.getValue(),mainFilter->GetOutput(3));
51 anima::writeImage <MainFilterType::OutputImageType> (outMDArg.getValue(),mainFilter->GetOutput(4));
53 if (outParDiffArg.getValue() !=
"")
54 anima::writeImage <MainFilterType::OutputImageType> (outParDiffArg.getValue(),mainFilter->GetOutput(5));
56 if (outPerpDiffArg.getValue() !=
"")
57 anima::writeImage <MainFilterType::OutputImageType> (outPerpDiffArg.getValue(),mainFilter->GetOutput(6));
59 if (outFWArg.getValue() !=
"")
60 anima::writeImage <MainFilterType::OutputImageType> (outFWArg.getValue(),mainFilter->GetOutput(0));
62 if (outIsoRWArg.getValue() !=
"")
63 anima::writeImage <MainFilterType::OutputImageType> (outIsoRWArg.getValue(),mainFilter->GetOutput(1));
65 if (outAnisoRWArg.getValue() !=
"")
66 anima::writeImage <MainFilterType::OutputImageType> (outAnisoRWArg.getValue(),mainFilter->GetOutput(2));
int main(int argc, char **argv)
OutputImagePointer & GetModelVectorImage()
void SetFileName(std::string fileName)