 #include <math.h>
 #include "ReconstructionData.h"
 
+#define Mat4x4 16
+#define Point3D 3
+#define Dim3D 3
 // ----------------------------------------------------------------------------
 /* Define texture and constants */
-__constant__ double c_gridMatrix[16]; // Matrix to transpose from basic axis to output volume axis
-__constant__ double3 c_gridOrig; // Origin of the output volume
+__constant__ double c_gridMatrix[Mat4x4]; // Matrix to transpose from basic axis to output volume axis
+__constant__ double c_gridOrig[Point3D]; // Origin of the output volume
 __constant__ int3 c_gridDims; // Dimensions of the output volume
-__constant__ double3 c_gridSpacing; // Spacing of the output volume
+__constant__ TCompute c_gridSpacing[Dim3D]; // Spacing of the output volume
 __constant__ int2 c_depthMapDims; // Dimensions of all depths map
 __constant__ double c_rayPotentialThick; // Thickness threshold for the ray potential function
 __constant__ double c_rayPotentialRho; // Rho at the Y axis for the ray potential function

    return -1;

  // Get usefull value for allocation of variables
  const int matrix4Size = 16;
  const int point3Size = 3;
  const int nbPixelOnDepthMap = h_dataList[0]->GetDepthMap()->GetNumberOfPoints();
  const int nbVoxels = io_outScalar->GetNumberOfTuples();

  // Fill texture and constant values
  double* h_gridMatrix = new double[16];
  vtkMatrixToDoubleTable(i_gridMatrix, h_gridMatrix);
  double* h_outScalar = new double[nbVoxels];
  vtkDoubleArrayToTable(io_outScalar, h_outScalar);


  // Create and fill device value
  cudaMemcpyToSymbol(c_gridMatrix, h_gridMatrix, matrix4Size * sizeof(double));
  cudaMemcpyToSymbol(c_gridDims, h_gridDims, point3Size * sizeof(int));
  cudaMemcpyToSymbol(c_gridOrig, h_gridOrig, point3Size * sizeof(double));
  cudaMemcpyToSymbol(c_gridSpacing, h_gridSpacing, point3Size * sizeof(double));
  cudaMemcpyToSymbol(c_rayPotentialThick, &h_rayPThick, sizeof(double));
  cudaMemcpyToSymbol(c_rayPotentialRho, &h_rayPRho, sizeof(double));
  double* d_outScalar;


// ----------------------------------------------------------------------------
/* Apply a 4x4 matrix to a 3D points */
__device__ void transformFrom4Matrix(double matrix[Mat4x4], double point[Point3D], double output[Point3D])
{
  output[0] = matrix[0] * point[0] + matrix[1] * point[1] + matrix[2] * point[2] + matrix[3];
  output[1] = matrix[4] * point[0] + matrix[5] * point[1] + matrix[6] * point[2] + matrix[7];
