We consider two integral transforms which are frequently used in integral geometry and related fields, namely the cosine and the spherical Radon transform. Fast algorithms are developed which invert the respective transforms in a numerically stable way. So far, only theoretical inversion formulas or algorithms for atomic measures have been derived, which are not so important for applications. We focus on the two and threedimensional case, where we also show that our method leads to a regularization. Numerical results are presented and show the validity of the resulting algorithms. First, we use synthetic data for the inversion of the Radon transform. Then we apply the algorithm for the inversion of the cosine transform to reconstruct the directional distribution of line processes from finitely many intersections of their lines with test lines (2D) or planes (3D), respectively. Finally we apply our method to analyze a series of microscopic two-and three-dimensional images of a fibre system.