|
From: Gordon K. <kin...@us...> - 2004-04-11 15:18:36
|
Update of /cvsroot/teem/teem/src/bane In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29105 Modified Files: gkmsTxf.c Log Message: brought txf axis labels up to par with recent mite; added minimum value width at bottom of Levoy triangle Index: gkmsTxf.c =================================================================== RCS file: /cvsroot/teem/teem/src/bane/gkmsTxf.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gkmsTxf.c 7 Jan 2004 15:34:27 -0000 1.7 --- gkmsTxf.c 11 Apr 2004 15:04:56 -0000 1.8 *************** *** 35,39 **** airArray *mop; int pret, E, res[2], vi, gi, step; ! float min[2], max[2], top[2], v0, g0, *data, v, g, gwidth, width, tvl, tvr, vl, vr, tmp, maxa; --- 35,40 ---- airArray *mop; int pret, E, res[2], vi, gi, step; ! float min[2], max[2], top[2], v0, g0, *data, v, g, ! gwidth, width, mwidth, tvl, tvr, vl, vr, tmp, maxa; *************** *** 56,59 **** --- 57,62 ---- hestOptAdd(&opt, "w", "value width", airTypeFloat, 1, 1, &width, NULL, "range of values to be spanned at top of triangle"); + hestOptAdd(&opt, "mw", "value width", airTypeFloat, 1, 1, &mwidth, "0", + "range of values to be spanned at BOTTOM of triangle"); hestOptAdd(&opt, "step", NULL, airTypeInt, 0, 0, &step, NULL, "instead of assigning opacity inside a triangular region, " *************** *** 76,85 **** if (!E) E |= nrrdMaybeAlloc(nout, nrrdTypeFloat, 3, 1, res[0], res[1]); if (!E) E |= !(nout->axis[0].label = airStrdup("A")); ! if (!E) E |= !(nout->axis[1].label = airStrdup("gage(v)")); if (!E) nrrdAxisInfoSet(nout, nrrdAxisInfoMin, AIR_NAN, (double)min[0], (double)min[1]); if (!E) nrrdAxisInfoSet(nout, nrrdAxisInfoMax, AIR_NAN, (double)max[0], (double)max[1]); ! if (!E) E |= !(nout->axis[2].label = airStrdup("gage(gm)")); if (E) { sprintf(err, "%s: trouble creating opacity function nrrd", me); --- 79,88 ---- if (!E) E |= nrrdMaybeAlloc(nout, nrrdTypeFloat, 3, 1, res[0], res[1]); if (!E) E |= !(nout->axis[0].label = airStrdup("A")); ! if (!E) E |= !(nout->axis[1].label = airStrdup("gage(scalar:v)")); if (!E) nrrdAxisInfoSet(nout, nrrdAxisInfoMin, AIR_NAN, (double)min[0], (double)min[1]); if (!E) nrrdAxisInfoSet(nout, nrrdAxisInfoMax, AIR_NAN, (double)max[0], (double)max[1]); ! if (!E) E |= !(nout->axis[2].label = airStrdup("gage(scalar:gm)")); if (E) { sprintf(err, "%s: trouble creating opacity function nrrd", me); *************** *** 89,98 **** tvl = top[0] - width/2; tvr = top[0] + width/2; for (gi=0; gi<res[1]; gi++) { g = NRRD_CELL_POS(min[1], max[1], res[1], gi); for (vi=0; vi<res[0]; vi++) { v = NRRD_CELL_POS(min[0], max[0], res[0], vi); ! vl = AIR_AFFINE(0, g, top[1], v0, tvl); ! vr = AIR_AFFINE(0, g, top[1], v0, tvr); if (g > top[1]) { data[vi + res[0]*gi] = 0; --- 92,102 ---- tvl = top[0] - width/2; tvr = top[0] + width/2; + mwidth /= 2; for (gi=0; gi<res[1]; gi++) { g = NRRD_CELL_POS(min[1], max[1], res[1], gi); for (vi=0; vi<res[0]; vi++) { v = NRRD_CELL_POS(min[0], max[0], res[0], vi); ! vl = AIR_AFFINE(0, g, top[1], v0-mwidth, tvl); ! vr = AIR_AFFINE(0, g, top[1], v0+mwidth, tvr); if (g > top[1]) { data[vi + res[0]*gi] = 0; |