         const int iPosY = line;
 #else
         // compute upper left image corner
-        const int iPosY = float2int(c_start[slice].y+0.5f);
+        const int iPosY = c_start[slice].y;
 
         if(line < iPosY)
             continue;
         if(line >= iPosY+c_vox[principal+1])
             continue;
 
-        const int iPosX = float2int(c_start[slice].x+0.5f);
+        const int iPosX = c_start[slice].x;
 #endif
 
         // the voxel row of the current slice corresponding to this image line

       to = intImg->height;

   // compute data for determining upper left image corner of each slice and copy it to device
   vvVector4 start, inc;
   findSlicePosition(firstSlice, &start, NULL);
   findSlicePosition(firstSlice+sliceStep, &inc, NULL);
   inc.sub(&start);
   vvVector4 cur = start;
   for(int slice=firstSlice; slice != lastSlice; slice += sliceStep)
   {
       h_start[slice].x = cur.e[0] / cur.e[3];
       h_start[slice].y = cur.e[1] / cur.e[3];
       cur.add(&inc);
   }

   bool ok = true;
   vvCuda::checkError(&ok, cudaMemcpyToSymbol(c_start, h_start, sizeof(h_start)), "cudaMemcpy start");

#ifdef VOLTEX3D
   tex_raw.normalized = false;
   tex_raw.filterMode = cudaFilterModePoint;
   tex_raw.addressMode[0] = cudaAddressModeClamp;
   tex_raw.addressMode[1] = cudaAddressModeClamp;
   tex_raw.addressMode[2] = cudaAddressModeClamp;

//#define SHMLOAD
#define VOLTEX3D 1 // undef, 1 or 3
//#define PITCHED
//#define FLOATDATA
//#define CONSTLOAD
//#define THREADPERVOXEL
//#define CONSTDATA
#define FLOATIMG
#define EARLYRAYTERM

const int Repetitions = 1;
