From: <kin...@us...> - 2009-11-13 22:51:10
|
Revision: 4375 http://teem.svn.sourceforge.net/teem/?rev=4375&view=rev Author: kindlmann Date: 2009-11-13 22:51:03 +0000 (Fri, 13 Nov 2009) Log Message: ----------- gageStack stuff changed, and biff rewrite: _f -> _va and new biffMove_va Modified Paths: -------------- teem/trunk/src/bin/gprobe.c teem/trunk/src/bin/mrender.c teem/trunk/src/bin/ninspect.c teem/trunk/src/bin/pprobe.c teem/trunk/src/bin/qbert.c teem/trunk/src/bin/talkweb.c teem/trunk/src/bin/vprobe.c Modified: teem/trunk/src/bin/gprobe.c =================================================================== --- teem/trunk/src/bin/gprobe.c 2009-11-13 22:49:44 UTC (rev 4374) +++ teem/trunk/src/bin/gprobe.c 2009-11-13 22:51:03 UTC (rev 4375) @@ -88,7 +88,7 @@ airMopAdd(mop, ngrid, (airMopper)nrrdNuke, airMopAlways); if (ctx->stackPos) { if (nrrdConvert(ngrid, _ngrid, nrrdTypeDouble)) { - biffMovef(GAGE, NRRD, "%s: trouble converting ngrid", me); + biffMove_va(GAGE, NRRD, "%s: trouble converting ngrid", me); airMopError(mop); return 1; } } else { @@ -101,7 +101,7 @@ airMopAdd(mop, ntmp, (airMopper)nrrdNuke, airMopAlways); if (nrrdConvert(ntmp, _ngrid, nrrdTypeDouble) || nrrdPad_nva(ngrid, ntmp, minIdx, maxIdx, nrrdBoundaryPad, 0.0)) { - biffMovef(GAGE, NRRD, "%s: trouble converting/padding ngrid", me); + biffMove_va(GAGE, NRRD, "%s: trouble converting/padding ngrid", me); airMopError(mop); return 1; } } @@ -132,7 +132,7 @@ coordOut[aidx + baseDim] = 0; } if (nrrdMaybeAlloc_nva(nout, typeOut, dim, sizeOut)) { - biffMovef(GAGE, NRRD, "%s: couldn't allocate output", me); + biffMove_va(GAGE, NRRD, "%s: couldn't allocate output", me); airMopError(mop); return 1; } ins = nrrdDInsert[nout->type]; @@ -377,6 +377,7 @@ /* for setting up pre-blurred scale-space samples */ if (numSS) { +#if 0 unsigned int vi; int recompute; @@ -408,6 +409,7 @@ airMopError(mop); return 1; } } +#endif } else { ninSS = NULL; scalePosSS = NULL; Modified: teem/trunk/src/bin/mrender.c =================================================================== --- teem/trunk/src/bin/mrender.c 2009-11-13 22:49:44 UTC (rev 4374) +++ teem/trunk/src/bin/mrender.c 2009-11-13 22:51:03 UTC (rev 4375) @@ -184,7 +184,7 @@ if (!E) E |= gageQueryItemOn(uu->gctx0, pvl, uu->whatq); if (!E) E |= gageUpdate(uu->gctx0); if (E) { - biffMovef(MREND, GAGE, "%s: gage trouble", me); + biffMove_va(MREND, GAGE, "%s: gage trouble", me); return 1; } fprintf(stderr, "%s: kernel support = %d^3 samples\n", me, @@ -193,7 +193,7 @@ if (nrrdMaybeAlloc_va((*rrP)->nout=nrrdNew(), nrrdTypeDouble, 2, AIR_CAST(size_t, uu->hctx->imgSize[0]), AIR_CAST(size_t, uu->hctx->imgSize[1]))) { - biffMovef(MREND, NRRD, "%s: nrrd trouble", me); + biffMove_va(MREND, NRRD, "%s: nrrd trouble", me); return 1; } (*rrP)->nout->axis[0].min = uu->hctx->cam->uRange[0]; @@ -231,7 +231,7 @@ fprintf(stderr, "%s: sampling rate = %g KHz\n", me, rr->totalSamples/(1000.0*(rr->time1 - rr->time0))); if (nrrdSave(uu->outS, rr->nout, NULL)) { - biffMovef(MREND, NRRD, "%s: trouble saving image", me); + biffMove_va(MREND, NRRD, "%s: trouble saving image", me); return 1; } Modified: teem/trunk/src/bin/ninspect.c =================================================================== --- teem/trunk/src/bin/ninspect.c 2009-11-13 22:49:44 UTC (rev 4374) +++ teem/trunk/src/bin/ninspect.c 2009-11-13 22:51:03 UTC (rev 4375) @@ -75,7 +75,7 @@ } } if (E) { - biffMovef(NINSPECT, NRRD, "%s: trouble with nrrd operations", me); + biffMove_va(NINSPECT, NRRD, "%s: trouble with nrrd operations", me); airMopError(mop); return 1; } E = 0; @@ -98,10 +98,10 @@ if (!E) E |= nrrdCopy(ntmp[1], nt); } if (E) { - biffMovef(NINSPECT, NRRD, "%s: trouble with nrrd operations", me); + biffMove_va(NINSPECT, NRRD, "%s: trouble with nrrd operations", me); airMopError(mop); return 1; } - + for (ii=0; ii<3; ii++) { sz[ii] = nvol->axis[map[ii]].size; sp[ii] = ELL_3V_LEN(nvol->axis[map[ii]].spaceDirection); @@ -167,10 +167,10 @@ || nrrdProject(ntmpA, nin, axis, nrrdMeasureMax, nrrdTypeDefault) || nrrdQuantize(nrgb[2], ntmpA, NULL, 8) || nrrdJoin(nout, (const Nrrd**)nrgb, 3, 0, AIR_TRUE)) { - biffMovef(NINSPECT, NRRD, "%s: trouble with nrrd operations", me); + biffMove_va(NINSPECT, NRRD, "%s: trouble with nrrd operations", me); airMopError(mop); return 1; } - + airMopOkay(mop); return 0; } @@ -232,10 +232,10 @@ AIR_CAST(size_t, 3), AIR_CAST(size_t, srl + 3*margin + sap), AIR_CAST(size_t, ssi + 3*margin + sap))) { - biffMovef(NINSPECT, NRRD, "%s: couldn't allocate output", me); + biffMove_va(NINSPECT, NRRD, "%s: couldn't allocate output", me); airMopError(mop); return 1; } - + min[0] = 0; E = 0; which = 0; Modified: teem/trunk/src/bin/pprobe.c =================================================================== --- teem/trunk/src/bin/pprobe.c 2009-11-13 22:49:44 UTC (rev 4374) +++ teem/trunk/src/bin/pprobe.c 2009-11-13 22:51:03 UTC (rev 4375) @@ -212,10 +212,11 @@ /* for setting up pre-blurred scale-space samples */ if (numSS) { - unsigned int vi; + gageStackBlurParm *sbp; + sbp = gageStackBlurParmNew(); + airMopAdd(mop, sbp, (airMopper)gageStackBlurParmNix, airMopAlways); ninSS = AIR_CAST(Nrrd **, calloc(numSS, sizeof(Nrrd *))); - scalePos = AIR_CAST(double *, calloc(numSS, sizeof(double))); - if (!(ninSS && scalePos)) { + if (!ninSS) { fprintf(stderr, "%s: couldn't allocate ninSS", me); airMopError(mop); return 1; } @@ -223,30 +224,11 @@ ninSS[ninSSIdx] = nrrdNew(); airMopAdd(mop, ninSS[ninSSIdx], (airMopper)nrrdNuke, airMopAlways); } - if (SSuniform) { - for (vi=0; vi<numSS; vi++) { - scalePos[vi] = AIR_AFFINE(0, vi, numSS-1, rangeSS[0], rangeSS[1]); - } - } else { - double rangeTau[2], tau; - rangeTau[0] = gageTauOfSig(rangeSS[0]); - rangeTau[1] = gageTauOfSig(rangeSS[1]); - for (vi=0; vi<numSS; vi++) { - tau = AIR_AFFINE(0, vi, numSS-1, rangeTau[0], rangeTau[1]); - scalePos[vi] = gageSigOfTau(tau); - } - } - if (verbose > 2) { - fprintf(stderr, "%s: sampling scale range %g--%g %suniformly:\n", me, - rangeSS[0], rangeSS[1], SSuniform ? "" : "non-"); - for (vi=0; vi<numSS; vi++) { - fprintf(stderr, " scalePos[%u] = %g\n", vi, scalePos[vi]); - } - } - if (gageStackBlur(ninSS, scalePos, numSS, AIR_FALSE, - nin, kind, kSSblur, - nrrdBoundaryBleed, AIR_TRUE, - verbose)) { + if (gageStackBlurParmScaleSet(sbp, numSS, rangeSS[0], rangeSS[1], + SSuniform, AIR_FALSE) + || gageStackBlurParmKernelSet(sbp, kSSblur, nrrdBoundaryBleed, + AIR_TRUE, verbose) + || gageStackBlur(ninSS, sbp, nin, kind)) { airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways); fprintf(stderr, "%s: trouble pre-computing blurrings:\n%s\n", me, err); airMopError(mop); return 1; Modified: teem/trunk/src/bin/qbert.c =================================================================== --- teem/trunk/src/bin/qbert.c 2009-11-13 22:49:44 UTC (rev 4374) +++ teem/trunk/src/bin/qbert.c 2009-11-13 22:51:03 UTC (rev 4375) @@ -40,7 +40,7 @@ int qbertSizeUp(Nrrd *nout, Nrrd *nin, unsigned int *sz, NrrdKernelSpec *uk) { - char me[]="qbertSizeUp", err[BIFF_STRLEN]; + char me[]="qbertSizeUp"; int i, anyneed, need; ptrdiff_t padMin[3], padMax[3]; NrrdResampleInfo *rsi; @@ -81,8 +81,8 @@ rsi->clamp = AIR_TRUE; fprintf(stderr, "%s: resampling ... ", me); fflush(stderr); if (nrrdSpatialResample(nout, nin, rsi)) { - sprintf(err, "%s: trouble upsampling", me); - biffMove(QBERT, err, NRRD); airMopError(mop); return 1; + biffMove_va(QBERT, NRRD, "%s: trouble upsampling", me); + airMopError(mop); return 1; } fprintf(stderr, "done\n"); } @@ -102,16 +102,16 @@ if (anyneed) { fprintf(stderr, "%s: padding ... ", me); fflush(stderr); if (nrrdPad_va(nout, nin, padMin, padMax, nrrdBoundaryPad, 0.0)) { - sprintf(err, "%s: trouble padding", me); - biffMove(QBERT, err, NRRD); airMopError(mop); return 1; + biffMove_va(QBERT, NRRD, "%s: trouble padding", me); + airMopError(mop); return 1; } fprintf(stderr, "done\n"); } } if (!anyneed) { if (nrrdCopy(nout, nin)) { - sprintf(err, "%s: trouble copying", me); - biffMove(QBERT, err, NRRD); airMopError(mop); return 1; + biffMove_va(QBERT, NRRD, "%s: trouble copying", me); + airMopError(mop); return 1; } } if (qbertSaveAll) { @@ -128,7 +128,7 @@ int qbertSizeDown(Nrrd *nout, Nrrd *nin, unsigned int *sz, NrrdKernelSpec *dk) { - char me[]="qbertSizeDown", err[BIFF_STRLEN]; + char me[]="qbertSizeDown"; NrrdResampleInfo *rsi; int need; unsigned int i; @@ -167,15 +167,15 @@ if (need) { fprintf(stderr, "%s: resampling ... ", me); fflush(stderr); if (nrrdSpatialResample(nout, nin, rsi)) { - sprintf(err, "%s: trouble resampling", me); - biffMove(QBERT, err, NRRD); airMopError(mop); return 1; + biffMove_va(QBERT, NRRD, "%s: trouble resampling", me); + airMopError(mop); return 1; } fprintf(stderr, "done\n"); } else { if (nrrdCopy(nout, nin)) { - sprintf(err, "%s: trouble copying", me); - biffMove(QBERT, err, NRRD); airMopError(mop); return 1; + biffMove_va(QBERT, NRRD, "%s: trouble copying", me); + airMopError(mop); return 1; } } if (qbertSaveAll) { @@ -194,7 +194,7 @@ qbertProbe(Nrrd *nout, Nrrd *nin, NrrdKernelSpec *k00, NrrdKernelSpec *k11, NrrdKernelSpec *k22, int doH, unsigned int *sz) { - char me[]="qbertProbe", err[BIFF_STRLEN], prog[AIR_STRLEN_SMALL]; + char me[]="qbertProbe", prog[AIR_STRLEN_SMALL]; gageContext *ctx; gagePerVolume *pvl; const double *val, *gmag, *scnd; @@ -212,8 +212,8 @@ nin->axis[1].center = nrrdCenterNode; nin->axis[2].center = nrrdCenterNode; if (!(pvl = gagePerVolumeNew(ctx, nin, gageKindScl))) { - sprintf(err, "%s: gage trouble", me); - biffMove(QBERT, err, GAGE); airMopError(mop); return 1; + biffMove_va(QBERT, GAGE, "%s: gage trouble", me); + airMopError(mop); return 1; } gageParmSet(ctx, gageParmVerbose, 0); gageParmSet(ctx, gageParmRenormalize, AIR_TRUE); @@ -234,8 +234,8 @@ } if (!E) E |= gageUpdate(ctx); if (E) { - sprintf(err, "%s: gage trouble", me); - biffMove(QBERT, err, GAGE); airMopError(mop); return 1; + biffMove_va(QBERT, GAGE, "%s: gage trouble", me); + airMopError(mop); return 1; } gageParmSet(ctx, gageParmVerbose, 0); val = gageAnswerPointer(ctx, pvl, gageSclValue); @@ -246,9 +246,10 @@ AIR_CAST(size_t, sz[0]), AIR_CAST(size_t, sz[1]), AIR_CAST(size_t, sz[2]))) { - sprintf(err, "%s: couldn't allocate floating point VG%s volume", - me, doH ? "H" : ""); - biffMove(QBERT, err, NRRD); airMopError(mop); return 1; + biffMove_va(QBERT, NRRD, + "%s: couldn't allocate floating point VG%s volume", + me, doH ? "H" : ""); + airMopError(mop); return 1; } vghF = (float *)nout->data; fprintf(stderr, "%s: probing ... ", me); fflush(stderr); @@ -287,7 +288,7 @@ qbertMakeVghHists(Nrrd *nvhist, Nrrd *nghist, Nrrd *nhhist, unsigned int *sz, int bins, Nrrd *nvghF, Nrrd *nin) { - char me[]="qbertMakeVghHists", err[BIFF_STRLEN]; + char me[]="qbertMakeVghHists"; double minv, maxv, ming, maxg, minh=0, maxh=0; float *vghF; unsigned int i; @@ -343,9 +344,9 @@ AIR_CAST(size_t, bins)); } if (E) { - sprintf(err, "%s: couldn't allocate %d %d-bin histograms", - me, nval, bins); - biffMove(QBERT, err, NRRD); return 1; + biffMove_va(QBERT, NRRD, "%s: couldn't allocate %d %d-bin histograms", + me, nval, bins); + return 1; } nvhist->axis[0].min = minv; nvhist->axis[0].max = maxv; nghist->axis[0].min = ming; nghist->axis[0].max = maxg; @@ -389,7 +390,7 @@ qbertMakeVgh(Nrrd *nvgh, Nrrd *nvhist, Nrrd *nghist, Nrrd *nhhist, unsigned int *sz, float *perc, Nrrd *nvghF) { - char me[]="qbertMakeVgh", err[BIFF_STRLEN], cmt[AIR_STRLEN_SMALL]; + char me[]="qbertMakeVgh", cmt[AIR_STRLEN_SMALL]; double minv, maxv, ming, maxg, minh=0, maxh=0; int lose, *vhist, *ghist, *hhist=NULL, bins, vi, gi, hi, nval, doH; unsigned int i; @@ -455,9 +456,9 @@ AIR_CAST(size_t, sz[0]), AIR_CAST(size_t, sz[1]), AIR_CAST(size_t, sz[2]))) { - sprintf(err, "%s: couldn't allocate 8-bit VG%s volume", - me, doH ? "H" : ""); - biffMove(QBERT, err, NRRD); return 1; + biffMove_va(QBERT, NRRD, "%s: couldn't allocate 8-bit VG%s volume", + me, doH ? "H" : ""); + return 1; } vgh = (unsigned char*)nvgh->data; vghF = (float*)nvghF->data; @@ -495,7 +496,7 @@ int qbertScat(Nrrd *nvgh, int pos, int size, char *name) { - char me[]="qbertScat", err[BIFF_STRLEN]; + char me[]="qbertScat"; Nrrd *nin[2], *nv, *nx, *nscA, *nscB; airArray *mop; size_t bins[2]; @@ -527,10 +528,10 @@ if (!E) E |= nrrdFlip(nscA, nscB, 1); if (!E) E |= nrrdSave(name, nscA, NULL); if (E) { - sprintf(err, "%s: trouble generating/saving scatterplot", me); - biffMove(QBERT, err, NRRD); airMopError(mop); return 1; + biffMove_va(QBERT, NRRD, "%s: trouble generating/saving scatterplot", me); + airMopError(mop); return 1; } - + airMopOkay(mop); return 0; } Modified: teem/trunk/src/bin/talkweb.c =================================================================== --- teem/trunk/src/bin/talkweb.c 2009-11-13 22:49:44 UTC (rev 4374) +++ teem/trunk/src/bin/talkweb.c 2009-11-13 22:51:03 UTC (rev 4375) @@ -228,14 +228,14 @@ airMopAdd(mop, nimg, (airMopper)nrrdNuke, airMopAlways); for (si=0; slide[si]; si++) { if (nrrdLoad(nimg, slide[si]->image, NULL)) { - biffMovef(TKWB, NRRD, "%s: trouble reading slide image \"%s\"", - me, slide[si]->image); + biffMove_va(TKWB, NRRD, "%s: trouble reading slide image \"%s\"", + me, slide[si]->image); airMopError(mop); return 1; } if (!nrrdFormatPNG->fitsInto(nimg, nrrdEncodingGzip, AIR_TRUE)) { - biffMovef(TKWB, NRRD, - "%s: slide image \"%s\" doesn't seem to be an image", - me, slide[si]->image); + biffMove_va(TKWB, NRRD, + "%s: slide image \"%s\" doesn't seem to be an image", + me, slide[si]->image); airMopError(mop); return 1; } sx = nimg->axis[nimg->dim-2].size; Modified: teem/trunk/src/bin/vprobe.c =================================================================== --- teem/trunk/src/bin/vprobe.c 2009-11-13 22:49:44 UTC (rev 4374) +++ teem/trunk/src/bin/vprobe.c 2009-11-13 22:51:03 UTC (rev 4375) @@ -63,13 +63,14 @@ Nrrd *nin, *nout, **ninSS=NULL; Nrrd *ngrad=NULL, *nbmat=NULL; size_t ai, ansLen, idx, xi, yi, zi, six, siy, siz, sox, soy, soz; - double bval=0, gmc, rangeSS[2], wrlSS, idxSS=AIR_NAN, *scalePos; + double bval=0, gmc, rangeSS[2], wrlSS, idxSS=AIR_NAN; gageContext *ctx; gagePerVolume *pvl=NULL; double t0, t1, x, y, z, scale[3], rscl[3], min[3], maxOut[3], maxIn[3]; airArray *mop; unsigned int hackZi, *skip, skipNum; double (*ins)(void *v, size_t I, double d); + gageStackBlurParm *sbp; char hackKeyStr[]="TEEM_VPROBE_HACK_ZI", *hackValStr; int otype, hackSet; @@ -215,9 +216,10 @@ /* for setting up pre-blurred scale-space samples */ if (numSS) { unsigned int vi; + sbp = gageStackBlurParmNew(); + airMopAdd(mop, sbp, (airMopper)gageStackBlurParmNix, airMopAlways); ninSS = AIR_CAST(Nrrd **, calloc(numSS, sizeof(Nrrd *))); - scalePos = AIR_CAST(double *, calloc(numSS, sizeof(double))); - if (!(ninSS && scalePos)) { + if (!ninSS) { fprintf(stderr, "%s: couldn't allocate ninSS", me); airMopError(mop); return 1; } @@ -225,48 +227,14 @@ ninSS[ninSSIdx] = nrrdNew(); airMopAdd(mop, ninSS[ninSSIdx], (airMopper)nrrdNuke, airMopAlways); } - if (SSuniform) { - for (vi=0; vi<numSS; vi++) { - scalePos[vi] = AIR_AFFINE(0, vi, numSS-1, rangeSS[0], rangeSS[1]); - } - } else { - if (SSoptim) { - unsigned int rss[2]; - rss[0] = AIR_CAST(unsigned int, rangeSS[0]); - rss[1] = AIR_CAST(unsigned int, rangeSS[1]); - if (!( rss[0] == rangeSS[0] && rss[1] == rangeSS[1] )) { - fprintf(stderr, "%s: w/ optsim, can use only integral scale " - "limits (not [%g,%g])\n", me, rangeSS[0], rangeSS[1]); - airMopError(mop); return 1; - } - if (0 != rss[0]) { - fprintf(stderr, "%s: w/ optsim, need lower scale limit 0 (not %u)", - me, rss[0]); - airMopError(mop); return 1; - } - if (gageOptimSigSet(scalePos, numSS, rss[1])) { - airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways); - fprintf(stderr, "%s: trouble w/ optimal sigmas:\n%s\n", me, err); - airMopError(mop); return 1; - } - } else { - /* non-optimal sigmas, uniform in tau */ - double rangeTau[2], tau; - rangeTau[0] = gageTauOfSig(rangeSS[0]); - rangeTau[1] = gageTauOfSig(rangeSS[1]); - for (vi=0; vi<numSS; vi++) { - tau = AIR_AFFINE(0, vi, numSS-1, rangeTau[0], rangeTau[1]); - scalePos[vi] = gageSigOfTau(tau); - } - } + if (gageStackBlurParmScaleSet(sbp, numSS, rangeSS[0], rangeSS[1], + SSuniform, SSoptim) + || gageStackBlurParmKernelSet(sbp, kSSblur, nrrdBoundaryBleed, + AIR_TRUE, verbose)) { + airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways); + fprintf(stderr, "%s: trouble with stack blur info:\n%s\n", me, err); + airMopError(mop); return 1; } - if (verbose > 2) { - fprintf(stderr, "%s: sampling scale range %g--%g %suniformly:\n", me, - rangeSS[0], rangeSS[1], SSuniform ? "" : "non-"); - for (vi=0; vi<numSS; vi++) { - fprintf(stderr, " scalePos[%u] = %g\n", vi, scalePos[vi]); - } - } if (airStrlen(stackReadFormat)) { if (nrrdLoadMulti(ninSS, numSS, stackReadFormat, 0, NULL)) { @@ -274,20 +242,14 @@ fprintf(stderr, "%s: trouble loading blurrings:\n%s\n", me, err); airMopError(mop); return 1; } - if (gageStackBlur(ninSS, scalePos, numSS, AIR_TRUE, - nin, kind, kSSblur, - nrrdBoundaryBleed, AIR_TRUE, - verbose)) { + if (gageStackBlurCheck(AIR_CAST(const Nrrd **, ninSS), + sbp, nin, kind)) { airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways); - fprintf(stderr, "%s: given pre-computed blurrings don't match:\n%s\n", - me, err); + fprintf(stderr, "%s: trouble:\n%s\n", me, err); airMopError(mop); return 1; } } else { - if (gageStackBlur(ninSS, scalePos, numSS, AIR_FALSE, - nin, kind, kSSblur, - nrrdBoundaryBleed, AIR_TRUE, - verbose)) { + if (gageStackBlur(ninSS, sbp, nin, kind)) { airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways); fprintf(stderr, "%s: trouble pre-computing blurrings:\n%s\n", me, err); airMopError(mop); return 1; @@ -311,24 +273,25 @@ So here, we have to actually replicate work that is done by _gageProbeSpace() in converting from world to index space */ for (vi=0; vi<numSS-1; vi++) { - if (AIR_IN_CL(scalePos[vi], wrlSS, scalePos[vi+1])) { - idxSS = vi + AIR_AFFINE(scalePos[vi], wrlSS, scalePos[vi+1], 0, 1); + if (AIR_IN_CL(sbp->scale[vi], wrlSS, sbp->scale[vi+1])) { + idxSS = vi + AIR_AFFINE(sbp->scale[vi], wrlSS, sbp->scale[vi+1], 0, 1); if (verbose > 1) { fprintf(stderr, "%s: scale pos %g -> idx %g = %u + %g\n", me, wrlSS, idxSS, vi, - AIR_AFFINE(scalePos[vi], wrlSS, scalePos[vi+1], 0, 1)); + AIR_AFFINE(sbp->scale[vi], wrlSS, sbp->scale[vi+1], 0, 1)); } break; } } if (vi == numSS-1) { fprintf(stderr, "%s: scale pos %g outside range %g=%g, %g=%g\n", me, - wrlSS, rangeSS[0], scalePos[0], rangeSS[1], scalePos[numSS-1]); + wrlSS, rangeSS[0], sbp->scale[0], + rangeSS[1], sbp->scale[numSS-1]); airMopError(mop); return 1; } } else { ninSS = NULL; - scalePos = NULL; + sbp = NULL; } /*** @@ -358,7 +321,7 @@ if (!E) E |= gageStackPerVolumeNew(ctx, pvlSS, AIR_CAST(const Nrrd**, ninSS), numSS, kind); - if (!E) E |= gageStackPerVolumeAttach(ctx, pvl, pvlSS, scalePos, numSS); + if (!E) E |= gageStackPerVolumeAttach(ctx, pvl, pvlSS, sbp->scale, numSS); if (!E) E |= gageKernelSet(ctx, gageKernelStack, kSS->kernel, kSS->parm); } else { if (!E) E |= gagePerVolumeAttach(ctx, pvl); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |