def get_neighbours(self, x, y, image):
        # now = time.time()
        x_1, y_1, x1, y1 = x-1, y-1, x+1, y+1
        neighbours = [image[x_1][y], image[x_1][y1], image[x][y1], image[x1][y1],     # P2,P3,P4,P5
                      image[x1][y], image[x1][y_1], image[x][y_1], image[x_1][y_1]]    # P6,P7,P8,P9
        # t = time.time() - now
        # print 't neighbours: ', t
        return neighbours

    # ------------------------------------------------------------------------------------------------------------------
Return 8-neighbours of image point P1(x,y), in a clockwise order
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/sct_compute_hausdorff_distance.py/Thinning.get_neighbours