 
   float fov = 3.14/4;
   float pixel_width = tan(fov/2.0)/(IMAGE_DIM/2);
-  float step_size = 2.5;
+  float step_size = 0.5;
 
   int x = -IMAGE_DIM/2 + blockIdx.x * blockDim.x + threadIdx.x;
   int y = -IMAGE_DIM/2 + blockIdx.y * blockDim.y + threadIdx.y;

}


/*__global__ void region_grow_kernel(unsigned char* data, unsigned char* region, int* finished){
  int dx[6] = {-1,1,0,0,0,0};
  int dy[6] = {0,0,-1,1,0,0};
  int dz[6] = {0,0,0,0,-1,1};
  int3 pixel = pop(stack);
  for(int n = 0; n < 6; n++){
  int3 candidate = pixel;
  candidate.x += dx[n];
  candidate.y += dy[n];
  candidate.z += dz[n];

  if(!inside(candidate)){
  continue;
  }

  if(region[candidate.z * DATA_DIM*DATA_DIM + candidate.y*DATA_DIM + candidate.x]){
  continue;
  }

  if(similar(data, pixel, candidate)){
  push(stack, candidate);
  region[candidate.z * DATA_DIM*DATA_DIM + candidate.y*DATA_DIM + candidate.x] = 1;
  }
  }

  }*/


__global__ void region_grow_kernel_shared(unsigned char* data, unsigned char* region, int* finished){

}


unsigned char* grow_region_gpu(unsigned char* data){
  unsigned char* region = (unsigned char*)calloc(sizeof(unsigned char), DATA_DIM*DATA_DIM*DATA_DIM);
  int* finished = (int*)malloc(sizeof(int));
  finished[0] = 1;

  int3 seed = {.x=50, .y=300, .z=300};
  region[seed.z *DATA_DIM*DATA_DIM + seed.y*DATA_DIM + seed.x] = 2;

  unsigned char *data_device;
  unsigned char *region_device;
