Real-time distance measurement between the needle tip and target with PlusToolkit and 3D Slicer

You can very easily compute distance between two fiducial points in Python, but if you want to display distance between two points in the viewer, like a ruler, then it is probably better to use the annotation ruler. Click on the small down-arrow button next to the fiducial place icon on the toolbar and select placement of ruler, then click on the two points in the image.