wsDtSegmentation.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:nature_methods_multicut_pipeline 作者: ilastik 项目源码 文件源码
def binary_seeds_from_distance_transform(distance_to_membrane, smoothingSigma, out_debug_image_dict):
    """
    Return a binary image indicating the local maxima of the given distance transform.

    If smoothingSigma is provided, pre-smooth the distance transform before locating local maxima.
    """
    # Can't work in-place: Not allowed to modify input
    distance_to_membrane = distance_to_membrane.copy()

    if smoothingSigma != 0.0:
        distance_to_membrane = vigra.filters.gaussianSmoothing(distance_to_membrane, smoothingSigma, out=distance_to_membrane)
        save_debug_image('smoothed DT for seeds', distance_to_membrane, out_debug_image_dict)

    localMaximaND(distance_to_membrane, allowPlateaus=True, allowAtBorder=True, marker=numpy.nan, out=distance_to_membrane)
    seedsVolume = numpy.isnan(distance_to_membrane)

    save_debug_image('binary seeds', seedsVolume.view(numpy.uint8), out_debug_image_dict)
    return seedsVolume
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号