 }
 
 extern "C"
-void cudaGaussian(float *d_img, int3 size, const float gaussianVariance, unsigned int maxKernelWidth){
+float* cudaGaussian(float *d_img, int3 size, const float gaussianVariance, unsigned int maxKernelWidth){
 
   int threadsPerBlock = 256;
   int blocksPerGrid = ((size.z) + threadsPerBlock -1) >> 8;

  cudaMalloc((void**) &d_magnitude, size.z*sizeof(float));
  CUT_CHECK_ERROR("Memory temporary image creation failed");

  cudaSobel(d_magnitude,d_direction,d_image,size);

  gradientMaximumDetector(d_image,d_magnitude,d_direction,size,maxKernelWidth);



  hysteresis(d_image,size,t1,t2);

  cudaMemcpy(image,d_image,size.z*sizeof(float),cudaMemcpyDeviceToHost);

  /// free memory used for image magnitude
