This paper presents a method of enhancing linear and curvilinear image features, such as those corresponding to tissue discontinuities in medical ultrasound. The method is an extension of a template based technique for line enhancement which produces a test statistic at each point by projecting the pixels near that point onto a line segment, varying the orientation of the segment to maximize the projected value, and retaining the projected value as the test statistic. In the past, we have not made use of information about which angle produced the maximum value at each point. In this paper, we compute a histogram of the angles near each point to gain an indication of the direction of larger scale linear features lying nearby. Mathematically, we wish to estimate a set of prior probabilities for the orientation of line segments that pass through each point. The priors can then be used to improve the power of the Bayesian line detection procedure. In addition, they can also be used to improve the visual quality of the image produced by plotting the test statistics on an image raster. We have found that such an image is revealing because it shows more sharply the edges of the linear components, making them more clearly visible and their fringes more distinguishable from the background. With the incorporation of prior information, the processed image shows a further improvement in visual and machine detectability of linear components, due to increased difference in gray level between points lying on edges and those lying away. This technique has potential to significantly improve the machine detectability of tissue discontinuities in medical ultrasound, as well as linear features in other forms of computed imaging.