|
From: <kin...@us...> - 2004-02-26 18:49:59
|
Update of /cvsroot/teem/teem/src/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28440 Modified Files: miter.c Log Message: fixed bug in handling of volume sizes Index: miter.c =================================================================== RCS file: /cvsroot/teem/teem/src/bin/miter.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** miter.c 26 Feb 2004 06:45:23 -0000 1.24 --- miter.c 26 Feb 2004 18:41:51 -0000 1.25 *************** *** 35,42 **** miteUser *muu; char *me, *errS, *outS, *shadeStr; ! int renorm; int E, Ecode; float ads[3]; double gmc; me = argv[0]; --- 35,43 ---- miteUser *muu; char *me, *errS, *outS, *shadeStr; ! int renorm, baseDim; int E, Ecode; float ads[3]; double gmc; + Nrrd *nin; me = argv[0]; *************** *** 119,122 **** --- 120,138 ---- airMopAdd(mop, hopt, (airMopper)hestParseFree, airMopAlways); + if (muu->nsin) { + nin = muu->nsin; + baseDim = 0; + } else if (muu->nvin) { + nin = muu->nvin; + baseDim = 1; + } else if (muu->ntin) { + nin = muu->ntin; + baseDim = 1; + } else { + fprintf(stderr, "%s: didn't get any volumes to render!\n", me); + airMopError(mop); + return 1; + } + /* finish processing command-line args */ muu->rangeInit[miteRangeKa] = ads[0]; *************** *** 140,145 **** strncpy(muu->shadeStr, shadeStr, AIR_STRLEN_MED-1); muu->shadeStr[AIR_STRLEN_MED-1] = 0; ! nrrdAxisInfoGet_nva(muu->nsin, nrrdAxisInfoSize, muu->hctx->volSize); ! nrrdAxisInfoGet_nva(muu->nsin, nrrdAxisInfoSpacing, muu->hctx->volSpacing); muu->hctx->user = muu; muu->hctx->renderBegin = (hooverRenderBegin_t *)miteRenderBegin; --- 156,165 ---- strncpy(muu->shadeStr, shadeStr, AIR_STRLEN_MED-1); muu->shadeStr[AIR_STRLEN_MED-1] = 0; ! muu->hctx->volSize[0] = nin->axis[baseDim+0].size; ! muu->hctx->volSize[1] = nin->axis[baseDim+1].size; ! muu->hctx->volSize[2] = nin->axis[baseDim+2].size; ! muu->hctx->volSpacing[0] = nin->axis[baseDim+0].spacing; ! muu->hctx->volSpacing[1] = nin->axis[baseDim+1].spacing; ! muu->hctx->volSpacing[2] = nin->axis[baseDim+2].spacing; muu->hctx->user = muu; muu->hctx->renderBegin = (hooverRenderBegin_t *)miteRenderBegin; |