     CudaErrorCheck(cudaDeviceSynchronize());
 
     // clean code
-
     delete(h_depthMap);
     delete(h_matrixK);
     delete(h_matrixRT);

  computeVoxelCenter(voxelCoordinate, voxelCenterTemp);

  // Transform voxel from grid to real coord
  double* voxelCenter = new double[3];
  transformFrom4Matrix(c_gridMatrix, voxelCenterTemp, voxelCenter);

  // Transform voxel center from real coord to camera coords
  double* voxelCenterCamera = new double[3];
  transformFrom4Matrix(matrixTR, voxelCenter, voxelCenterCamera); // todo add translation (+1 h)

  // Transform voxel center from camera coords to depth map homogeneous coords
  double* voxelCenterHomogen = new double[3];
  transformFrom4Matrix(matrixK, voxelCenterCamera, voxelCenterHomogen);

  // Get voxel center on depth map coord


  // Get the distance between voxel and camera
  double realDepth = norm(voxelCenterCamera);

  // Test if coordinate are inside depth map
  if (pixel[0] < 0 || pixel[1] < 0 || pixel[2] < 0 ||
