Tool for graph-based image segmentation and analysis