From: Gordon K. <kin...@us...> - 2007-07-09 18:04:29
|
Update of /cvsroot/teem/teem/src/bin In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10219 Modified Files: vprobe.c Log Message: added more control over verbosity Index: vprobe.c =================================================================== RCS file: /cvsroot/teem/teem/src/bin/vprobe.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** vprobe.c 29 Mar 2007 01:39:48 -0000 1.51 --- vprobe.c 9 Jul 2007 18:04:29 -0000 1.52 *************** *** 91,95 **** hestOpt *hopt = NULL; NrrdKernelSpec *k00, *k11, *k22, *kSS, *kSSblur; ! int what, E=0, otype, renorm, hackSet; unsigned int iBaseDim, oBaseDim, axi, numSS, ninSSIdx; const double *answer; --- 91,95 ---- hestOpt *hopt = NULL; NrrdKernelSpec *k00, *k11, *k22, *kSS, *kSSblur; ! int what, E=0, otype, renorm, hackSet, verbose; unsigned int iBaseDim, oBaseDim, axi, numSS, ninSSIdx; const double *answer; *************** *** 116,119 **** --- 116,121 ---- "\"tensor\", or \"dwi\")", NULL, NULL, &probeKindHestCB); + hestOptAdd(&hopt, "v", "verbosity", airTypeInt, 1, 1, &verbose, "1", + "verbosity level"); hestOptAdd(&hopt, "q", "query", airTypeString, 1, 1, &whatS, NULL, "the quantity (scalar, vector, or matrix) to learn by probing"); *************** *** 265,269 **** airMopAdd(mop, ctx, AIR_CAST(airMopper, gageContextNix), airMopAlways); gageParmSet(ctx, gageParmGradMagCurvMin, gmc); ! gageParmSet(ctx, gageParmVerbose, 1); gageParmSet(ctx, gageParmRenormalize, renorm ? AIR_TRUE : AIR_FALSE); gageParmSet(ctx, gageParmCheckIntegrals, AIR_TRUE); --- 267,271 ---- airMopAdd(mop, ctx, AIR_CAST(airMopper, gageContextNix), airMopAlways); gageParmSet(ctx, gageParmGradMagCurvMin, gmc); ! gageParmSet(ctx, gageParmVerbose, verbose); gageParmSet(ctx, gageParmRenormalize, renorm ? AIR_TRUE : AIR_FALSE); gageParmSet(ctx, gageParmCheckIntegrals, AIR_TRUE); *************** *** 362,368 **** ins = nrrdDInsert[nout->type]; for (zi=0; zi<soz; zi++) { ! fprintf(stderr, " " _AIR_SIZE_T_CNV "/" _AIR_SIZE_T_CNV, ! zi, soz-1); fflush(stderr); ! if (AIR_TRUE == hackSet) { if (hackZi != zi) { --- 364,377 ---- ins = nrrdDInsert[nout->type]; for (zi=0; zi<soz; zi++) { ! if (verbose) { ! if (verbose > 1) { ! fprintf(stderr, "z = "); ! } ! fprintf(stderr, " " _AIR_SIZE_T_CNV "/" _AIR_SIZE_T_CNV, ! zi, soz-1); fflush(stderr); ! if (verbose > 1) { ! fprintf(stderr, "\n"); ! } ! } if (AIR_TRUE == hackSet) { if (hackZi != zi) { *************** *** 374,388 **** for (yi=0; yi<soy; yi++) { y = AIR_AFFINE(min[1], yi, maxOut[1], min[1], maxIn[1]); ! /* ! fprintf(stderr, " (%u, %u)", ! AIR_CAST(unsigned int, yi), AIR_CAST(unsigned int, zi)); ! fflush(stderr); ! */ ! for (xi=0; xi<sox; xi++) { ! /* ! fprintf(stderr, " (%u, %u, %u)", AIR_CAST(unsigned int, xi), ! AIR_CAST(unsigned int, yi), AIR_CAST(unsigned int, zi)); fflush(stderr); ! */ x = AIR_AFFINE(min[0], xi, maxOut[0], min[0], maxIn[0]); idx = xi + sox*(yi + soy*zi); --- 383,398 ---- for (yi=0; yi<soy; yi++) { y = AIR_AFFINE(min[1], yi, maxOut[1], min[1], maxIn[1]); ! if (2 == verbose) { ! fprintf(stderr, " %u/%u", AIR_CAST(unsigned int, yi), ! AIR_CAST(unsigned int, soy)); fflush(stderr); ! } ! for (xi=0; xi<sox; xi++) { ! if (verbose > 2) { ! fprintf(stderr, " (%u,%u)/(%u,%u)", ! AIR_CAST(unsigned int, xi), AIR_CAST(unsigned int, yi), ! AIR_CAST(unsigned int, sox), AIR_CAST(unsigned int, soy)); ! fflush(stderr); ! } x = AIR_AFFINE(min[0], xi, maxOut[0], min[0], maxIn[0]); idx = xi + sox*(yi + soy*zi); |