A method for detection of the position and orientation of the tip of a needle-like medical device inserted into a tissue of a patient using scanning apparatus. The method obtains a first scan of the tissue correlating the needle-like medical device with a plurality of needle-like templates, each one having a different angular orientation to obtain an feature image of the device obtains eigenvalues and an eigenvector of image to obtain the angular orientation of an image plane for a subsequent scan transforms the orientation of the device in the determined image plane into scanning system reference coordinates with the longitudinal axis of the needle like device having a predetermined orientations with respect to the reference coordinate system and makes observations along each of a sequence of lines transverse to the longitudinal axis of the image of the device in the determined plane to detect the tip of the device.