Convert an object of class fromFunction(created by spatialAtRisk for example) into a spatstat im object.
# S3 method for fromFunction
as.im(X, xyt, M = 100, N = 100, ...)
an object of class fromSPDF
and objects of class stppp
number of cells in x direction
number of cells in y direction
additional arguments
object of class im containing normalised intensities
as.im.fromXYZ, as.im.fromSPDF, as.im.fromFunction, as.fromXYZ