 
 const int Repetitions = 1;
 
-#ifdef VOL3TEX3D
+#ifdef VOLTEX3D
 #undef PITCHED
 #undef CONSTLOAD
 #undef CONSTDATA

#endif

   bool ok = true;
#if defined(PITCHED) || defined(VOL3TEX3D)
   for (int i=0; i<3; ++i)
   {
#ifdef PITCHED
       cudaExtent extent = make_cudaExtent(vd->vox[(i+1)%3]*sizeof(Scalar), vd->vox[(i+2)%3], vd->vox[(i+3)%3]);
       if(!vvCuda::checkError(&ok, cudaMalloc3D(&d_voxptr[i], extent), "cudaMalloc3D vox"))
           break;
#else
       cudaExtent extent = make_cudaExtent(vd->vox[(i+1)%3], vd->vox[(i+2)%3], vd->vox[(i+3)%3]);
       cudaChannelFormatDesc desc = cudaCreateChannelDesc<Scalar>();
       if(!vvCuda::checkError(&ok, cudaMalloc3DArray(&d_voxarr[i], &desc, extent, 0), "cudaMalloc3DArray vox"))
           break;
#endif
       cudaMemcpy3DParms parms = {0};
#ifdef FLOATDATA
       parms.srcPtr = make_cudaPitchedPtr(fraw[i], sizeof(Scalar)*vd->vox[(i+1)%3], vd->vox[(i+1)%3], vd->vox[(i+2)%3]);
#else
       parms.srcPtr = make_cudaPitchedPtr(raw[i], sizeof(Scalar)*vd->vox[(i+1)%3], vd->vox[(i+1)%3], vd->vox[(i+2)%3]);
#endif

#ifdef PITCHED

texture<uchar4, 1, cudaReadModeNormalizedFloat> tex_tf;
#endif

#ifdef VOLTEX3D
#ifdef FLOATDATA
texture<float, 3, cudaReadModeElementType> tex_raw;
#else
