The theory of inhomogeneous nucleation in uniaxial ferromagnets