Inhomogeneous K-function for germ-grain models