code: public static <T extends ImageGray<T>>
  	SparseScaleGradient<T,?> createGradient( boolean useHaar , Class<T> imageType )
  	{
  		if( useHaar )
  			return FactorySparseIntegralFilters.haar(imageType);
  		else
  			return FactorySparseIntegralFilters.gradient(imageType);
  	}
docs: Creates a class for computing the image gradient from an integral image in a sparse fashion.
  All these kernels assume that the kernel is entirely contained inside the image!
  
  @param useHaar Should it use a haar wavelet or an derivative kernel.
  @param imageType Type of image being processed.
  @return Sparse gradient algorithm