Directional Connectivity-based Segmentation of Medical Images