o
    :ήc                     @   sL   d dl Zd dlZddlmZ ddlmZ ddlmZm	Z	 G dd	 d	eZ
dS )
    N   )canny   )OverlayPlugin   )SliderComboBoxc                       s0   e Zd ZdZdZ fddZ fddZ  ZS )CannyPluginz.Canny filter plugin to show edges of an image.zCanny Filterc                    s   t t| jddti| d S )Nimage_filter )superr	   __init__r   )selfargskwargs	__class__r   C/tmp/pip-target-vg8gfxp4/lib/python/skimage/viewer/plugins/canny.pyr      s   zCannyPlugin.__init__c              	      s   |j }tj|dd\}}t|jtjrdnd}| tddddd	 | td
|||dd | td|||dd | t	d| j
dd tt| | d S )NF)clip_negativefloatintsigmar      release)	update_onzlow threshold)
value_typer   zhigh thresholdcolorplugin)ptype)imageskimagedtype_limitsnp
issubdtypedtypefloating
add_widgetr   r   color_namesr   r	   attach)r   image_viewerr   iminimaxityper   r   r   r(      s   zCannyPlugin.attach)__name__
__module____qualname____doc__namer   r(   __classcell__r   r   r   r   r	   	   s
    r	   )numpyr"   r    featurer   overlaypluginr   widgetsr   r   r	   r   r   r   r   <module>   s    