Curvilinear Structure Enhancement and Centreline Extraction in 2D and 3D Images