frameview.py 文件源码

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

项目:SamuROI 作者: samuroi 项目源码 文件源码
def create_outlined_artist(self, mask, color, **kwargs):
        artist = matplotlib.patches.Polygon(xy=mask.outline - 0.5, lw=1, picker=True, fill=False, color='gray',
                                            **kwargs)

        artist.color = color
        artist.mask = mask

        # todo: make the branches children a polygonCollection for better performance

        def set_selected(self, a):
            if a is True:
                self.set_linewidth(5)
                self.set_edgecolor(self.color)
            else:
                self.set_linewidth(1)
                self.set_edgecolor('gray')

        artist.set_selected = types.MethodType(set_selected, artist)
        self.__artists[mask] = artist
        self.axes.add_artist(artist)

        self.create_outlined_child_artits(parent=mask)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号