Unitarily Invariant Convex Functions on the State Space of Type I and Type III Von Neumann Algebras