int gageShapeSet(gageShape *shape, const Nrrd *nin, int baseDim) { char me[]="gageShapeSet", err[BIFF_STRLEN]; if (_gageShapeSet(NULL, shape, nin, baseDim)) { sprintf(err, "%s: trouble", me); biffAdd(GAGE, err); return 1; } return 0; }
int gageShapeSet(gageShape *shape, const Nrrd *nin, int baseDim) { static const char me[]="gageShapeSet"; if (_gageShapeSet(NULL, shape, nin, baseDim)) { biffAddf(GAGE, "%s: trouble", me); return 1; } return 0; }
/* ******** gageVolumeCheck() ** ** checks whether a given volume is valid for the given kind ** and the given parameter settings in the context ** ** Note that ctx is simply passed to _gageShapeSet(), with no NULL-ity ** test- which is fine- it just means that the check is not specific ** to the parameters that can be set in the gageContext. */ int gageVolumeCheck(const gageContext *ctx, const Nrrd *nin, const gageKind *kind) { char me[]="gageVolumeCheck", err[BIFF_STRLEN]; gageShape shape; gageShapeReset(&shape); if (_gageShapeSet(ctx, &shape, nin, kind->baseDim)) { sprintf(err, "%s: trouble setting volume as %s kind", me, kind->name); biffAdd(GAGE, err); return 1; } return 0; }