You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(19) |
Nov
(45) |
Dec
(80) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(58) |
Feb
(127) |
Mar
(74) |
Apr
(34) |
May
(117) |
Jun
(14) |
Jul
(26) |
Aug
(13) |
Sep
(1) |
Oct
(38) |
Nov
(13) |
Dec
(5) |
| 2005 |
Jan
(108) |
Feb
(134) |
Mar
(54) |
Apr
(133) |
May
(16) |
Jun
(54) |
Jul
(128) |
Aug
(99) |
Sep
(157) |
Oct
(182) |
Nov
(236) |
Dec
(212) |
| 2006 |
Jan
(86) |
Feb
(76) |
Mar
(121) |
Apr
(27) |
May
(7) |
Jun
(1) |
Jul
(6) |
Aug
(28) |
Sep
(1) |
Oct
(27) |
Nov
(5) |
Dec
|
| 2007 |
Jan
(32) |
Feb
(22) |
Mar
(22) |
Apr
(11) |
May
(3) |
Jun
(12) |
Jul
(11) |
Aug
(9) |
Sep
(37) |
Oct
(4) |
Nov
(9) |
Dec
(51) |
| 2008 |
Jan
(7) |
Feb
(31) |
Mar
(46) |
Apr
(31) |
May
(5) |
Jun
(27) |
Jul
(12) |
Aug
(5) |
Sep
(13) |
Oct
(24) |
Nov
(112) |
Dec
(15) |
| 2009 |
Jan
(6) |
Feb
(103) |
Mar
(66) |
Apr
(9) |
May
(8) |
Jun
(1) |
Jul
(20) |
Aug
(9) |
Sep
(2) |
Oct
(81) |
Nov
(88) |
Dec
(30) |
| 2010 |
Jan
(65) |
Feb
(57) |
Mar
(22) |
Apr
(12) |
May
(4) |
Jun
(12) |
Jul
(43) |
Aug
(6) |
Sep
(6) |
Oct
(4) |
Nov
(6) |
Dec
(3) |
| 2011 |
Jan
(10) |
Feb
(27) |
Mar
(11) |
Apr
(9) |
May
(69) |
Jun
(73) |
Jul
(67) |
Aug
(116) |
Sep
(40) |
Oct
(11) |
Nov
(34) |
Dec
(19) |
| 2012 |
Jan
|
Feb
(4) |
Mar
(28) |
Apr
(18) |
May
(9) |
Jun
(7) |
Jul
(4) |
Aug
(155) |
Sep
(264) |
Oct
(172) |
Nov
(15) |
Dec
(40) |
| 2013 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(20) |
Jul
(76) |
Aug
(67) |
Sep
(49) |
Oct
(27) |
Nov
(3) |
Dec
(3) |
| 2014 |
Jan
(7) |
Feb
(7) |
Mar
(16) |
Apr
|
May
(4) |
Jun
(1) |
Jul
(18) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2015 |
Jan
(6) |
Feb
(5) |
Mar
(3) |
Apr
(23) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
|
Nov
(2) |
Dec
(4) |
| 2016 |
Jan
(2) |
Feb
(7) |
Mar
(2) |
Apr
(1) |
May
(14) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(3) |
| 2017 |
Jan
(6) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
(6) |
Oct
|
Nov
(3) |
Dec
|
| 2018 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2019 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(8) |
Oct
|
Nov
(2) |
Dec
(25) |
| 2020 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(53) |
Nov
(33) |
Dec
|
| 2021 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(5) |
| 2022 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(93) |
Aug
(206) |
Sep
(39) |
Oct
(19) |
Nov
(11) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(150) |
Jul
(124) |
Aug
(14) |
Sep
(5) |
Oct
|
Nov
(1) |
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(62) |
Aug
|
Sep
(7) |
Oct
|
Nov
(7) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
(14) |
May
(3) |
Jun
|
Jul
|
Aug
(76) |
Sep
(214) |
Oct
(6) |
Nov
|
Dec
|
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:31:11
|
Update of /cvsroot/teem/teem/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16814 Modified Files: release.txt Log Message: stuff Index: release.txt =================================================================== RCS file: /cvsroot/teem/teem/src/release.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** release.txt 17 May 2004 13:00:37 -0000 1.29 --- release.txt 26 May 2004 02:31:01 -0000 1.30 *************** *** 176,181 **** cd ~/rel ftp upload.sourceforge.net ! ... binary ... ! ... cd incoming ... 8) update online documentation (which may be done more often than releases) --- 176,183 ---- cd ~/rel ftp upload.sourceforge.net ! binary ! prompt ! cd incoming ! mput *.tar.gz 8) update online documentation (which may be done more often than releases) |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:29:58
|
Update of /cvsroot/teem/teem/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16554 Modified Files: GNUmakefile Log Message: added transitive linking for megalibs Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/teem/src/GNUmakefile,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** GNUmakefile 22 Mar 2004 21:49:54 -0000 1.53 --- GNUmakefile 26 May 2004 02:29:46 -0000 1.54 *************** *** 59,62 **** --- 59,63 ---- $(checkArchDarwin) $(checkArchValid) + $(checkTeemDest) ## the architecture name may have two parts, ARCH and SUBARCH, *************** *** 156,160 **** BDEST = $(TEEM_ROOT)/$(TEEM_ARCH)/bin else - IPATH += -I$(TEEM_ROOT)/include IDEST = $(TEEM_DEST)/include LDEST = $(TEEM_DEST)/lib --- 157,160 ---- *************** *** 169,172 **** --- 169,176 ---- IPATH += -I$(IDEST) LPATH += -L$(LDEST) + ifneq (undefined,$(origin TEEM_DEST)) + # we still need this for the teem*.h headers (such as teem32bit.h) + IPATH += -I$(TEEM_ROOT)/include + endif ## By giving a list of library extensions we care about, LIBEXTS determines *************** *** 374,378 **** ifdef TEEM_SHEXT $(LDEST)/libteem.$(TEEM_SHEXT) : $(foreach lib,$(LIBS),$(call objs.dev,$(lib))) ! $(LD) -o $@ $(LDFLAGS) $(LPATH) $^ endif unmegalibs: --- 378,386 ---- ifdef TEEM_SHEXT $(LDEST)/libteem.$(TEEM_SHEXT) : $(foreach lib,$(LIBS),$(call objs.dev,$(lib))) ! $(LD) -o $@ \ ! $(if $(TEEM_DEST),$(if $(SHARED_LINK_NAME),$(SHARED_LINK_NAME)$@,),) \ ! $(LDFLAGS) $(LPATH) $^ \ ! $(foreach X,$(xterns),$(TEEM_$(X)_LPATH)) \ ! $(foreach X,$(xterns),$($(X).LINK)) endif unmegalibs: |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:11:11
|
Update of /cvsroot/teem/teem/src/echo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13575 Modified Files: color.c echo.h intx.c methodsEcho.c Log Message: stuff Index: intx.c =================================================================== RCS file: /cvsroot/teem/teem/src/echo/intx.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** intx.c 19 Feb 2004 06:45:11 -0000 1.40 --- intx.c 26 May 2004 02:11:00 -0000 1.41 *************** *** 26,30 **** */ ! int _echoVerbose; /* --- 26,30 ---- */ ! int _echoVerbose = 0; /* Index: echo.h =================================================================== RCS file: /cvsroot/teem/teem/src/echo/echo.h,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** echo.h 12 May 2004 11:07:24 -0000 1.63 --- echo.h 26 May 2004 02:11:00 -0000 1.64 *************** *** 73,77 **** reuseJitter, /* don't recompute jitter offsets per pixel */ permuteJitter, /* properly permute the various jitter arrays */ - doShadows, /* do shadowing with shadow rays */ textureNN, /* use nearest-neighbor for texture lookups (rather than bilinear interpolation) */ --- 73,76 ---- *************** *** 88,91 **** --- 87,94 ---- sqTol; /* how close newtwon-raphson must get to zero */ echoCol_t + shadow, /* the extent to which shadows are seen: + 0: no shadow rays cast + >0: shadow rays cast, results weighed by shadow + 1: full shadowing */ glassC; /* should really be an additional material parameter: Beer's law attenuation in glass */ Index: methodsEcho.c =================================================================== RCS file: /cvsroot/teem/teem/src/echo/methodsEcho.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** methodsEcho.c 12 May 2004 11:07:24 -0000 1.16 --- methodsEcho.c 26 May 2004 02:11:00 -0000 1.17 *************** *** 32,36 **** parm->reuseJitter = AIR_FALSE; parm->permuteJitter = AIR_TRUE; - parm->doShadows = AIR_TRUE; parm->textureNN = AIR_TRUE; parm->numSamples = 1; --- 32,35 ---- *************** *** 46,49 **** --- 45,49 ---- parm->timeGamma = 6.0; parm->boxOpac = 0.2; + parm->shadow = 1.0; parm->glassC = 3; ELL_3V_SET(parm->maxRecCol, 1.0, 0.0, 1.0); Index: color.c =================================================================== RCS file: /cvsroot/teem/teem/src/echo/color.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** color.c 7 Jan 2004 15:34:28 -0000 1.25 --- color.c 26 May 2004 02:11:00 -0000 1.26 *************** *** 21,25 **** #include "privateEcho.h" ! char _echoBuff[128]; char * --- 21,25 ---- #include "privateEcho.h" ! char _echoBuff[128] = ""; char * *************** *** 98,108 **** echoIntx *intx, echoScene *scene, echoRTParm *parm, echoThreadState *tstate) { ! int Lidx; echoRay shadRay; echoIntx shadIntx; echoPos_t Ldist, Ldir[3], Lpos[3], Ldot; ! echoCol_t Lcol[3]; ! if (parm->doShadows) { /* from, neer, shadow */ shadRay.shadow = AIR_TRUE; --- 98,108 ---- echoIntx *intx, echoScene *scene, echoRTParm *parm, echoThreadState *tstate) { ! int Lidx, blocked; echoRay shadRay; echoIntx shadIntx; echoPos_t Ldist, Ldir[3], Lpos[3], Ldot; ! echoCol_t Lcol[3], fracseen; ! if (parm->shadow) { /* from, neer, shadow */ shadRay.shadow = AIR_TRUE; *************** *** 136,154 **** backsides of even semi-transparent surfaces */ } ! if (parm->doShadows) { ELL_3V_COPY(shadRay.dir, Ldir); shadRay.faar = Ldist; if (echoRayIntx(&shadIntx, &shadRay, scene, parm, tstate)) { ! continue; ! /* to next light, this one is obscured by something */ } } echoLightColor(Lcol, Ldist, scene->light[Lidx], parm, tstate); ! ELL_3V_SCALE_INCR(diff, Ldot, Lcol); if (spec) { Ldot = ELL_3V_DOT(Ldir, intx->refl); if (Ldot > 0) { Ldot = pow(Ldot, sp); ! ELL_3V_SCALE_INCR(spec, Ldot, Lcol); } } --- 136,163 ---- backsides of even semi-transparent surfaces */ } ! if (parm->shadow) { ELL_3V_COPY(shadRay.dir, Ldir); shadRay.faar = Ldist; if (echoRayIntx(&shadIntx, &shadRay, scene, parm, tstate)) { ! if (1.0 == parm->shadow) { ! /* skip to next light, this one is obscured by something, ! and we don't do any partial shadowing */ ! continue; ! } ! blocked = AIR_TRUE; ! } else { ! blocked = AIR_FALSE; } + } else { + blocked = AIR_FALSE; } + fracseen = blocked ? 1.0 - parm->shadow : 1.0; echoLightColor(Lcol, Ldist, scene->light[Lidx], parm, tstate); ! ELL_3V_SCALE_INCR(diff, fracseen*Ldot, Lcol); if (spec) { Ldot = ELL_3V_DOT(Ldir, intx->refl); if (Ldot > 0) { Ldot = pow(Ldot, sp); ! ELL_3V_SCALE_INCR(spec, fracseen*Ldot, Lcol); } } |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:11:10
|
Update of /cvsroot/teem/teem/src/echo/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13575/test Modified Files: trend.c Log Message: stuff Index: trend.c =================================================================== RCS file: /cvsroot/teem/teem/src/echo/test/trend.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** trend.c 12 May 2004 21:52:38 -0000 1.61 --- trend.c 26 May 2004 02:11:00 -0000 1.62 *************** *** 80,84 **** parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->doShadows = AIR_TRUE; nrrdLoad(ntext = nrrdNew(), "chirp.nrrd", NULL); --- 80,84 ---- parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->shadow = 1.0; nrrdLoad(ntext = nrrdNew(), "chirp.nrrd", NULL); *************** *** 123,127 **** parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->doShadows = AIR_FALSE; N = 1000000; --- 123,127 ---- parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->shadow = 0.0; N = 1000000; *************** *** 165,169 **** parm->aperture = 0.0; parm->renderLights = AIR_FALSE; ! parm->doShadows = AIR_FALSE; parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; --- 165,169 ---- parm->aperture = 0.0; parm->renderLights = AIR_FALSE; ! parm->shadow = 0.0; parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; *************** *** 222,226 **** parm->aperture = 0.0; parm->renderLights = AIR_FALSE; ! parm->doShadows = AIR_FALSE; parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; --- 222,226 ---- parm->aperture = 0.0; parm->renderLights = AIR_FALSE; ! parm->shadow = 0.0; parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; *************** *** 284,288 **** parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->doShadows = AIR_TRUE; ELL_4M_IDENTITY_SET(matx); --- 284,288 ---- parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->shadow = 1.0; ELL_4M_IDENTITY_SET(matx); *************** *** 392,396 **** parm->seedRand = AIR_FALSE; ELL_3V_SET(scene->bkgr, 0.2, 0.3, 0.4); ! /* parm->doShadows = AIR_FALSE; */ /* create scene */ --- 392,396 ---- parm->seedRand = AIR_FALSE; ELL_3V_SET(scene->bkgr, 0.2, 0.3, 0.4); ! /* parm->shadow = 0.0; */ /* create scene */ *************** *** 527,531 **** parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->doShadows = AIR_TRUE; rect = echoObjectNew(scene, echoTypeRectangle); --- 527,531 ---- parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->shadow = 1.0; rect = echoObjectNew(scene, echoTypeRectangle); *************** *** 590,594 **** parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->doShadows = AIR_TRUE; nrrdLoad(ntext = nrrdNew(), "tmp.png", NULL); --- 590,594 ---- parm->seedRand = AIR_FALSE; parm->maxRecDepth = 10; ! parm->shadow = 1.0; nrrdLoad(ntext = nrrdNew(), "tmp.png", NULL); *************** *** 639,648 **** cam->vRange[1] = 1.8; ! parm->jitterType = echoJitterJitter; ! parm->numSamples = 4; parm->imgResU = 200; parm->imgResV = 200; parm->aperture = 0.0; ! parm->renderLights = AIR_TRUE; /* create scene */ --- 639,649 ---- cam->vRange[1] = 1.8; ! parm->jitterType = echoJitterGrid; ! parm->numSamples = 9; parm->imgResU = 200; parm->imgResV = 200; parm->aperture = 0.0; ! parm->renderLights = AIR_FALSE; ! parm->shadow = 0.5; /* create scene */ *************** *** 690,694 **** echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); ! } --- 691,695 ---- echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); ! echoObjectAdd(scene, rect); } *************** *** 707,711 **** parm->jitterType = echoJitterJitter; ! parm->numSamples = 25; parm->imgResU = 300; parm->imgResV = 300; --- 708,712 ---- parm->jitterType = echoJitterJitter; ! parm->numSamples = 9; parm->imgResU = 300; parm->imgResV = 300; *************** *** 717,721 **** parm->maxRecDepth = 10; ELL_3V_SET(parm->maxRecCol, 0, 0, 0); ! parm->doShadows = AIR_TRUE; rect = echoObjectNew(scene, echoTypeRectangle); --- 718,722 ---- parm->maxRecDepth = 10; ELL_3V_SET(parm->maxRecCol, 0, 0, 0); ! parm->shadow = 1.0; rect = echoObjectNew(scene, echoTypeRectangle); *************** *** 805,809 **** parm->aperture = 0.0; parm->renderLights = AIR_TRUE; ! parm->doShadows = AIR_FALSE; ELL_3V_SET(scene->bkgr, 0.1, 0.1, 0.1); --- 806,810 ---- parm->aperture = 0.0; parm->renderLights = AIR_TRUE; ! parm->shadow = 0.0; ELL_3V_SET(scene->bkgr, 0.1, 0.1, 0.1); *************** *** 875,882 **** /* makeSceneInstance(cam, parm, scene); */ /* makeSceneTexture(cam, parm, scene); */ ! makeSceneSimple(cam, parm, scene); /* makeSceneRainLights(cam, parm, scene); */ /* makeSceneAntialias(cam, parm, scene); */ ! /* makeSceneShadow(cam, parm, scene); */ /* makeSceneDOF(cam, parm, scene); */ --- 876,883 ---- /* makeSceneInstance(cam, parm, scene); */ /* makeSceneTexture(cam, parm, scene); */ ! /* makeSceneSimple(cam, parm, scene); */ /* makeSceneRainLights(cam, parm, scene); */ /* makeSceneAntialias(cam, parm, scene); */ ! makeSceneShadow(cam, parm, scene); /* makeSceneDOF(cam, parm, scene); */ |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:10:41
|
Update of /cvsroot/teem/teem/src/limn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13469 Modified Files: limn.h renderLimn.c transform.c Log Message: fixed STUPID design in how face depth sorting is implemented, which required a global variable Index: limn.h =================================================================== RCS file: /cvsroot/teem/teem/src/limn/limn.h,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** limn.h 13 May 2004 06:11:36 -0000 1.55 --- limn.h 26 May 2004 02:10:30 -0000 1.56 *************** *** 271,275 **** limnFace *face; int faceNum; airArray *faceArr; ! int *faceSort; /* indices into "face", sorted by depth */ limnPart **part; int partNum; /* double indirection, see above */ --- 271,275 ---- limnFace *face; int faceNum; airArray *faceArr; ! limnFace **faceSort; /* pointers into "face", sorted by depth */ limnPart **part; int partNum; /* double indirection, see above */ Index: renderLimn.c =================================================================== RCS file: /cvsroot/teem/teem/src/limn/renderLimn.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** renderLimn.c 13 May 2004 06:11:36 -0000 1.25 --- renderLimn.c 26 May 2004 02:10:31 -0000 1.26 *************** *** 352,356 **** (contours, front crease, front non-crease) */ for (faceIdx=0; faceIdx<obj->faceNum; faceIdx++) { ! face = obj->face + obj->faceSort[faceIdx]; part = obj->part[face->partIdx]; if (!face->visible) { --- 352,356 ---- (contours, front crease, front non-crease) */ for (faceIdx=0; faceIdx<obj->faceNum; faceIdx++) { ! face = obj->faceSort[faceIdx]; part = obj->part[face->partIdx]; if (!face->visible) { Index: transform.c =================================================================== RCS file: /cvsroot/teem/teem/src/limn/transform.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** transform.c 13 May 2004 06:11:36 -0000 1.23 --- transform.c 26 May 2004 02:10:31 -0000 1.24 *************** *** 288,301 **** } - limnFace *_limnFaceHack; - int _limnFaceDepthCompare(const void *_a, const void *_b) { ! int *a; ! int *b; ! a = (int *)_a; ! b = (int *)_b; ! return -AIR_COMPARE(_limnFaceHack[*a].depth, _limnFaceHack[*b].depth); } --- 288,299 ---- } int _limnFaceDepthCompare(const void *_a, const void *_b) { ! limnFace **a; ! limnFace **b; ! a = (limnFace **)_a; ! b = (limnFace **)_b; ! return -AIR_COMPARE((*a)->depth, (*b)->depth); } *************** *** 307,311 **** int faceIdx, vii; ! obj->faceSort = (int*)calloc(obj->faceNum, sizeof(int)); for (faceIdx=0; faceIdx<obj->faceNum; faceIdx++) { face = obj->face + faceIdx; --- 305,309 ---- int faceIdx, vii; ! obj->faceSort = (limnFace **)calloc(obj->faceNum, sizeof(limnFace *)); for (faceIdx=0; faceIdx<obj->faceNum; faceIdx++) { face = obj->face + faceIdx; *************** *** 317,325 **** } face->depth /= face->sideNum; ! obj->faceSort[faceIdx] = faceIdx; } ! _limnFaceHack = obj->face; ! qsort(obj->faceSort, obj->faceNum, sizeof(int), _limnFaceDepthCompare); return 0; --- 315,323 ---- } face->depth /= face->sideNum; ! obj->faceSort[faceIdx] = face; } ! qsort(obj->faceSort, obj->faceNum, ! sizeof(limnFace *), _limnFaceDepthCompare); return 0; |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:06:54
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12709 Modified Files: reorder.c nrrd.h Log Message: renamed nrrdTile to nrrdTile2D, nrrdUntile to nrrdUntil2D, and renamed the names of some formal arguments Index: reorder.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/reorder.c,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** reorder.c 25 May 2004 15:34:57 -0000 1.60 --- reorder.c 26 May 2004 02:06:44 -0000 1.61 *************** *** 1059,1076 **** /* ! ******** nrrdTile() ** ** Splits axis axSplit into two pieces of size sizeFast and sizeSlow. ! ** The data from the fast partition is juxtaposed following ax1, the ! ** slow after ax2. nrrdAxesMerge is then called to join ax1 and ax2 ** with their respective newly permuted data. There should be one ** fewer dimensions in the output nrrd than in the input nrrd. */ int ! nrrdTile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, ! int axSplit, int sizeFast, int sizeSlow) { ! char me[]="nrrdTile", err[AIR_STRLEN_MED]; Nrrd *ntmp; ! int E, axis[NRRD_DIM_MAX], i, pindex, ax1merge, ax2merge; airArray *mop; --- 1059,1076 ---- /* ! ******** nrrdTile2D() ** ** Splits axis axSplit into two pieces of size sizeFast and sizeSlow. ! ** The data from the fast partition is juxtaposed following ax0, the ! ** slow after ax1. nrrdAxesMerge is then called to join ax0 and ax1 ** with their respective newly permuted data. There should be one ** fewer dimensions in the output nrrd than in the input nrrd. */ int ! nrrdTile2D(Nrrd *nout, const Nrrd *nin, int ax0, int ax1, ! int axSplit, int sizeFast, int sizeSlow) { ! char me[]="nrrdTile2D", err[AIR_STRLEN_MED]; Nrrd *ntmp; ! int E, axis[NRRD_DIM_MAX], i, pindex, ax0merge, ax1merge; airArray *mop; *************** *** 1080,1088 **** } ! /* I'm not sure how to handle if ax2 == ax1. I think for now, I will prohibit it as it doesn't make sense to tile to the same axis. */ ! if (ax1 == ax2) { ! sprintf(err, "%s: ax1 (%d) cannot equal ax2 (%d)", me, ax1, ax2); biffAdd(NRRD, err); return 1; } --- 1080,1088 ---- } ! /* I'm not sure how to handle if ax1 == ax0. I think for now, I will prohibit it as it doesn't make sense to tile to the same axis. */ ! if (ax0 == ax1) { ! sprintf(err, "%s: ax0 (%d) cannot equal ax1 (%d)", me, ax0, ax1); biffAdd(NRRD, err); return 1; } *************** *** 1115,1126 **** } ! /* update ax1 and ax2. If the split axis was below ax1 or ax2 we need to increment them */ if (axSplit < ax1) { ax1++; } - if (axSplit < ax2) { - ax2++; - } /******************************************************/ --- 1115,1126 ---- } ! /* update ax0 and ax1. If the split axis was below ax0 or ax1 we need to increment them */ + if (axSplit < ax0) { + ax0++; + } if (axSplit < ax1) { ax1++; } /******************************************************/ *************** *** 1132,1153 **** pindex = 0; /* These are place holders for which axis needs merging. These are ! the indicies where ax1 and ax2 are placed into axis. For now initialize these to -1 to make sure they get set. */ ax1merge = -1; - ax2merge = -1; /* The idea here is to loop over the input indicies. If the index ! is one of either ax1 or ax2 copy that index. */ for (i=0; i<ntmp->dim; i++) { ! if (i == ax1) { axis[pindex] = i; /* Cache this position for merging later */ ! ax1merge = pindex; pindex++; /* Set the next axis to the fast part of our split axis */ axis[pindex] = axSplit; pindex++; ! } else if (i == ax2) { axis[pindex] = i; ! ax2merge = pindex; pindex++; axis[pindex] = axSplit+1; --- 1132,1153 ---- pindex = 0; /* These are place holders for which axis needs merging. These are ! the indicies where ax0 and ax1 are placed into axis. For now initialize these to -1 to make sure they get set. */ + ax0merge = -1; ax1merge = -1; /* The idea here is to loop over the input indicies. If the index ! is one of either ax0 or ax1 copy that index. */ for (i=0; i<ntmp->dim; i++) { ! if (i == ax0) { axis[pindex] = i; /* Cache this position for merging later */ ! ax0merge = pindex; pindex++; /* Set the next axis to the fast part of our split axis */ axis[pindex] = axSplit; pindex++; ! } else if (i == ax1) { axis[pindex] = i; ! ax1merge = pindex; pindex++; axis[pindex] = axSplit+1; *************** *** 1172,1183 **** if (!E) { /* It's easier for bookkeeping if we merge the slower axis first. */ ! if (ax1merge > ax2merge) { ! int axSwap = ax1merge; ! ax1merge = ax2merge; ! ax2merge = axSwap; } ! E |= nrrdAxesMerge(nout, nout, ax2merge); } ! if (!E) E |= nrrdAxesMerge(nout, nout, ax1merge); if (E) { --- 1172,1183 ---- if (!E) { /* It's easier for bookkeeping if we merge the slower axis first. */ ! if (ax0merge > ax1merge) { ! int axSwap = ax0merge; ! ax0merge = ax1merge; ! ax1merge = axSwap; } ! E |= nrrdAxesMerge(nout, nout, ax1merge); } ! if (!E) E |= nrrdAxesMerge(nout, nout, ax0merge); if (E) { *************** *** 1193,1208 **** /* ! ******** nrrdUntile() ** ! ** This will split ax1 into nin->axis[ax1].size/sizeFast and sizeFast ! ** sizes. ax2 will then be split into nin->axis[ax2].size/sizeSlow ** and sizeSlow sizes. The axes corresponding to sizeFast and ** sizeSlow will be permuted and merged such that ** nout->axis[axMerge].size == sizeFast*sizeSlow. */ ! int nrrdUntile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, ! int axMerge, int sizeFast, int sizeSlow) { ! char me[]="nrrdUntile", err[AIR_STRLEN_MED]; ! int E, axis[NRRD_DIM_MAX], i, pindex, ax1sizeFast, ax2sizeFast; Nrrd *ntmp; airArray *mop; --- 1193,1208 ---- /* ! ******** nrrdUntile2D() ** ! ** This will split ax0 into nin->axis[ax0].size/sizeFast and sizeFast ! ** sizes. ax1 will then be split into nin->axis[ax1].size/sizeSlow ** and sizeSlow sizes. The axes corresponding to sizeFast and ** sizeSlow will be permuted and merged such that ** nout->axis[axMerge].size == sizeFast*sizeSlow. */ ! int nrrdUntile2D(Nrrd *nout, const Nrrd *nin, int ax0, int ax1, ! int axMerge, int sizeFast, int sizeSlow) { ! char me[]="nrrdUntile2D", err[AIR_STRLEN_MED]; ! int E, axis[NRRD_DIM_MAX], i, pindex, ax0sizeFast, ax1sizeFast; Nrrd *ntmp; airArray *mop; *************** *** 1212,1226 **** biffAdd(NRRD, err); return 1; } ! /* Check to make sure the values of ax1, ax2, and axMerge are valid. */ E = AIR_FALSE; ! if (ax1 >= nin->dim) { ! sprintf(err, "%s: ax1 (%d) needs to be < than # dimensions (%d)", ! me, ax1, nin->dim); biffAdd(NRRD, err); E |= AIR_TRUE; } ! if (ax2 >= nin->dim) { ! sprintf(err, "%s: ax2 (%d) needs to be < than # dimensions (%d)", ! me, ax2, nin->dim); biffAdd(NRRD, err); E |= AIR_TRUE; --- 1212,1226 ---- biffAdd(NRRD, err); return 1; } ! /* Check to make sure the values of ax0, ax1, and axMerge are valid. */ E = AIR_FALSE; ! if (ax0 >= nin->dim) { ! sprintf(err, "%s: ax0 (%d) needs to be < than # dimensions (%d)", ! me, ax0, nin->dim); biffAdd(NRRD, err); E |= AIR_TRUE; } ! if (ax1 >= nin->dim) { ! sprintf(err, "%s: ax1 (%d) needs to be < than # dimensions (%d)", ! me, ax1, nin->dim); biffAdd(NRRD, err); E |= AIR_TRUE; *************** *** 1236,1257 **** } ! /* Check the sizes of sizeFast and sizeSlow divide into ax1 ! and ax2 evenly. */ { int ax1size = nin->axis[ax1].size; - int ax2size = nin->axis[ax2].size; E = AIR_FALSE; ! ax1sizeFast = ax1size/sizeFast; ! if (ax1size != (sizeFast*ax1sizeFast)) { ! sprintf(err, "%s: sizeFast(%d) is not a multiple of ax1.size(%d)", ! me, sizeFast, ax1size); biffAdd(NRRD, err); E |= AIR_TRUE; } ! ax2sizeFast = ax2size/sizeSlow; ! if (ax2size != (ax2sizeFast*sizeSlow)) { ! sprintf(err, "%s: sizeSlow(%d) is not a multiple of ax2.size(%d)", ! me, sizeSlow, ax2size); biffAdd(NRRD, err); E |= AIR_TRUE; --- 1236,1257 ---- } ! /* Check the sizes of sizeFast and sizeSlow divide into ax0 ! and ax1 evenly. */ { + int ax0size = nin->axis[ax0].size; int ax1size = nin->axis[ax1].size; E = AIR_FALSE; ! ax0sizeFast = ax0size/sizeFast; ! if (ax0size != (sizeFast*ax0sizeFast)) { ! sprintf(err, "%s: sizeFast(%d) is not a multiple of ax0.size(%d)", ! me, sizeFast, ax0size); biffAdd(NRRD, err); E |= AIR_TRUE; } ! ax1sizeFast = ax1size/sizeSlow; ! if (ax1size != (ax1sizeFast*sizeSlow)) { ! sprintf(err, "%s: sizeSlow(%d) is not a multiple of ax1.size(%d)", ! me, sizeSlow, ax1size); biffAdd(NRRD, err); E |= AIR_TRUE; *************** *** 1262,1268 **** } ! /* ax1 and ax2 must not be equal. */ ! if (ax1 == ax2) { ! sprintf(err, "%s: ax1 and ax2 must not be equal (%d)", me, ax1); biffAdd(NRRD, err); return 1; } --- 1262,1268 ---- } ! /* ax0 and ax1 must not be equal. */ ! if (ax0 == ax1) { ! sprintf(err, "%s: ax0 and ax1 must not be equal (%d)", me, ax0); biffAdd(NRRD, err); return 1; } *************** *** 1281,1294 **** /* Now split the axes. Do the larger one first. */ ! if (ax1 < ax2) { ! if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax2, ax2sizeFast, sizeSlow); ! if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax1, ax1sizeFast, sizeFast); /* Increment the larger value as it will get shifted by the lower split. */ - ax2++; - } else { - if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax1, ax1sizeFast, sizeFast); - if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax2, ax2sizeFast, sizeSlow); ax1++; } --- 1281,1294 ---- /* Now split the axes. Do the larger one first. */ ! if (ax0 < ax1) { ! if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax1, ax1sizeFast, sizeSlow); ! if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax0, ax0sizeFast, sizeFast); /* Increment the larger value as it will get shifted by the lower split. */ ax1++; + } else { + if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax0, ax0sizeFast, sizeFast); + if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax1, ax1sizeFast, sizeSlow); + ax0++; } *************** *** 1304,1311 **** if (pindex == axMerge) { /* Insert the permuted axes. */ axis[pindex++] = ax1+1; - axis[pindex++] = ax2+1; } ! if (i == ax1+1 || i == ax2+1) { /* Ignore the axes which will be permuted */ } else { --- 1304,1311 ---- if (pindex == axMerge) { /* Insert the permuted axes. */ + axis[pindex++] = ax0+1; axis[pindex++] = ax1+1; } ! if (i == ax0+1 || i == ax1+1) { /* Ignore the axes which will be permuted */ } else { Index: nrrd.h =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/nrrd.h,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** nrrd.h 19 May 2004 19:19:02 -0000 1.139 --- nrrd.h 26 May 2004 02:06:44 -0000 1.140 *************** *** 666,673 **** TEEM_API int nrrdBlock(Nrrd *nout, const Nrrd *nin); TEEM_API int nrrdUnblock(Nrrd *nout, const Nrrd *nin, int type); ! TEEM_API int nrrdTile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, ! int axSplit, int sizeFast, int sizeSlow); ! TEEM_API int nrrdUntile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, ! int axMerge, int sizeFast, int sizeSlow); /******** things useful with hest */ --- 666,673 ---- TEEM_API int nrrdBlock(Nrrd *nout, const Nrrd *nin); TEEM_API int nrrdUnblock(Nrrd *nout, const Nrrd *nin, int type); ! TEEM_API int nrrdTile2D(Nrrd *nout, const Nrrd *nin, int ax0, int ax1, ! int axSplit, int sizeFast, int sizeSlow); ! TEEM_API int nrrdUntile2D(Nrrd *nout, const Nrrd *nin, int ax0, int ax1, ! int axMerge, int sizeFast, int sizeSlow); /******** things useful with hest */ |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:02:32
|
Update of /cvsroot/teem/teem/src/ten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12091 Modified Files: tendGlyph.c glyph.c Log Message: added a shadowing extent option, and fixed the positioning of area lights Index: glyph.c =================================================================== RCS file: /cvsroot/teem/teem/src/ten/glyph.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** glyph.c 13 May 2004 15:30:39 -0000 1.39 --- glyph.c 26 May 2004 02:02:24 -0000 1.40 *************** *** 356,359 **** --- 356,360 ---- ELL_3V_SCALE(eval, parm->glyphScale, eval); /* scale by evals */ ELL_4M_SCALE_SET(mB, eval[0], eval[1], eval[2]); + ell_4m_post_mul_f(mA, mB); ELL_43M_INSET(mB, rotEvec); /* rotate by evecs */ Index: tendGlyph.c =================================================================== RCS file: /cvsroot/teem/teem/src/ten/tendGlyph.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** tendGlyph.c 17 May 2004 13:00:39 -0000 1.30 --- tendGlyph.c 26 May 2004 02:02:24 -0000 1.31 *************** *** 110,114 **** echoGlobalState *gstate; tenGlyphParm *gparm; ! float bg[3], buvne[5]; int ires[2], slice[2], nobg, hacknumcam, hackci, hackmin[3]={0,0,0}, hackmax[3]={2,0,0}; --- 110,114 ---- echoGlobalState *gstate; tenGlyphParm *gparm; ! float bg[3], buvne[5], shadow; int ires[2], slice[2], nobg, hacknumcam, hackci, hackmin[3]={0,0,0}, hackmax[3]={2,0,0}; *************** *** 291,294 **** --- 291,296 ---- "brightness 0 (the default) to turn this off, and use " "environment map-based shading (\"-emap\") instead. "); + hestOptAdd(&hopt, "shadow", "s", airTypeFloat, 1, 1, &shadow, "1.0", + "the extent to which shadowing occurs"); hestOptAdd(&hopt, "hack", "hack", airTypeString, 1, 1, &hackFN, "", "don't mind me"); *************** *** 336,339 **** --- 338,342 ---- cam->faar = 2; cam->atRelative = AIR_TRUE; + eparm->shadow = shadow; if (buvne[0] > 0) { *************** *** 355,365 **** echoRectangleSet(rect, corn[0], corn[1], corn[2], ! edir[0]*2, edir[1]*2, edir[2]*2, ! fdir[0]*2, fdir[1]*2, fdir[2]*2); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, buvne[0], 0); echoObjectAdd(scene, rect); } - eparm->imgResU = ires[0]; eparm->imgResV = ires[1]; --- 358,367 ---- echoRectangleSet(rect, corn[0], corn[1], corn[2], ! -edir[0]*2, -edir[1]*2, -edir[2]*2, ! -fdir[0]*2, -fdir[1]*2, -fdir[2]*2); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, buvne[0], 0); echoObjectAdd(scene, rect); } eparm->imgResU = ires[0]; eparm->imgResV = ires[1]; |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:01:20
|
Update of /cvsroot/teem/teem/src/unrrdu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11912 Modified Files: tile.c untile.c Log Message: changed semantics of ordering of the three axis arguments Index: untile.c =================================================================== RCS file: /cvsroot/teem/teem/src/unrrdu/untile.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** untile.c 20 May 2004 19:10:26 -0000 1.1 --- untile.c 26 May 2004 02:01:11 -0000 1.2 *************** *** 21,25 **** #include "privateUnrrdu.h" ! #define INFO "Used to do the inverse of the tile operation" char *_unrrdu_untileInfoL = (INFO --- 21,25 ---- #include "privateUnrrdu.h" ! #define INFO "Undo the action of \"unu tile\"" char *_unrrdu_untileInfoL = (INFO *************** *** 39,44 **** airArray *mop; ! hestOptAdd(&opt, "a", "ax0 ax1 axSplit", airTypeInt, 3, 3, axes, NULL, ! "axSplit is divided and merged with ax0 and ax1"); hestOptAdd(&opt, "s", "fast, slow sizes", airTypeInt, 2, 2, size, NULL, "fast and slow axis sizes to produce as result of splitting " --- 39,44 ---- airArray *mop; ! hestOptAdd(&opt, "a", "axMerge ax0 ax1", airTypeInt, 3, 3, axes, NULL, ! "an axis is extracted from ax0 and ax1 and merged into axMerge"); hestOptAdd(&opt, "s", "fast, slow sizes", airTypeInt, 2, 2, size, NULL, "fast and slow axis sizes to produce as result of splitting " *************** *** 57,61 **** airMopAdd(mop, nout, (airMopper)nrrdNuke, airMopAlways); ! if (nrrdUntile(nout, nin, axes[0], axes[1], axes[2], size[0], size[1])) { airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways); fprintf(stderr, "%s: error tiling nrrd:\n%s", me, err); --- 57,61 ---- airMopAdd(mop, nout, (airMopper)nrrdNuke, airMopAlways); ! if (nrrdUntile2D(nout, nin, axes[1], axes[2], axes[0], size[0], size[1])) { airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways); fprintf(stderr, "%s: error tiling nrrd:\n%s", me, err); Index: tile.c =================================================================== RCS file: /cvsroot/teem/teem/src/unrrdu/tile.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tile.c 20 May 2004 19:11:54 -0000 1.2 --- tile.c 26 May 2004 02:01:11 -0000 1.3 *************** *** 21,25 **** #include "privateUnrrdu.h" ! #define INFO "Used to tile one axis agaist two others" char *_unrrdu_tileInfoL = (INFO --- 21,25 ---- #include "privateUnrrdu.h" ! #define INFO "Tile slices of one axis into two other axes" char *_unrrdu_tileInfoL = (INFO *************** *** 36,40 **** airArray *mop; ! hestOptAdd(&opt, "a", "ax0 ax1 axSplit", airTypeInt, 3, 3, axes, NULL, "axSplit is divided and merged with ax0 and ax1"); hestOptAdd(&opt, "s", "fast, slow sizes", airTypeInt, 2, 2, size, NULL, --- 36,40 ---- airArray *mop; ! hestOptAdd(&opt, "a", "axSplit ax0 ax1", airTypeInt, 3, 3, axes, NULL, "axSplit is divided and merged with ax0 and ax1"); hestOptAdd(&opt, "s", "fast, slow sizes", airTypeInt, 2, 2, size, NULL, *************** *** 54,58 **** airMopAdd(mop, nout, (airMopper)nrrdNuke, airMopAlways); ! if (nrrdTile(nout, nin, axes[0], axes[1], axes[2], size[0], size[1])) { airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways); fprintf(stderr, "%s: error tiling nrrd:\n%s", me, err); --- 54,58 ---- airMopAdd(mop, nout, (airMopper)nrrdNuke, airMopAlways); ! if (nrrdTile2D(nout, nin, axes[1], axes[2], axes[0], size[0], size[1])) { airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways); fprintf(stderr, "%s: error tiling nrrd:\n%s", me, err); |
|
From: Gordon K. <kin...@us...> - 2004-05-25 15:42:02
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26426 Modified Files: methodsNrrd.c Log Message: forgot to create mop prior to use Index: methodsNrrd.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/methodsNrrd.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** methodsNrrd.c 25 May 2004 15:37:04 -0000 1.42 --- methodsNrrd.c 25 May 2004 15:41:52 -0000 1.43 *************** *** 468,471 **** --- 468,472 ---- /* Since we should never have copied the data, or allocated new meta-data, we want to make sure that we don't delete it here. */ + mop = airMopNew(); airMopAdd(mop, ntmp, airFree, airMopAlways); |
|
From: Gordon K. <kin...@us...> - 2004-05-25 15:40:29
|
Update of /cvsroot/teem/teem/src/air In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26154/air Modified Files: miscAir.c Log Message: going forward, we have an augmented global versioning identification strategy Index: miscAir.c =================================================================== RCS file: /cvsroot/teem/teem/src/air/miscAir.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** miscAir.c 13 May 2004 15:37:01 -0000 1.27 --- miscAir.c 25 May 2004 15:40:19 -0000 1.28 *************** *** 38,44 **** */ const char * ! airTeemVersion = "1.7"; const char * ! airTeemReleaseDate = "17 May 2004"; /* --- 38,44 ---- */ const char * ! airTeemVersion = "1.8 pre-release"; const char * ! airTeemReleaseDate = "XX XXX 2004"; /* |
|
From: Gordon K. <kin...@us...> - 2004-05-25 15:37:13
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25537 Modified Files: methodsNrrd.c Log Message: comment header for non-public functions not marked by 8 "*", only 2 added airMop usage Index: methodsNrrd.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/methodsNrrd.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** methodsNrrd.c 19 May 2004 19:23:25 -0000 1.41 --- methodsNrrd.c 25 May 2004 15:37:04 -0000 1.42 *************** *** 440,444 **** /* ! ******** _nrrdCopyShallow ** ** Similar to nrrdCopy, but the data itself is not copied. nout->data --- 440,444 ---- /* ! ** _nrrdCopyShallow ** ** Similar to nrrdCopy, but the data itself is not copied. nout->data *************** *** 451,454 **** --- 451,455 ---- char me[]="_nrrdCopyShallow", err[AIR_STRLEN_MED]; Nrrd *ntmp; + airArray *mop; if (!(nin && nout)) { *************** *** 457,463 **** } ! /* Don't use nrrdNew as this allocates axillary data that is ! annoying to delete. We don't need to anyway since we will simply ! copy over the pointers later with the memcpy. */ ntmp = (Nrrd*)(calloc(1, sizeof(Nrrd))); if (!ntmp) { --- 458,464 ---- } ! /* We're not using nrrdNew() because it allocates new airArray's for ! comments (cmtArr) and key/value pairs (kvpArr), which we do not ! need here, and which we don't want to have to explicitly delete */ ntmp = (Nrrd*)(calloc(1, sizeof(Nrrd))); if (!ntmp) { *************** *** 465,468 **** --- 466,473 ---- biffAdd(NRRD, err); return 1; } + /* Since we should never have copied the data, or allocated new meta-data, + we want to make sure that we don't delete it here. */ + airMopAdd(mop, ntmp, airFree, airMopAlways); + /* Shallow copy the contents of the nrrd. It's OK if this is not a deep copy (i.e. all the axis info), because nrrdCopy will do this *************** *** 471,483 **** memcpy(ntmp, nin, sizeof(Nrrd)); ! /* Setting this to 0 will cause nrrdCopy to not copy the data */ ! ntmp->data = 0; if (nrrdCopy(nout, ntmp)) { ! sprintf(err, "%s:", me); biffAdd(NRRD, err); ! /* Since we should never have copied the data, we want to make sure ! that we don't delete it here. */ ! free(ntmp); return 1; } --- 476,486 ---- memcpy(ntmp, nin, sizeof(Nrrd)); ! /* Setting this to NULL will cause nrrdCopy to not copy the data */ ! ntmp->data = NULL; if (nrrdCopy(nout, ntmp)) { ! sprintf(err, "%s: couldn't copy to output", me); biffAdd(NRRD, err); ! airMopError(mop); return 1; } *************** *** 486,492 **** nout->data = nin->data; ! /* Clean up */ ! free(ntmp); ! return 0; } --- 489,493 ---- nout->data = nin->data; ! airMopOkay(mop); return 0; } *************** *** 532,538 **** nout->data = NULL; /* We need to make sure to copy important stuff like type, dim, ! and sizes, as this information is not copied elsewhere. The ! data copying version sets these in nrrdAlloc_nva (which is ! called by nrrdMaybeAlloc_nva). */ nout->type = nin->type; nout->dim = nin->dim; --- 533,539 ---- nout->data = NULL; /* We need to make sure to copy important stuff like type, dim, ! and sizes, as this information is not copied elsewhere. If we ! did have non-NULL data, this information would be set in ! nrrdAlloc_nva() called by nrrdMaybeAlloc_nva() above. */ nout->type = nin->type; nout->dim = nin->dim; |
|
From: Gordon K. <kin...@us...> - 2004-05-25 15:35:07
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25138 Modified Files: reorder.c Log Message: made sure that all biff error messages in a function are distinguishable added use of airMop's *whenever* there is local memory allocation enforced GK-standard use of "E" error flag variable rename (temp --> ntmp) error messsage re-arranging white-space games Index: reorder.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/reorder.c,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** reorder.c 20 May 2004 19:09:39 -0000 1.59 --- reorder.c 25 May 2004 15:34:57 -0000 1.60 *************** *** 1067,1077 **** ** fewer dimensions in the output nrrd than in the input nrrd. */ - int nrrdTile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, int axSplit, int sizeFast, int sizeSlow) { char me[]="nrrdTile", err[AIR_STRLEN_MED]; ! Nrrd *temp; int E, axis[NRRD_DIM_MAX], i, pindex, ax1merge, ax2merge; if (!(nout && nin)) { --- 1067,1077 ---- ** fewer dimensions in the output nrrd than in the input nrrd. */ int nrrdTile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, int axSplit, int sizeFast, int sizeSlow) { char me[]="nrrdTile", err[AIR_STRLEN_MED]; ! Nrrd *ntmp; int E, axis[NRRD_DIM_MAX], i, pindex, ax1merge, ax2merge; + airArray *mop; if (!(nout && nin)) { *************** *** 1084,1111 **** axis. */ if (ax1 == ax2) { ! sprintf(err, "%s: ax1(%d) cannot equal ax2(%d)", me, ax1, ax2); biffAdd(NRRD, err); return 1; } /* This is the temporary nrrd used for intermediate values. */ ! temp = nrrdNew(); ! if (!temp) { sprintf(err, "%s: failed to allocate temporary nrrd", me); biffAdd(NRRD, err); return 1; } /* Use _nrrdCopyShallow to just copy the header information without copying the data. */ ! E = _nrrdCopyShallow(temp, nin); /* Split the axis we will tile */ ! if (!E) E |= nrrdAxesSplit(temp, temp, axSplit, sizeFast, sizeSlow); /* We'll go ahead not and check for errors now as there is a lot of computation before the next nrrd call. */ if (E) { ! sprintf(err, "%s:", me); biffAdd(NRRD, err); ! nrrdNix(temp); return 1; } --- 1084,1115 ---- axis. */ if (ax1 == ax2) { ! sprintf(err, "%s: ax1 (%d) cannot equal ax2 (%d)", me, ax1, ax2); biffAdd(NRRD, err); return 1; } /* This is the temporary nrrd used for intermediate values. */ ! ntmp = nrrdNew(); ! if (!ntmp) { sprintf(err, "%s: failed to allocate temporary nrrd", me); biffAdd(NRRD, err); return 1; } + mop = airMopNew(); + airMopAdd(mop, ntmp, (airMopper)nrrdNix, airMopAlways); + /* Use _nrrdCopyShallow to just copy the header information without copying the data. */ ! E = AIR_FALSE; ! if (!E) E |= _nrrdCopyShallow(ntmp, nin); /* Split the axis we will tile */ ! if (!E) E |= nrrdAxesSplit(ntmp, ntmp, axSplit, sizeFast, sizeSlow); /* We'll go ahead not and check for errors now as there is a lot of computation before the next nrrd call. */ if (E) { ! sprintf(err, "%s: trouble with initial set-up", me); biffAdd(NRRD, err); ! airMopError(mop); return 1; } *************** *** 1113,1124 **** /* update ax1 and ax2. If the split axis was below ax1 or ax2 we need to increment them */ ! if (axSplit < ax1) ax1++; ! if (axSplit < ax2) ax2++; /******************************************************/ /* Permute the axis. This is the tricky part. */ ! /* This is the index used to write into axis. pindex is set to the next available spot in axis. After writing to it you need to --- 1117,1130 ---- /* update ax1 and ax2. If the split axis was below ax1 or ax2 we need to increment them */ ! if (axSplit < ax1) { ax1++; ! } ! if (axSplit < ax2) { ax2++; + } /******************************************************/ /* Permute the axis. This is the tricky part. */ ! /* This is the index used to write into axis. pindex is set to the next available spot in axis. After writing to it you need to *************** *** 1132,1136 **** /* The idea here is to loop over the input indicies. If the index is one of either ax1 or ax2 copy that index. */ ! for(i = 0; i < temp->dim; i++) { if (i == ax1) { axis[pindex] = i; --- 1138,1142 ---- /* The idea here is to loop over the input indicies. If the index is one of either ax1 or ax2 copy that index. */ ! for (i=0; i<ntmp->dim; i++) { if (i == ax1) { axis[pindex] = i; *************** *** 1156,1167 **** } /* ! for(i = 0; i < temp->dim; i++) { fprintf(stderr, "%s:axis[%d] = %d\n", me, i, axis[i]); } */ ! E = nrrdAxesPermute(nout, temp, axis); ! temp = nrrdNix(temp); ! /* Join the axis */ if (!E) { --- 1162,1172 ---- } /* ! for (i=0; i<ntmp->dim; i++) { fprintf(stderr, "%s:axis[%d] = %d\n", me, i, axis[i]); } */ ! if (!E) E |= nrrdAxesPermute(nout, ntmp, axis); ! /* Join the axis */ if (!E) { *************** *** 1177,1185 **** if (E) { ! sprintf(err, "%s:", me); biffAdd(NRRD, err); return 1; } return 0; } --- 1182,1192 ---- if (E) { ! sprintf(err, "%s: trouble", me); biffAdd(NRRD, err); + airMopError(mop); return 1; } + airMopOkay(mop); return 0; } *************** *** 1194,1203 **** ** nout->axis[axMerge].size == sizeFast*sizeSlow. */ - int nrrdUntile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, int axMerge, int sizeFast, int sizeSlow) { char me[]="nrrdUntile", err[AIR_STRLEN_MED]; int E, axis[NRRD_DIM_MAX], i, pindex, ax1sizeFast, ax2sizeFast; ! Nrrd *temp; if (!(nout && nin)) { --- 1201,1210 ---- ** nout->axis[axMerge].size == sizeFast*sizeSlow. */ int nrrdUntile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, int axMerge, int sizeFast, int sizeSlow) { char me[]="nrrdUntile", err[AIR_STRLEN_MED]; int E, axis[NRRD_DIM_MAX], i, pindex, ax1sizeFast, ax2sizeFast; ! Nrrd *ntmp; ! airArray *mop; if (!(nout && nin)) { *************** *** 1206,1226 **** } /* Check to make sure the values of ax1, ax2, and axMerge are valid. */ ! E = 0; if (ax1 >= nin->dim) { ! sprintf(err, "%s: ax1(%d) needs to be less than the number of dimensions (%d)", me, ax1, nin->dim); biffAdd(NRRD, err); ! E |= 1; } if (ax2 >= nin->dim) { ! sprintf(err, "%s: ax2(%d) needs to be less than the number of dimensions (%d)", me, ax2, nin->dim); biffAdd(NRRD, err); ! E |= 1; } if (axMerge > nin->dim) { ! sprintf(err, "%s: axMerge(%d) needs to be less than the number of dimensions + 1 (%d)", me, axMerge, nin->dim + 1); biffAdd(NRRD, err); ! E |= 1; } - if (E) return 1; /* Check the sizes of sizeFast and sizeSlow divide into ax1 --- 1213,1238 ---- } /* Check to make sure the values of ax1, ax2, and axMerge are valid. */ ! E = AIR_FALSE; if (ax1 >= nin->dim) { ! sprintf(err, "%s: ax1 (%d) needs to be < than # dimensions (%d)", ! me, ax1, nin->dim); biffAdd(NRRD, err); ! E |= AIR_TRUE; } if (ax2 >= nin->dim) { ! sprintf(err, "%s: ax2 (%d) needs to be < than # dimensions (%d)", ! me, ax2, nin->dim); biffAdd(NRRD, err); ! E |= AIR_TRUE; } if (axMerge > nin->dim) { ! sprintf(err, "%s: axMerge (%d) needs to be < than # dimensions + 1 (%d)", ! me, axMerge, nin->dim + 1); biffAdd(NRRD, err); ! E |= AIR_TRUE; ! } ! if (E) { ! return 1; } /* Check the sizes of sizeFast and sizeSlow divide into ax1 *************** *** 1229,1233 **** int ax1size = nin->axis[ax1].size; int ax2size = nin->axis[ax2].size; ! E = 0; ax1sizeFast = ax1size/sizeFast; if (ax1size != (sizeFast*ax1sizeFast)) { --- 1241,1246 ---- int ax1size = nin->axis[ax1].size; int ax2size = nin->axis[ax2].size; ! ! E = AIR_FALSE; ax1sizeFast = ax1size/sizeFast; if (ax1size != (sizeFast*ax1sizeFast)) { *************** *** 1235,1239 **** me, sizeFast, ax1size); biffAdd(NRRD, err); ! E |= 1; } ax2sizeFast = ax2size/sizeSlow; --- 1248,1252 ---- me, sizeFast, ax1size); biffAdd(NRRD, err); ! E |= AIR_TRUE; } ax2sizeFast = ax2size/sizeSlow; *************** *** 1242,1251 **** me, sizeSlow, ax2size); biffAdd(NRRD, err); ! E |= 1; } - if (E) return 1; } - /* ax1 and ax2 must not be equal. */ if (ax1 == ax2) { --- 1255,1265 ---- me, sizeSlow, ax2size); biffAdd(NRRD, err); ! E |= AIR_TRUE; ! } ! if (E) { ! return 1; } } /* ax1 and ax2 must not be equal. */ if (ax1 == ax2) { *************** *** 1255,1275 **** /* Make a shallow copy we can use to change axis information. */ ! temp = nrrdNew(); ! if (!temp) { sprintf(err, "%s: Error allocating temp nrrd", me); biffAdd(NRRD, err); return 1; } ! E = _nrrdCopyShallow(temp, nin); /* Now split the axes. Do the larger one first. */ if (ax1 < ax2) { ! if (!E) E |= nrrdAxesSplit(temp, temp, ax2, ax2sizeFast, sizeSlow); ! if (!E) E |= nrrdAxesSplit(temp, temp, ax1, ax1sizeFast, sizeFast); /* Increment the larger value as it will get shifted by the lower split. */ ax2++; } else { ! if (!E) E |= nrrdAxesSplit(temp, temp, ax1, ax1sizeFast, sizeFast); ! if (!E) E |= nrrdAxesSplit(temp, temp, ax2, ax2sizeFast, sizeSlow); ax1++; } --- 1269,1293 ---- /* Make a shallow copy we can use to change axis information. */ ! ntmp = nrrdNew(); ! if (!ntmp) { sprintf(err, "%s: Error allocating temp nrrd", me); biffAdd(NRRD, err); return 1; } ! mop = airMopNew(); ! airMopAdd(mop, ntmp, (airMopper)nrrdNix, airMopAlways); ! ! E = AIR_FALSE; ! if (!E) E |= _nrrdCopyShallow(ntmp, nin); /* Now split the axes. Do the larger one first. */ if (ax1 < ax2) { ! if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax2, ax2sizeFast, sizeSlow); ! if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax1, ax1sizeFast, sizeFast); /* Increment the larger value as it will get shifted by the lower split. */ ax2++; } else { ! if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax1, ax1sizeFast, sizeFast); ! if (!E) E |= nrrdAxesSplit(ntmp, ntmp, ax2, ax2sizeFast, sizeSlow); ax1++; } *************** *** 1277,1287 **** /* Bail if something went wrong. */ if (E) { ! sprintf(err, "%s:", me); ! biffAdd(NRRD, err); return 1; } /* Now determine the permutation of the axes. */ pindex = 0; ! for(i = 0; i < temp->dim; i++) { if (pindex == axMerge) { /* Insert the permuted axes. */ --- 1295,1305 ---- /* Bail if something went wrong. */ if (E) { ! sprintf(err, "%s: trouble with initial splitting", me); ! biffAdd(NRRD, err); airMopError(mop); return 1; } /* Now determine the permutation of the axes. */ pindex = 0; ! for (i=0; i<ntmp->dim; i++) { if (pindex == axMerge) { /* Insert the permuted axes. */ *************** *** 1298,1308 **** /* ! for(i = 0; i < temp->dim; i++) { fprintf(stderr, "%s:axis[%d] = %d\n", me, i, axis[i]); } */ ! E = nrrdAxesPermute(nout, temp, axis); ! temp = nrrdNix(temp); /* Join the axis */ --- 1316,1327 ---- /* ! for (i=0; i<ntmp->dim; i++) { fprintf(stderr, "%s:axis[%d] = %d\n", me, i, axis[i]); } */ ! E = AIR_FALSE; ! if (!E) E |= nrrdAxesPermute(nout, ntmp, axis); ! ntmp = nrrdNix(ntmp); /* Join the axis */ *************** *** 1310,1316 **** if (E) { ! sprintf(err, "%s:", me); ! biffAdd(NRRD, err); ! return 1; } --- 1329,1334 ---- if (E) { ! sprintf(err, "%s: trouble", me); ! biffAdd(NRRD, err); airMopError(mop); return 1; } |
|
From: Gordon K. <kin...@us...> - 2004-05-25 15:30:44
|
Update of /cvsroot/teem/teem/src/nrrd/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24196/test Modified Files: ax.c Log Message: holdover from airRand conversion Index: ax.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/test/ax.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ax.c 12 May 2004 11:09:21 -0000 1.10 --- ax.c 25 May 2004 15:30:27 -0000 1.11 *************** *** 180,184 **** /* and now for random-ness */ ! airSrand(); nrrd->axis[0].center = nrrdCenterNode; nrrd->axis[0].center = nrrdCenterCell; --- 180,184 ---- /* and now for random-ness */ ! airSrand48(airTime()); nrrd->axis[0].center = nrrdCenterNode; nrrd->axis[0].center = nrrdCenterCell; |
|
From: James B. <bi...@us...> - 2004-05-20 19:12:05
|
Update of /cvsroot/teem/teem/src/unrrdu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15561 Modified Files: tile.c Log Message: Reversed order of commandline options for -a and -s. Index: tile.c =================================================================== RCS file: /cvsroot/teem/teem/src/unrrdu/tile.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tile.c 19 May 2004 19:14:37 -0000 1.1 --- tile.c 20 May 2004 19:11:54 -0000 1.2 *************** *** 36,44 **** airArray *mop; hestOptAdd(&opt, "s", "fast, slow sizes", airTypeInt, 2, 2, size, NULL, "fast and slow axis sizes to produce as result of splitting " "given axis."); - hestOptAdd(&opt, "a", "ax0 ax1 axSplit", airTypeInt, 3, 3, axes, NULL, - "axSplit is divided and merged with ax0 and ax1"); OPT_ADD_NIN(nin, "input nrrd"); OPT_ADD_NOUT(out, "output nrrd"); --- 36,44 ---- airArray *mop; + hestOptAdd(&opt, "a", "ax0 ax1 axSplit", airTypeInt, 3, 3, axes, NULL, + "axSplit is divided and merged with ax0 and ax1"); hestOptAdd(&opt, "s", "fast, slow sizes", airTypeInt, 2, 2, size, NULL, "fast and slow axis sizes to produce as result of splitting " "given axis."); OPT_ADD_NIN(nin, "input nrrd"); OPT_ADD_NOUT(out, "output nrrd"); |
|
From: James B. <bi...@us...> - 2004-05-20 19:11:37
|
Update of /cvsroot/teem/teem/src/unrrdu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15501 Modified Files: unrrdu.h Log Message: Added F(untile) Index: unrrdu.h =================================================================== RCS file: /cvsroot/teem/teem/src/unrrdu/unrrdu.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** unrrdu.h 19 May 2004 19:15:44 -0000 1.28 --- unrrdu.h 20 May 2004 19:11:27 -0000 1.29 *************** *** 120,123 **** --- 120,124 ---- F(axmerge) \ F(tile) \ + F(untile) \ F(histo) \ F(dhisto) \ |
|
From: James B. <bi...@us...> - 2004-05-20 19:11:17
|
Update of /cvsroot/teem/teem/src/unrrdu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15409 Modified Files: GNUmakefile Log Message: Added untile.o Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/teem/src/unrrdu/GNUmakefile,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** GNUmakefile 19 May 2004 19:15:13 -0000 1.23 --- GNUmakefile 20 May 2004 19:11:07 -0000 1.24 *************** *** 58,62 **** lut.o subst.o rmap.o imap.o save.o head.o data.o splice.o inset.o \ axinsert.o axdelete.o axinfo.o ccfind.o ccadj.o ccmerge.o \ ! ccsettle.o about.o axsplit.o axmerge.o mlut.o mrmap.o tile.o #### #### --- 58,62 ---- lut.o subst.o rmap.o imap.o save.o head.o data.o splice.o inset.o \ axinsert.o axdelete.o axinfo.o ccfind.o ccadj.o ccmerge.o \ ! ccsettle.o about.o axsplit.o axmerge.o mlut.o mrmap.o tile.o untile.o #### #### |
|
From: James B. <bi...@us...> - 2004-05-20 19:10:36
|
Update of /cvsroot/teem/teem/src/unrrdu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15230 Added Files: untile.c Log Message: Initial version. --- NEW FILE: untile.c --- /* teem: Gordon Kindlmann's research software Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "unrrdu.h" #include "privateUnrrdu.h" #define INFO "Used to do the inverse of the tile operation" char *_unrrdu_untileInfoL = (INFO ". To untile the data set you split two axes, permute the pieces " "to a new dimenstion. The axes are then merged. The net result " "is a nrrd with one more dimension. To undo the tile operation " "the arguments can be nearly the same. For example, if you tiled " "to a higher axis with tile (i.e. axis 1 to axis 0 and 2), you " "need to subtract 1 from that higher axis on the untile (-a 0 1 1)."); int unrrdu_untileMain(int argc, char **argv, char *me, hestParm *hparm) { hestOpt *opt = NULL; char *out, *err; Nrrd *nin, *nout; int size[2], axes[3], pret; airArray *mop; hestOptAdd(&opt, "a", "ax0 ax1 axSplit", airTypeInt, 3, 3, axes, NULL, "axSplit is divided and merged with ax0 and ax1"); hestOptAdd(&opt, "s", "fast, slow sizes", airTypeInt, 2, 2, size, NULL, "fast and slow axis sizes to produce as result of splitting " "given axis."); OPT_ADD_NIN(nin, "input nrrd"); OPT_ADD_NOUT(out, "output nrrd"); mop = airMopNew(); airMopAdd(mop, opt, (airMopper)hestOptFree, airMopAlways); USAGE(_unrrdu_untileInfoL); PARSE(); airMopAdd(mop, opt, (airMopper)hestParseFree, airMopAlways); nout = nrrdNew(); airMopAdd(mop, nout, (airMopper)nrrdNuke, airMopAlways); if (nrrdUntile(nout, nin, axes[0], axes[1], axes[2], size[0], size[1])) { airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways); fprintf(stderr, "%s: error tiling nrrd:\n%s", me, err); airMopError(mop); return 1; } SAVE(out, nout, NULL); airMopOkay(mop); return 0; } UNRRDU_CMD(untile, INFO); |
|
From: James B. <bi...@us...> - 2004-05-20 19:09:49
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15099 Modified Files: reorder.c Log Message: Implemented nrrdUntile. Index: reorder.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/reorder.c,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** reorder.c 19 May 2004 19:18:26 -0000 1.58 --- reorder.c 20 May 2004 19:09:39 -0000 1.59 *************** *** 1198,1208 **** int axMerge, int sizeFast, int sizeSlow) { char me[]="nrrdUntile", err[AIR_STRLEN_MED]; ! if (!(nout && nin)) { sprintf(err, "%s: got NULL pointer", me); biffAdd(NRRD, err); return 1; } ! nrrdCopy(nout, nin); return 0; --- 1198,1317 ---- int axMerge, int sizeFast, int sizeSlow) { char me[]="nrrdUntile", err[AIR_STRLEN_MED]; ! int E, axis[NRRD_DIM_MAX], i, pindex, ax1sizeFast, ax2sizeFast; ! Nrrd *temp; ! if (!(nout && nin)) { sprintf(err, "%s: got NULL pointer", me); biffAdd(NRRD, err); return 1; } + /* Check to make sure the values of ax1, ax2, and axMerge are valid. */ + E = 0; + if (ax1 >= nin->dim) { + sprintf(err, "%s: ax1(%d) needs to be less than the number of dimensions (%d)", me, ax1, nin->dim); + biffAdd(NRRD, err); + E |= 1; + } + if (ax2 >= nin->dim) { + sprintf(err, "%s: ax2(%d) needs to be less than the number of dimensions (%d)", me, ax2, nin->dim); + biffAdd(NRRD, err); + E |= 1; + } + if (axMerge > nin->dim) { + sprintf(err, "%s: axMerge(%d) needs to be less than the number of dimensions + 1 (%d)", me, axMerge, nin->dim + 1); + biffAdd(NRRD, err); + E |= 1; + } + if (E) return 1; + + /* Check the sizes of sizeFast and sizeSlow divide into ax1 + and ax2 evenly. */ + { + int ax1size = nin->axis[ax1].size; + int ax2size = nin->axis[ax2].size; + E = 0; + ax1sizeFast = ax1size/sizeFast; + if (ax1size != (sizeFast*ax1sizeFast)) { + sprintf(err, "%s: sizeFast(%d) is not a multiple of ax1.size(%d)", + me, sizeFast, ax1size); + biffAdd(NRRD, err); + E |= 1; + } + ax2sizeFast = ax2size/sizeSlow; + if (ax2size != (ax2sizeFast*sizeSlow)) { + sprintf(err, "%s: sizeSlow(%d) is not a multiple of ax2.size(%d)", + me, sizeSlow, ax2size); + biffAdd(NRRD, err); + E |= 1; + } + if (E) return 1; + } + + + /* ax1 and ax2 must not be equal. */ + if (ax1 == ax2) { + sprintf(err, "%s: ax1 and ax2 must not be equal (%d)", me, ax1); + biffAdd(NRRD, err); return 1; + } ! /* Make a shallow copy we can use to change axis information. */ ! temp = nrrdNew(); ! if (!temp) { ! sprintf(err, "%s: Error allocating temp nrrd", me); ! biffAdd(NRRD, err); return 1; ! } ! E = _nrrdCopyShallow(temp, nin); ! ! /* Now split the axes. Do the larger one first. */ ! if (ax1 < ax2) { ! if (!E) E |= nrrdAxesSplit(temp, temp, ax2, ax2sizeFast, sizeSlow); ! if (!E) E |= nrrdAxesSplit(temp, temp, ax1, ax1sizeFast, sizeFast); ! /* Increment the larger value as it will get shifted by the lower ! split. */ ! ax2++; ! } else { ! if (!E) E |= nrrdAxesSplit(temp, temp, ax1, ax1sizeFast, sizeFast); ! if (!E) E |= nrrdAxesSplit(temp, temp, ax2, ax2sizeFast, sizeSlow); ! ax1++; ! } ! ! /* Bail if something went wrong. */ ! if (E) { ! sprintf(err, "%s:", me); ! biffAdd(NRRD, err); return 1; ! } ! ! /* Now determine the permutation of the axes. */ ! pindex = 0; ! for(i = 0; i < temp->dim; i++) { ! if (pindex == axMerge) { ! /* Insert the permuted axes. */ ! axis[pindex++] = ax1+1; ! axis[pindex++] = ax2+1; ! } ! if (i == ax1+1 || i == ax2+1) { ! /* Ignore the axes which will be permuted */ ! } else { ! /* Copy the index */ ! axis[pindex++] = i; ! } ! } ! ! /* ! for(i = 0; i < temp->dim; i++) { ! fprintf(stderr, "%s:axis[%d] = %d\n", me, i, axis[i]); ! } ! */ ! ! E = nrrdAxesPermute(nout, temp, axis); ! temp = nrrdNix(temp); ! ! /* Join the axis */ ! if (!E) E |= nrrdAxesMerge(nout, nout, axMerge); ! ! if (E) { ! sprintf(err, "%s:", me); ! biffAdd(NRRD, err); ! return 1; ! } return 0; |
|
From: James B. <bi...@us...> - 2004-05-19 19:23:36
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13841 Modified Files: methodsNrrd.c Log Message: Added _nrrdCopyShallow. In nrrdCopy also copy type, dim and axes sizes when copying the data. Index: methodsNrrd.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/methodsNrrd.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** methodsNrrd.c 13 Mar 2004 20:03:10 -0000 1.40 --- methodsNrrd.c 19 May 2004 19:23:25 -0000 1.41 *************** *** 440,443 **** --- 440,496 ---- /* + ******** _nrrdCopyShallow + ** + ** Similar to nrrdCopy, but the data itself is not copied. nout->data + ** and nout->data will share a pointer to the data. This should be + ** used with extreem caution, because there is no pointer magic to + ** make sure the data is not freed twice. + */ + int + _nrrdCopyShallow (Nrrd *nout, const Nrrd *nin) { + char me[]="_nrrdCopyShallow", err[AIR_STRLEN_MED]; + Nrrd *ntmp; + + if (!(nin && nout)) { + sprintf(err, "%s: got NULL pointer", me); + biffAdd(NRRD, err); return 1; + } + + /* Don't use nrrdNew as this allocates axillary data that is + annoying to delete. We don't need to anyway since we will simply + copy over the pointers later with the memcpy. */ + ntmp = (Nrrd*)(calloc(1, sizeof(Nrrd))); + if (!ntmp) { + sprintf(err, "%s: error allocating temporary nrrd.", me); + biffAdd(NRRD, err); return 1; + } + /* Shallow copy the contents of the nrrd. It's OK if this is not a + deep copy (i.e. all the axis info), because nrrdCopy will do this + for us. This is only to facilitate setting the data pointer to + NULL which will cause nrrdCopy to not copy the data. */ + memcpy(ntmp, nin, sizeof(Nrrd)); + + /* Setting this to 0 will cause nrrdCopy to not copy the data */ + ntmp->data = 0; + + if (nrrdCopy(nout, ntmp)) { + sprintf(err, "%s:", me); + biffAdd(NRRD, err); + /* Since we should never have copied the data, we want to make sure + that we don't delete it here. */ + free(ntmp); + return 1; + } + + /* Share the data pointer */ + nout->data = nin->data; + + /* Clean up */ + free(ntmp); + + return 0; + } + + /* ******** nrrdCopy ** *************** *** 478,481 **** --- 531,541 ---- /* someone is trying to copy structs without data, fine fine fine */ nout->data = NULL; + /* We need to make sure to copy important stuff like type, dim, + and sizes, as this information is not copied elsewhere. The + data copying version sets these in nrrdAlloc_nva (which is + called by nrrdMaybeAlloc_nva). */ + nout->type = nin->type; + nout->dim = nin->dim; + nrrdAxisInfoSet_nva(nout, nrrdAxisInfoSize, size); } nrrdAxisInfoCopy(nout, nin, NULL, NRRD_AXIS_INFO_NONE); |
|
From: James B. <bi...@us...> - 2004-05-19 19:20:21
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13156 Modified Files: privateNrrd.h Log Message: Added _nrrdCopyShallow Index: privateNrrd.h =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/privateNrrd.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** privateNrrd.h 30 Mar 2004 19:25:09 -0000 1.31 --- privateNrrd.h 19 May 2004 19:20:08 -0000 1.32 *************** *** 145,148 **** --- 145,149 ---- extern int _nrrdSizeCheck(int dim, const int *size, int useBiff); extern void _nrrdTraverse(Nrrd *nrrd); + extern int _nrrdCopyShallow (Nrrd *nout, const Nrrd *nin); #if TEEM_ZLIB |
|
From: James B. <bi...@us...> - 2004-05-19 19:19:18
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13080 Modified Files: nrrd.h Log Message: Added nrrdTile and nrrdUntile. Index: nrrd.h =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/nrrd.h,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** nrrd.h 4 Apr 2004 21:26:11 -0000 1.138 --- nrrd.h 19 May 2004 19:19:02 -0000 1.139 *************** *** 666,669 **** --- 666,673 ---- TEEM_API int nrrdBlock(Nrrd *nout, const Nrrd *nin); TEEM_API int nrrdUnblock(Nrrd *nout, const Nrrd *nin, int type); + TEEM_API int nrrdTile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, + int axSplit, int sizeFast, int sizeSlow); + TEEM_API int nrrdUntile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, + int axMerge, int sizeFast, int sizeSlow); /******** things useful with hest */ |
|
From: James B. <bi...@us...> - 2004-05-19 19:18:35
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13001 Modified Files: reorder.c Log Message: Added nrrdTile and nrrdUntile. nrrdUntile is only a stub for now. Fixed off by one error in nrrdAxesMerge. Index: reorder.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/reorder.c,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** reorder.c 30 Mar 2004 19:25:09 -0000 1.57 --- reorder.c 19 May 2004 19:18:26 -0000 1.58 *************** *** 807,811 **** sizeSlow = nin->axis[ax+1].size; nout->dim = nin->dim - 1; ! for (d=ax+1; d<=nin->dim-2; d++) { _nrrdAxisInfoCopy(&(nout->axis[d]), &(nin->axis[d+1]), NRRD_AXIS_INFO_NONE); --- 807,811 ---- sizeSlow = nin->axis[ax+1].size; nout->dim = nin->dim - 1; ! for (d=ax+1; d<nout->dim; d++) { _nrrdAxisInfoCopy(&(nout->axis[d]), &(nin->axis[d+1]), NRRD_AXIS_INFO_NONE); *************** *** 1053,1065 **** will require that # slices be <= number of images: won't crop for you, ! but will happy pad with black ! pick which axis to slice along ! pick which two axis (in order) will be tiled into ! then write nrrdUntile ! */ /* ---- END non-NrrdIO */ --- 1053,1211 ---- will require that # slices be <= number of images: won't crop for you, ! but will happy pad with black. This will be handled in another ! function. Probably unu tile. ! */ ! /* ! ******** nrrdTile() ! ** ! ** Splits axis axSplit into two pieces of size sizeFast and sizeSlow. ! ** The data from the fast partition is juxtaposed following ax1, the ! ** slow after ax2. nrrdAxesMerge is then called to join ax1 and ax2 ! ** with their respective newly permuted data. There should be one ! ** fewer dimensions in the output nrrd than in the input nrrd. ! */ ! int ! nrrdTile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, ! int axSplit, int sizeFast, int sizeSlow) { ! char me[]="nrrdTile", err[AIR_STRLEN_MED]; ! Nrrd *temp; ! int E, axis[NRRD_DIM_MAX], i, pindex, ax1merge, ax2merge; ! if (!(nout && nin)) { ! sprintf(err, "%s: got NULL pointer", me); ! biffAdd(NRRD, err); return 1; ! } ! ! /* I'm not sure how to handle if ax2 == ax1. I think for now, I ! will prohibit it as it doesn't make sense to tile to the same ! axis. */ ! if (ax1 == ax2) { ! sprintf(err, "%s: ax1(%d) cannot equal ax2(%d)", me, ax1, ax2); ! biffAdd(NRRD, err); return 1; ! } ! ! /* This is the temporary nrrd used for intermediate values. */ ! temp = nrrdNew(); ! if (!temp) { ! sprintf(err, "%s: failed to allocate temporary nrrd", me); ! biffAdd(NRRD, err); ! return 1; ! } ! /* Use _nrrdCopyShallow to just copy the header information without ! copying the data. */ ! E = _nrrdCopyShallow(temp, nin); ! ! /* Split the axis we will tile */ ! if (!E) E |= nrrdAxesSplit(temp, temp, axSplit, sizeFast, sizeSlow); ! ! /* We'll go ahead not and check for errors now as there is a lot of ! computation before the next nrrd call. */ ! if (E) { ! sprintf(err, "%s:", me); ! biffAdd(NRRD, err); ! nrrdNix(temp); ! return 1; ! } ! ! /* update ax1 and ax2. If the split axis was below ax1 or ax2 we ! need to increment them */ ! if (axSplit < ax1) ! ax1++; ! if (axSplit < ax2) ! ax2++; ! ! /******************************************************/ ! /* Permute the axis. This is the tricky part. */ ! ! /* This is the index used to write into axis. pindex is set to the ! next available spot in axis. After writing to it you need to ! increment it. */ ! pindex = 0; ! /* These are place holders for which axis needs merging. These are ! the indicies where ax1 and ax2 are placed into axis. For now ! initialize these to -1 to make sure they get set. */ ! ax1merge = -1; ! ax2merge = -1; ! /* The idea here is to loop over the input indicies. If the index ! is one of either ax1 or ax2 copy that index. */ ! for(i = 0; i < temp->dim; i++) { ! if (i == ax1) { ! axis[pindex] = i; ! /* Cache this position for merging later */ ! ax1merge = pindex; ! pindex++; ! /* Set the next axis to the fast part of our split axis */ ! axis[pindex] = axSplit; ! pindex++; ! } else if (i == ax2) { ! axis[pindex] = i; ! ax2merge = pindex; ! pindex++; ! axis[pindex] = axSplit+1; ! pindex++; ! } else if (i == axSplit || i == axSplit+1) { ! /* Ignore these as they will get incorporated above. Do not ! increment pindex. */ ! } else { ! axis[pindex] = i; ! pindex++; ! } ! } ! /* ! for(i = 0; i < temp->dim; i++) { ! fprintf(stderr, "%s:axis[%d] = %d\n", me, i, axis[i]); ! } ! */ + E = nrrdAxesPermute(nout, temp, axis); + temp = nrrdNix(temp); + + /* Join the axis */ + if (!E) { + /* It's easier for bookkeeping if we merge the slower axis first. */ + if (ax1merge > ax2merge) { + int axSwap = ax1merge; + ax1merge = ax2merge; + ax2merge = axSwap; + } + E |= nrrdAxesMerge(nout, nout, ax2merge); + } + if (!E) E |= nrrdAxesMerge(nout, nout, ax1merge); + + if (E) { + sprintf(err, "%s:", me); + biffAdd(NRRD, err); + return 1; + } + + return 0; + } + + /* + ******** nrrdUntile() + ** + ** This will split ax1 into nin->axis[ax1].size/sizeFast and sizeFast + ** sizes. ax2 will then be split into nin->axis[ax2].size/sizeSlow + ** and sizeSlow sizes. The axes corresponding to sizeFast and + ** sizeSlow will be permuted and merged such that + ** nout->axis[axMerge].size == sizeFast*sizeSlow. + */ + + int nrrdUntile(Nrrd *nout, const Nrrd *nin, int ax1, int ax2, + int axMerge, int sizeFast, int sizeSlow) { + char me[]="nrrdUntile", err[AIR_STRLEN_MED]; + + if (!(nout && nin)) { + sprintf(err, "%s: got NULL pointer", me); + biffAdd(NRRD, err); return 1; + } + + nrrdCopy(nout, nin); + + return 0; + } + /* ---- END non-NrrdIO */ |
|
From: James B. <bi...@us...> - 2004-05-19 19:15:53
|
Update of /cvsroot/teem/teem/src/unrrdu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12413 Modified Files: unrrdu.h Log Message: Added F(tile). Index: unrrdu.h =================================================================== RCS file: /cvsroot/teem/teem/src/unrrdu/unrrdu.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** unrrdu.h 4 Apr 2004 21:21:06 -0000 1.27 --- unrrdu.h 19 May 2004 19:15:44 -0000 1.28 *************** *** 119,122 **** --- 119,123 ---- F(axdelete) \ F(axmerge) \ + F(tile) \ F(histo) \ F(dhisto) \ |
|
From: James B. <bi...@us...> - 2004-05-19 19:15:25
|
Update of /cvsroot/teem/teem/src/unrrdu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12311 Modified Files: GNUmakefile Log Message: Added tile.o Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/teem/src/unrrdu/GNUmakefile,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** GNUmakefile 4 Apr 2004 21:21:06 -0000 1.22 --- GNUmakefile 19 May 2004 19:15:13 -0000 1.23 *************** *** 58,62 **** lut.o subst.o rmap.o imap.o save.o head.o data.o splice.o inset.o \ axinsert.o axdelete.o axinfo.o ccfind.o ccadj.o ccmerge.o \ ! ccsettle.o about.o axsplit.o axmerge.o mlut.o mrmap.o #### #### --- 58,62 ---- lut.o subst.o rmap.o imap.o save.o head.o data.o splice.o inset.o \ axinsert.o axdelete.o axinfo.o ccfind.o ccadj.o ccmerge.o \ ! ccsettle.o about.o axsplit.o axmerge.o mlut.o mrmap.o tile.o #### #### |
|
From: James B. <bi...@us...> - 2004-05-19 19:14:46
|
Update of /cvsroot/teem/teem/src/unrrdu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12126 Added Files: tile.c Log Message: Initial version --- NEW FILE: tile.c --- /* teem: Gordon Kindlmann's research software Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "unrrdu.h" #include "privateUnrrdu.h" #define INFO "Used to tile one axis agaist two others" char *_unrrdu_tileInfoL = (INFO ". To tile the data set you split one axis, permute the pieces " "against two others. The axes are then merged. The net result " "is a nrrd with one fewer dimension with a tiled look."); int unrrdu_tileMain(int argc, char **argv, char *me, hestParm *hparm) { hestOpt *opt = NULL; char *out, *err; Nrrd *nin, *nout; int size[2], axes[3], pret; airArray *mop; hestOptAdd(&opt, "s", "fast, slow sizes", airTypeInt, 2, 2, size, NULL, "fast and slow axis sizes to produce as result of splitting " "given axis."); hestOptAdd(&opt, "a", "ax0 ax1 axSplit", airTypeInt, 3, 3, axes, NULL, "axSplit is divided and merged with ax0 and ax1"); OPT_ADD_NIN(nin, "input nrrd"); OPT_ADD_NOUT(out, "output nrrd"); mop = airMopNew(); airMopAdd(mop, opt, (airMopper)hestOptFree, airMopAlways); USAGE(_unrrdu_tileInfoL); PARSE(); airMopAdd(mop, opt, (airMopper)hestParseFree, airMopAlways); nout = nrrdNew(); airMopAdd(mop, nout, (airMopper)nrrdNuke, airMopAlways); if (nrrdTile(nout, nin, axes[0], axes[1], axes[2], size[0], size[1])) { airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways); fprintf(stderr, "%s: error tiling nrrd:\n%s", me, err); airMopError(mop); return 1; } SAVE(out, nout, NULL); airMopOkay(mop); return 0; } UNRRDU_CMD(tile, INFO); |