ó
    Eñi'0  ã                   ón  • S r SSKrSSKrSSKJr  SSKJr  SSKJr  SSK	J
r
  SS	KJr  / S
QrSq0 r0 r0 r/ SQS/S/S.r\S 5       rS r\" 5          \" 5         SSS5        S rS r\
" SSSS9S 5       rS rS r\" 5          \" 5         SSS5        \
" SSSS9S S j5       r\" 5          \" 5       rSSS5        \
" SSSS9S 5       r\
" SSSS9S!S j5       rS r\" 5       S 5       r\
" SSSS9S 5       r \
" SSSS9S 5       r!g! , (       d  f       N±= f! , (       d  f       N‘= f! , (       d  f       N{= f)"aK  Handle image reading, writing and plotting plugins.

To improve performance, plugins are only loaded as needed. As a result, there
can be multiple states for a given plugin:

    available: Defined in an *ini file located in ``skimage.io._plugins``.
        See also :func:`skimage.io.available_plugins`.
    partial definition: Specified in an *ini file, but not defined in the
        corresponding plugin module. This will raise an error when loaded.
    available but not on this system: Defined in ``skimage.io._plugins``, but
        a dependent library (e.g. Qt, PIL) is not available on your system.
        This will raise an error when loaded.
    loaded: The real availability is determined when it's explicitly loaded,
        either because it's one of the default plugins, or because it's
        loaded explicitly by the user.

é    N)ÚConfigParser)Úglob)Úcontextmanageré   )Údeprecate_funcé   )Úimread_collection_wrapper)Ú
use_pluginÚcall_pluginÚplugin_infoÚplugin_orderÚreset_pluginsÚfind_available_pluginsÚ_available_plugins)ÚimageioÚpilÚ
matplotlibr   )ÚallÚimshowÚimshow_collectionc               #   ó¨   #   • [         R                  " 5          [         R                  " SS[        SS9  Sv •  SSS5        g! , (       d  f       g= f7f)z=Ignore warnings related to plugin infrastructure deprecation.Úignorez0.*use `imageio` or other I/O packages directly.*Úskimage)ÚactionÚmessageÚcategoryÚmoduleN)ÚwarningsÚcatch_warningsÚfilterwarningsÚFutureWarning© ó    ÚV/home/mande/repo/quber/.venv/lib/python3.13/site-packages/skimage/io/manage_plugins.pyÚ!_hide_plugin_deprecation_warningsr%   9   s=   é € ô 
×	 Ò	 Õ	"Ü×ÒØØFÜ"Øò		
ó 	÷ 
#×	"Ö	"üs   ‚A˜ A¸	AÁ
AÁAc                  ó   • / / / / / / S.q g)zHClear the plugin state to the default, i.e., where no plugins are loaded)ÚimreadÚimsaver   Úimread_collectionr   Ú	_app_showN©Úplugin_storer"   r#   r$   Ú_clear_pluginsr-   F   s   € ð ØØØØØñ�Lr#   c                  ó²   • / SQn U  H  n[        U[        S   5        M     S [        R                  5        5       nU H  n[        U[        U   5        M     g )N)r(   r   r)   r   r'   r   c              3   ó4   #   • U  H  oS :w  d  M
  Uv •  M     g7f)r   Nr"   )Ú.0Úps     r$   Ú	<genexpr>Ú*_load_preferred_plugins.<locals>.<genexpr>]   s   é € ÐFÒ7˜!À¹:—A‘AÒ7ùs   ‚	�	)Ú_set_pluginÚpreferred_pluginsÚkeys)Úio_typesÚp_typeÚplugin_typess      r$   Ú_load_preferred_pluginsr:   W   sR   € âW€HÛˆÜ�FÔ-¨eÑ4Ö5ñ ñ GÔ0×5Ñ5Ô7ÓF€LÛˆÜ�FÔ-¨fÑ5Ö6ò r#   c                 óz   • U H  nU[         ;  a  M   [        X S9    g    g ! [        [        [        4 a     M6  f = f)N)Úkind)r   r
   ÚImportErrorÚRuntimeErrorÚOSError)Úplugin_typeÚplugin_listÚplugins      r$   r4   r4   b   sC   € ÛˆØÔ+Ó+Ùð	Ü�vÒ0Ùò øô œ\¬7Ð3ó 	Úð	ús   “	!¡:¹:z0.25z0.27zoThe plugin infrastructure of `skimage.io` is deprecated. Instead, use `imageio` or other I/O packages directly.)Údeprecated_versionÚremoved_versionÚhintc                  ót   • [        5          [        5         [        5         S S S 5        g ! , (       d  f       g = f©N)r%   r-   r:   r"   r#   r$   r   r   m   s"   € ô 
+Õ	,ÜÔÜÔ!÷ 
-×	,Ö	,ús   ‹)©
7c                 ó¾   • [        5       nUR                  U 5        UR                  5       S   n0 nUR                  U5       H  nUR	                  X$5      X4'   M     X#4$ )z>Return plugin name and meta-data dict from plugin config file.r   )r   ÚreadÚsectionsÚoptionsÚget)ÚfilenameÚparserÚnameÚ	meta_dataÚopts        r$   Ú_parse_config_filerR   y   sX   € ä‹^€FØ
‡K�K�ÔØ�?‰?Ó˜QÑ€Dà€IØ�~‰~˜dÖ#ˆØŸ™ DÓ.ˆ	‹ñ $ð ˆ?Ðr#   c            	      óØ  • [         R                  R                  [        5      n [	        [         R                  R                  U SS5      5      nU GH  n[        U5      u  p4SU;  a  [        R                  " SU S35        M3  U[        U'   US   R                  S5       Vs/ s H  oUR                  5       PM     nnU Vs/ s H  ow[        ;   d  M  UPM     nnU H!  nU[        ;  d  M  [        SU SU S	35        M#     S
U;  =(       a    SU;   n	U	(       a  UR                  S
5        U[        U'   [         R                  R!                  U5      SS ["        U'   GM     gs  snf s  snf )zUScan the plugins directory for .ini files and parse them
to gather plugin meta-data.
Ú_pluginsz*.iniÚprovideszfile z6 not recognized as a scikit-image io plugin, skipping.Ú,zPlugin `z!` wants to provide non-existent `z`. Ignoring.r)   r'   Néüÿÿÿ)ÚosÚpathÚdirnameÚ__file__r   ÚjoinrR   r   ÚwarnÚplugin_meta_dataÚsplitÚstripr,   ÚprintÚappendÚplugin_providesÚbasenameÚplugin_module_name)
ÚpdÚconfig_filesrM   rO   rP   ÚsrU   r1   Úvalid_providesÚneed_to_add_collections
             r$   Ú_scan_pluginsrk   †   sF  € ô 
�‰�‰œÓ	"€BÜœŸ™Ÿ™ R¨°WÓ=Ó>€Lä ˆÜ,¨XÓ6‰ˆØ˜YÓ&Ü�MŠMØ˜�zÐ!WÐXôñ Ø!*Ô˜ÑØ'0°Ñ'<×'BÑ'BÀ3Ô'GÓHÒ'G !—G‘G–IÑ'GˆÐHÙ%-ÓC¢X ´lÑ1BŸ!¡XˆÐCãˆAØœÕ$Ü˜  Ð&GÈÀsÈ,ÐWÖXñ ð   ~Ñ5×T¸(ÀnÑ:Tð 	ö "Ø×!Ñ!Ð"5Ô6à .Œ˜Ñä#%§7¡7×#3Ñ#3°HÓ#=¸c¸rÐ#BÔ˜4Ô ò1 !ùò IùÚCs   Â"E"ÃE'ÃE'c                 ó2  • [        5       n[        R                  5        H  nU H  u  p4UR                  U5        M     M!     0 n[         HD  nU (       a  X1;   d  M  [        U    Vs/ s H  ofR                  S5      (       a  M  UPM     snXS'   MF     U$ s  snf )a  List available plugins.

Parameters
----------
loaded : bool
    If True, show only those plugins currently loaded.  By default,
    all plugins are shown.

Returns
-------
p : dict
    Dictionary with plugin names as keys and exposed functions as
    values.

Ú_)Úsetr,   ÚvaluesÚaddrc   Ú
startswith)ÚloadedÚactive_pluginsÚplugin_funcrB   ÚfuncÚdÚfs          r$   r   r   ¬   s…   € ô, “U€NÜ#×*Ñ*Ö,ˆÛ'‰LˆFØ×Ñ˜vÖ&ó (ñ -ð 	€Aß!ˆÞ˜Õ1Ü$3°FÒ$;ÓUÒ$;˜qÇ<Á<ÐPS×CTŸÑ$;ÑUˆA‹Iñ "ð €Hùò Vs   Á&BÂBc                 óv  • U [         ;  a  [        SU  S35      e[         U    n[        U5      S:X  a  SU  S3n[        U5      eUR	                  SS5      nUc  US   u  pgO-[        U5         U VV	s/ s H  u  p‰X…:X  d  M  U	PM     sn	nS   nU" U0 UD6$ s  sn	nf ! [         a    [        SU S	U  S
35      ef = f)aj  Find the appropriate plugin of 'kind' and execute it.

Parameters
----------
kind : {'imshow', 'imsave', 'imread', 'imread_collection'}
    Function to look up.
plugin : str, optional
    Plugin to load.  Defaults to None, in which case the first
    matching plugin is used.
*args, **kwargs : arguments and keyword arguments
    Passed to the plugin function.

zInvalid function (z) requested.r   z"No suitable plugin registered for z�.

You may load I/O plugins with the `skimage.io.use_plugin` command.  A list of all available plugins are shown in the `skimage.io` docstring.rB   NzCould not find the plugin "z" for Ú.)r,   Ú
ValueErrorÚlenr>   ÚpopÚ_loadÚ
IndexError)
r<   ÚargsÚkwargsÚplugin_funcsÚmsgrB   rm   ru   r1   rw   s
             r$   r   r   Ó   sî   € ð( ”<ÓÜÐ-¨d¨V°<Ð@ÓAÐAä Ñ%€LÜ
ˆ<Ó˜AÓà0°°ð 7&ð &ð 	ô ˜3ÓÐà�Z‰Z˜ $Ó'€FØ�~Ø˜q‘/‰ˆˆ4äˆfŒð	TÙ$0Ô@¢L™&˜1°A±K—A¡LÒ@ÀÑCˆDñ �Ð ˜Ñ Ð ùó	 AøÜó 	TÜÐ!<¸V¸HÀFÈ4È&ÐPQÐRÓSÐSð	Tús$   Á,B Á1BÂ BÂB ÂB ÂB8c                 ó¢  • Uc  [         R                  5       nO-U[        U    ;  a  [        SU  SU S35      eUS:X  a  US/nOU/n[	        U 5        U Hm  nU[         ;  a  [        SU S35      e[         U   nU VVs/ s H  u  pEX@:X  d  M  XE4PM     snnU VVs/ s H  u  pEX@:w  d  M  XE4PM     snn-   nU[         U'   Mo     gs  snnf s  snnf )	a&  Set the default plugin for a specified operation.  The plugin
will be loaded if it hasn't been already.

Parameters
----------
name : str
    Name of plugin. See ``skimage.io.available_plugins`` for a list of available
    plugins.
kind : {'imsave', 'imread', 'imshow', 'imread_collection', 'imshow_collection'}, optional
    Set the plugin for this function.  By default,
    the plugin is set for all functions.

Examples
--------
To use Matplotlib as the default image reader, you would write:

>>> from skimage import io
>>> io.use_plugin('matplotlib', 'imread')  # doctest: +SKIP

To see a list of available plugins run ``skimage.io.available_plugins``. Note
that this lists plugins that are defined, but the full list may not be usable
if your system does not have the required libraries installed.

NúPlugin z does not support `z`.r   r*   Ú'z!' is not a known plugin function.)r,   r6   rc   r>   r}   )rO   r<   ÚkÚfuncsÚnrw   s         r$   r
   r
     sê   € ð> �|Ü× Ñ Ó"‰à” tÑ,Ó,Ü ¨¨Ð.AÀ$ÀÀrÐJÓKÐKà�8ÓØ˜+Ð&‰Dà�6ˆDä	ˆ$„KãˆØ”LÓ Ü  1 #Ð%FÐGÓHÐHä˜Q‘ˆñ ',Ô9¢e™F˜Q¨q©y“�!“¡eÒ9Ù!&ô=
Ú!&‘v˜¨!©)‹FˆQ‹F¡ò=
ñ 
ˆð  Œ�Q‹ò ùó :ùó =
s   Á=CÂCÂC
Â*C
c                 ó”   • [        U S5      (       d7  [        U S5      (       a%  [        U S5      n[        U5      n[        U SU5        ggg)z9Add `imread_collection` to module if not already present.r)   r'   N)ÚhasattrÚgetattrr	   Úsetattr)r   r'   ru   s      r$   Ú#_inject_imread_collection_if_neededr�   <  sH   € ä�6Ð.×/Ñ/´G¸FÀH×4MÑ4MÜ˜ Ó*ˆÜ(¨Ó0ˆÜ�Ð+¨TÕ2ð 5NÐ/r#   c                 ón  • U [        SS9;   a  gU [        ;  a  [        SU  S35      e[        U    n[        SU-   U/S9n[        U    nU Hh  nUS:X  a  [        U5        O$[        X$5      (       d  [        SU  S	U S
35        M9  [        U   n[        X$5      nX4U;  d  MV  UR                  X45        Mj     g)z�Load the given plugin.

Parameters
----------
plugin : str
    Name of plugin to load.

See Also
--------
plugins : List of available plugins

T)rr   Nr„   z not found.zskimage.io._plugins.)Úfromlistr)   z does not provide z as advertised.  Ignoring.)r   re   rz   Ú
__import__rc   r�   rŠ   ra   r,   r‹   rb   )rB   ÚmodnameÚplugin_modulerU   r1   Ústoreru   s          r$   r}   r}   D  sÇ   € ð Ô'¨tÑ4Ó4ØØÔ'Ó'Ü˜7 6 (¨+Ð6Ó7Ð7ä$ VÑ,ˆÜ"Ð#9¸GÑ#CÈwÈiÑXˆä˜vÑ&€HÛˆØÐ#Ó#Ü/°Õ>Ü˜×*Ñ*Ü�G˜F˜8Ð#5°a°SÐ8RÐSÔTÙä˜Q‘ˆÜ�}Ó(ˆØˆ> Õ&Ø�L‰L˜&˜Ö(ò r#   c                 óP   •  [         U    $ ! [         a    [        SU  S35      ef = f)z›Return plugin meta-data.

Parameters
----------
plugin : str
    Name of plugin.

Returns
-------
m : dict
    Meta data as specified in plugin ``.ini``.

zNo information on plugin "Ú")r^   ÚKeyErrorrz   )rB   s    r$   r   r   h  s9   € ð(AÜ Ñ'Ð'øÜó AÜÐ5°f°X¸QÐ?Ó@Ð@ðAús   ‚ ‹%c                  óp   • 0 n [          H#  n[         U    VVs/ s H  u  p#UPM	     snnX'   M%     U $ s  snnf )z¿Return the currently preferred plugin order.

Returns
-------
p : dict
    Dictionary of preferred plugin order, with function name as key and
    plugins (in order of preference) as value.

r+   )r1   ru   Úplugin_namerw   s       r$   r   r   ‚  s>   € ð  	€AßˆÜ7CÀDÒ7IÔJÒ7IÑ#3 K“;Ñ7IÒJˆ‹ñ à€Hùó Ks   ˜2)FrG   )"Ú__doc__Úos.pathrX   r   Úconfigparserr   r   Ú
contextlibr   Ú_shared.utilsr   Ú
collectionr	   Ú__all__r,   rc   re   r^   r5   r%   r-   r:   r4   r   rR   rk   r   r   r   r
   r�   r}   r   r   r"   r#   r$   Ú<module>r       sØ  ðñó$ Û Ý %Ý Ý %å *Ý 1ò€ð €à€àÐ àÐ ò
 ,ØˆnØ&˜ñ	Ð ð ñ	ó ð	ò
ñ 'Õ(ÙÔ÷ )ò7òñ ØØð
=ññ"óð"ò
òCñD 'Õ(Ù„O÷ )ñ ØØð
=ñóóðñ: 'Õ(Ù/Ó1Ð÷ )ñ ØØð
=ññ%!óð%!ñP ØØð
=ñó2 óð2 òj3ñ #Ó$ñ )ó %ð )ñF ØØð
=ññAóðAñ( ØØð
=ññóñ÷k	 )Õ(ú÷j )Õ(ú÷N )Õ(ús$   ÁDÂDÂ)D&Ä
DÄ
D#Ä&
D4