Most methods of inhomogeneity correction in high energy X-ray beams, assume an infinite lateral extent of the heterogeneous volumes ("slab models") or require sophisticated time-consuming computer algorithms. We present here a method, developed for parallelepiped inhomogeneities based on a beam subtraction concept combined with a conventional "slab model". Provided that the conventional model is appropriately chosen, this method gives agreement with experimental results better than 1% in most cases. It accounts properly for the scatter modification according to the size and position of the inhomogeneous volume. One example of a computer application is also presented.