Extracting structural information on manifolds from high dimensional data and connectivity analysis of curvilinear structures in 3D biomedical images