def imreconstruct(marker, mask):
    markeritk = sitk.GetImageFromArray(marker)
    maskitk = sitk.GetImageFromArray(mask)
    recfilt = sitk.ReconstructionByDilationImageFilter()
    rectoutitk = recfilt.Execute(markeritk, maskitk)
    rectout = sitk.GetArrayFromImage(rectoutitk)
    return rectout
def imreconstruct(marker, mask):
    markeritk = sitk.GetImageFromArray(marker)
    maskitk = sitk.GetImageFromArray(mask)
    recfilt = sitk.ReconstructionByDilationImageFilter()
    rectoutitk = recfilt.Execute(markeritk, maskitk)
    rectout = sitk.GetArrayFromImage(rectoutitk)
    return rectout