Ejemplo n.º 1
0
NrrdKernelSpec *
nrrdKernelSpecNew(void) {
  NrrdKernelSpec *ksp;
  int i;

  ksp = (NrrdKernelSpec *)calloc(1, sizeof(NrrdKernelSpec));
  if (ksp) {
    ksp->kernel = NULL;
    for (i=0; i<NRRD_KERNEL_PARMS_NUM; i++) {
      ksp->parm[i] = airNaN();  /* valgrind complained about AIR_NAN at -O2 */
    }
  }
  return ksp;
}
Ejemplo n.º 2
0
void
gageShapeReset(gageShape *shape) {
  int i, ai;
  
  if (shape) {
    shape->defaultCenter = gageDefDefaultCenter;
    ELL_3V_SET(shape->size, 0, 0, 0);
    shape->center = nrrdCenterUnknown;
    shape->fromOrientation = AIR_FALSE;
    ELL_3V_SET(shape->spacing, AIR_NAN, AIR_NAN, AIR_NAN);
    for (i=gageKernelUnknown+1; i<gageKernelLast; i++) {
      /* valgrind complained about AIR_NAN at -O2 */
      for (ai=0; ai<=2; ai++) {
        shape->fwScale[i][ai] = airNaN();
      }
    }
    ELL_3V_SET(shape->volHalfLen, AIR_NAN, AIR_NAN, AIR_NAN);
    ELL_3V_SET(shape->voxLen, AIR_NAN, AIR_NAN, AIR_NAN);
  }
  return;
}