|
From: Gordon K. <kin...@us...> - 2004-05-10 19:33:01
|
Update of /cvsroot/teem/teem/src/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14501 Modified Files: miter.c mrender.c Log Message: added support for the field-of-view stuff Index: mrender.c =================================================================== RCS file: /cvsroot/teem/teem/src/bin/mrender.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** mrender.c 13 Mar 2004 20:03:08 -0000 1.33 --- mrender.c 10 May 2004 19:32:51 -0000 1.34 *************** *** 465,469 **** NULL, "0 0 0", "0 0 1", NULL, NULL, NULL, ! "-1 1", "-1 1"); hestOptAdd(&hopt, "is", "image size", airTypeInt, 2, 2, uu->hctx->imgSize, "256 256", "image dimensions"); --- 465,469 ---- NULL, "0 0 0", "0 0 1", NULL, NULL, NULL, ! "nan nan", "nan nan", "20"); hestOptAdd(&hopt, "is", "image size", airTypeInt, 2, 2, uu->hctx->imgSize, "256 256", "image dimensions"); *************** *** 536,539 **** --- 536,549 ---- airEnumStr(uu->kind->enm, uu->whatq), uu->kind->name); + if (limnCameraAspectSet(uu->hctx->cam, + uu->hctx->imgSize[0], uu->hctx->imgSize[1], + nrrdCenterCell) + || limnCameraUpdate(uu->hctx->cam)) { + airMopAdd(mop, errS = biffGetDone(LIMN), airFree, airMopAlways); + fprintf(stderr, "%s: trouble setting camera:\n%s\n", me, errS); + airMopError(mop); + return 1; + } + /* set remaining fields of hoover context */ base = uu->kind->baseDim; Index: miter.c =================================================================== RCS file: /cvsroot/teem/teem/src/bin/miter.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** miter.c 11 Apr 2004 15:06:05 -0000 1.27 --- miter.c 10 May 2004 19:32:51 -0000 1.28 *************** *** 62,66 **** NULL, "0 0 0", "0 0 1", NULL, NULL, NULL, ! "-1 1", "-1 1"); hestOptAdd(&hopt, "ffr", "fake from", airTypeDouble, 3, 3, &(muu->fakeFrom), "nan nan nan", --- 62,66 ---- NULL, "0 0 0", "0 0 1", NULL, NULL, NULL, ! "nan nan", "nan nan", "20"); hestOptAdd(&hopt, "ffr", "fake from", airTypeDouble, 3, 3, &(muu->fakeFrom), "nan nan nan", *************** *** 160,164 **** muu->lit->on[0] = AIR_TRUE; muu->lit->vsp[0] = AIR_TRUE; ! if (limnCameraUpdate(muu->hctx->cam) || limnLightUpdate(muu->lit, muu->hctx->cam)) { airMopAdd(mop, errS = biffGetDone(LIMN), airFree, airMopAlways); --- 160,177 ---- muu->lit->on[0] = AIR_TRUE; muu->lit->vsp[0] = AIR_TRUE; ! if (AIR_EXISTS(muu->hctx->cam->uRange[0]) ! && AIR_EXISTS(muu->hctx->cam->uRange[1]) ! && AIR_EXISTS(muu->hctx->cam->vRange[0]) ! && AIR_EXISTS(muu->hctx->cam->vRange[1])) { ! /* someone went to the trouble of setting the U,V minmax, which ! means they probably don't want the "fov"-based view window, ! whether or not the "fov" value came from the command-line or ! from the (unavoidable) default */ ! muu->hctx->cam->fov = AIR_NAN; ! } ! if (limnCameraAspectSet(muu->hctx->cam, ! muu->hctx->imgSize[0], muu->hctx->imgSize[1], ! nrrdCenterCell) ! || limnCameraUpdate(muu->hctx->cam) || limnLightUpdate(muu->lit, muu->hctx->cam)) { airMopAdd(mop, errS = biffGetDone(LIMN), airFree, airMopAlways); |