lama/snake_contour_tool/label_fixer.py
def cluster(rigid_img, i):
    """Do the kmeans clustering, i is the only parameter for this kmeans function"""
    k = sitk.ScalarImageKmeans(rigid_img, [i] * i)

    out_arr = sitk.GetArrayFromImage(k)
    return out_arr
Do the kmeans clustering, i is the only parameter for this kmeans function
Do the kmeans clustering, i is the only parameter for this kmeans function
Do the kmeans clustering i is the only parameter for this kmeans function
def cluster(rigid_img, i):
    k = sitk.ScalarImageKmeans(rigid_img, [i] * i)
    out_arr = sitk.GetArrayFromImage(k)
    return out_arr
def cluster ( rigid_img , i ) : k = sitk . ScalarImageKmeans ( rigid_img , [ i ] * i ) out_arr = sitk . GetArrayFromImage ( k ) return out_arr
Do the kmeans clustering, i is the only parameter for this kmeans function
Do the kmeans clustering i is the only parameter for this kmeans function
"""Do the kmeans clustering, i is the only parameter for this kmeans function"""
rigid_img
i