18 #include "ComputeSHCoefficientsOfDWIFromSymmetricTensorCLP.h" 23 DoMain ( std::vector<double>& e1e2, std::vector<double>& bvec,
const int shOrder, std::ostream& os,
const bool outputAll,
const bool nob )
25 for (
int i = 0; i < bvec.size(); i += 1 )
28 utl_shared_ptr<utl::NDArray<double,1> > coef = utl::GetSymmetricTensorSHCoef<double>(b, e1e2[0], e1e2[1], shOrder, 0.0, 0.0 );
33 for (
int i = 0; i < coef->Size(); i += 1 )
34 os << (*coef)[i] <<
" ";
38 for (
int l = 0; l <= shOrder; l += 2 )
41 os << (*coef)[jj] <<
" ";
54 main (
int argc,
char const* argv[])
59 utlGlobalException(_EigenValuesArg.isSet() && _FAMDArg.isSet(),
"only one of --eigenvalues and --famd can be set");
60 utlGlobalException(!_EigenValuesArg.isSet() && !_FAMDArg.isSet(),
"need to set one of --eigenvalues and --famd");
64 if (_EigenValuesArg.isSet())
74 if (_OutputFileArg.isSet())
77 out.open ( _OutputFile.c_str() );
78 DoMain(_EigenValues, _BValues, _SHOrder, out, _OutputAllCoefficientsArg.isSet(), _NoBArg.isSet());
82 DoMain(_EigenValues, _BValues, _SHOrder, std::cout, _OutputAllCoefficientsArg.isSet(), _NoBArg.isSet());
std::vector< T > GetE1E2FromFAMD(const T fa, const T meanEigenValue, const bool isE2E3Equal=true)
int GetIndexSHj(const int l, const int m)
int main(int argc, char const *argv[])
Compute SH coefficients of DWI signal in DTI with symmetric tensor (along z-axis).
#define utlGlobalException(cond, expout)
void DoMain(std::vector< double > &e1e2, std::vector< double > &bvec, const int shOrder, std::ostream &os, const bool outputAll, const bool nob)