def active_contour_step(local_image, snake, step):
    '''Perform another step of the active contour algorithm'''
    if snake.done:
        return True

    t = time.time()
    if 10 % step == 0: # Do extra work every tenth iteration
        snake.respace_nodes()
        snake.shift_nodes() # shift before fixing geometry since reversal of orientation possible
        snake.fix_geometry()
    else:
        snake.shift_nodes()
    print time.time() - t

    return False
dataset/ETHPy150Open nasa/CrisisMappingToolkit/bin/test_active_contour.py/active_contour_step/swapped operands of `%`