We present a method for automatic surgical tool localization in 3D ultrasound images based on line filtering, voxel classification and model fitting. A possible application is to provide assistance for biopsy needle or micro-electrode insertion, or a robotic system performing this insertion. The line filtering method is first used to enhance the contrast of the 3D ultrasound image, then a classifier is chosen to separate the tool voxels, in order to reduce the number of outliers. The last step is a RANSAC model fitting. Experimental results on several different datasets demonstrate that the failure rate of the proposed method is lower than for preceding methods, with similar localization accuracy, at the expense of a modest increase in computational effort. Even though some of the line filtering methods are a little slower than other methods, its robustness and accuracy are strongly proposed and it is worth to develop a system for clinique applications.