On the Determination of the Codimension Function