The aim of this work is to increase the precision of the computations involved in brain tumor stereotactic radiosurgery. It is proposed to apply the newest algorithm of contour segmentation to the contours of the MR/CT slices. It is shown that this algorithm improves significantly the accuracy and speed of the classical contour segmentation algorithms and produces a one-to-one transformation between the Euclidean space and the discrete pixel space. For the distance computations involved in dose distribution computation a subpixel precision is obtained. The segmentation algorithm computes the exact equation of the discrete lines forming a pixel contour of an object (the skull, a tumor, etc.). Since it actually computes the equation of the lines forming the contour and not an approximated line like most algorithms, the algorithm is reversible. From the segmented contour the pixel contour can be exactly reconstructed without loss or displacement of any pixel. The segmentation algorithm is quick since it works in linear time. The present application involves the computation of dose distribution for stereotactic radiosurgery. The intersection between the ray and the skull, the sinus cavities and the tumor can be computed with subpixel accuracy. This obviously improves the dose distribution computation. There are many other applications for this algorithm, for example segmentation, slice reconstruction or simply better rendering of anatomical information, etc. The advantage of this segmentation algorithm over classical approaches lies not only in the results presented here, but also in the fact that a 3D extension should be available soon. This strongly suggests the building of a real 3D planning system, simplifies the inverse planning problem and increases the precision of the computations involved in stereotactic radiosurgery.