B
    \                 @   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f dti| d S )NZimage_filter)superr	   __init__r   )selfargskwargs)	__class__ ;lib/python3.7/site-packages/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)Zclip_negativefloatintZsigmar      release)	update_onzlow threshold)Z
value_typer   zhigh thresholdZcolorZplugin)Zptype)imageskimageZdtype_limitsnpZ
issubdtypeZdtypeZfloatingZ
add_widgetr   r   Zcolor_namesr
   r	   attach)r   Zimage_viewerr   ZiminZimaxZitype)r   r   r   r      s    

zCannyPlugin.attach)__name__
__module____qualname____doc__namer   r   __classcell__r   r   )r   r   r	   	   s   r	   )Znumpyr   r   Zfeaturer   Zoverlaypluginr   Zwidgetsr   r   r	   r   r   r   r   <module>   s
   