GridSnake: a Grid-based Implementation of the Snake Segmentation Algorithm