From: <kin...@us...> - 2013-07-27 06:52:22
|
Revision: 5994 http://sourceforge.net/p/teem/code/5994 Author: kindlmann Date: 2013-07-27 06:52:20 +0000 (Sat, 27 Jul 2013) Log Message: ----------- change in _pullVolumeCopy required by need to propogate pullFlagZeroZ to all volumes Modified Paths: -------------- teem/trunk/src/pull/privatePull.h teem/trunk/src/pull/taskPull.c teem/trunk/src/pull/volumePull.c Modified: teem/trunk/src/pull/privatePull.h =================================================================== --- teem/trunk/src/pull/privatePull.h 2013-07-27 06:50:46 UTC (rev 5993) +++ teem/trunk/src/pull/privatePull.h 2013-07-27 06:52:20 UTC (rev 5994) @@ -106,7 +106,8 @@ extern void _pullFlagInit(pullFlag *flag); /* volumePull.c */ -extern pullVolume *_pullVolumeCopy(const pullVolume *pvol); +extern pullVolume *_pullVolumeCopy(const pullContext *pctx, + const pullVolume *pvol); extern int _pullVolumeSetup(pullContext *pctx); extern int _pullInsideBBox(pullContext *pctx, double pos[4]); extern unsigned int _pullVolumeIndex(const pullContext *pctx, Modified: teem/trunk/src/pull/taskPull.c =================================================================== --- teem/trunk/src/pull/taskPull.c 2013-07-27 06:50:46 UTC (rev 5993) +++ teem/trunk/src/pull/taskPull.c 2013-07-27 06:52:20 UTC (rev 5994) @@ -39,7 +39,7 @@ task->pctx = pctx; for (ii=0; ii<pctx->volNum; ii++) { - if (!(task->vol[ii] = _pullVolumeCopy(pctx->vol[ii]))) { + if (!(task->vol[ii] = _pullVolumeCopy(pctx, pctx->vol[ii]))) { biffAddf(PULL, "%s: trouble copying vol %u/%u", me, ii, pctx->volNum); return NULL; } Modified: teem/trunk/src/pull/volumePull.c =================================================================== --- teem/trunk/src/pull/volumePull.c 2013-07-27 06:50:46 UTC (rev 5993) +++ teem/trunk/src/pull/volumePull.c 2013-07-27 06:52:20 UTC (rev 5994) @@ -79,13 +79,15 @@ ** used to set all the fields of pullVolume at once, including the ** gageContext inside the pullVolume ** +** OLD description ... ** used both for top-level volumes in the pullContext (pctx->vol[i]) ** in which case pctx is non-NULL, ** and for the per-task volumes (task->vol[i]), ** in which case pctx is NULL +** ................... */ int -_pullVolumeSet(pullContext *pctx, pullVolume *vol, +_pullVolumeSet(const pullContext *pctx, int taskCopy, pullVolume *vol, const gageKind *kind, int verbose, const char *name, const Nrrd *ninSingle, @@ -110,7 +112,7 @@ biffAddf(PULL, "%s: needed non-NULL ninSingle", me); return 1; } - if (pctx) { + if (!taskCopy) { for (vi=0; vi<pctx->volNum; vi++) { if (pctx->vol[vi] == vol) { biffAddf(PULL, "%s: already got vol %p as vol[%u]", me, @@ -147,6 +149,7 @@ vol->scaleDerivNormBias = scaleDerivNormBias; gageParmSet(vol->gctx, gageParmStackNormalizeDerivBias, scaleDerivNormBias); + gageParmSet(vol->gctx, gageParmTwoDimZeroZ, pctx->flag.zeroZ); gageParmSet(vol->gctx, gageParmCheckIntegrals, AIR_TRUE); E = 0; if (!E) E |= gageKernelSet(vol->gctx, gageKernel00, @@ -238,7 +241,7 @@ pullVolume *vol; vol = pullVolumeNew(); - if (_pullVolumeSet(pctx, vol, kind, + if (_pullVolumeSet(pctx, AIR_FALSE /* taskCopy */, vol, kind, pctx->verbose, name, nin, NULL, NULL, 0, AIR_FALSE, 0.0, @@ -278,7 +281,8 @@ pullVolume *vol; vol = pullVolumeNew(); - if (_pullVolumeSet(pctx, vol, kind, pctx->verbose, name, + if (_pullVolumeSet(pctx, AIR_FALSE /* taskCopy */, vol, kind, + pctx->verbose, name, nin, ninSS, scalePos, ninNum, scaleDerivNorm, scaleDerivNormBias, @@ -298,12 +302,12 @@ ** DOES use biff */ pullVolume * -_pullVolumeCopy(const pullVolume *volOrig) { +_pullVolumeCopy(const pullContext *pctx, const pullVolume *volOrig) { static const char me[]="pullVolumeCopy"; pullVolume *volNew; volNew = pullVolumeNew(); - if (_pullVolumeSet(NULL, volNew, volOrig->kind, + if (_pullVolumeSet(pctx, AIR_TRUE /* taskCopy */, volNew, volOrig->kind, volOrig->verbose, volOrig->name, volOrig->ninSingle, volOrig->ninScale, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |