o
    :Î®cé  ã                   @   sf   d Z ddlT ddlT ddlT ddlT ddlT eƒ  dZdd„ Zdd„ Z	dd	„ Z
e d
ur1e
e ƒZ d
S d
S )z_Utilities to read and write images in various formats.

The following plug-ins are available:

é   )Ú*éI   c                    s   ‡ fdd„|D ƒS )Nc                    s   g | ]}ˆ | ‘qS © r   )Ú.0Úseparator_length©Úcharr   ú:/tmp/pip-target-vg8gfxp4/lib/python/skimage/io/__init__.pyÚ
<listcomp>   s    z_separator.<locals>.<listcomp>r   )r   Úlengthsr   r   r	   Ú
_separator   s   r   c                 C   sD   |   dtd|ƒ¡ |   dd¡ |   dtd|ƒ¡ |  td|ƒ¡ dS )z6Add separators and column titles to plugin info table.é    ú=r   )ÚPluginÚDescriptioné   ú-N)Úinsertr   Úappend)Ú
info_tableÚcolumn_lengthsr   r   r	   Ú_format_plugin_info_table   s   r   c                 C   sÐ   ddl m} dd„ tD ƒ}t|ƒdkrtdd„ |D ƒƒ}nd}td | }||g}t||ƒ |D ]1\}}|||ƒ}|g}	|	 dd„ tt|ƒd ƒD ƒ¡ t	|	|ƒD ]\}}
| d| 
|¡|
f 7 } qQq0|  ¡ } | S )	z^Add a list of plugins to the module docstring, formatted as
    a ReStructuredText table.
    r   )Úwrapc                 S   s(   g | ]}|d ks|t |ƒ dd¡f‘qS )ÚtestÚdescriptionzno description)Úplugin_infoÚget)r   Úpr   r   r	   r
   &   s    ÿz_update_doc.<locals>.<listcomp>c                 S   s   g | ]\}}t |ƒ‘qS r   )Úlen)r   ÚnÚ_r   r   r	   r
   *   s    r   c                 S   s   g | ]}d ‘qS )Ú r   )r   r    r   r   r	   r
   5   s    z%s %s
)Útextwrapr   Úavailable_pluginsr   ÚmaxÚWRAP_LENr   ÚextendÚrangeÚzipÚljustÚstrip)Údocr   r   Úname_lengthÚdescription_lengthr   ÚnameÚplugin_descriptionÚdescription_linesÚname_columnr   r   r   r	   Ú_update_doc    s&   ÿ

 ÿr2   N)Ú__doc__Úmanage_pluginsÚsiftÚ
collectionÚ_ioÚ_image_stackÚreset_pluginsr%   r   r   r2   r   r   r   r	   Ú<module>   s    ÿ