+
    ?i
                     P    R t ^RIHtHt RsR tRt]R,           t ! R R]4      tR# )am  Read/Write images using SimpleITK.

Backend: `Insight Toolkit <https://itk.org/>`_

.. note::
    To use this plugin you have to install its backend::

        pip install imageio[itk]

The ItkFormat uses the ITK or SimpleITK library to support a range of
ITK-related formats. It also supports a few common formats (e.g. PNG and JPEG).

Parameters
----------
None

)Format
has_moduleNc                      ^ RI s\        P                  s\        P                  s\        #   \         dH     ^ RIs\        P                  s\        P                  s \        #   \         d    \        R4      hi ; ii ; i)    Nzitk could not be found. Please try   python -m pip install itk or   python -m pip install simpleitk or refer to   https://itkpythonpackage.readthedocs.io/ for further instructions.)
itk_itkimread_read_functionimwrite_write_functionImportError	SimpleITK	ReadImage
WriteImage     W/var/www/html/photoedit/myenv/lib/python3.14/site-packages/imageio/plugins/simpleitk.pyload_libr      sx    ,,$ K#  	$!^^N"ooO K  
	,	 	
	s   $, A>$A##A::A>c                      a  ] tR t^Zt o RtR tR t ! R R]P                  4      t ! R R]P                  4      t	Rt
V tR	# )
	ItkFormatz$See :mod:`imageio.plugins.simpleitk`c                    VP                   \        9   d   R # \        R4      '       g   \        R4      '       d   VP                   \        9   # R# Tzitk.ImageIOBaser   N	extensionITK_FORMATSr   ALL_FORMATSselfrequests   &&r   	_can_readItkFormat._can_read]   sB    
 +'((J{,C,C$$33 -Dr   c                    VP                   \        9   d   R # \        R4      '       g   \        R4      '       d   VP                   \        9   # R# r   r   r   s   &&r   
_can_writeItkFormat._can_writeg   s@    +'((J{,C,C$$33 -Dr   c                   B   a  ] tR t^ot o RR ltR tR tR tR tRt	V t
R# )	ItkFormat.ReaderNc                    \         '       g   \        4        RpVe   WA3,          pVe
   WB3,          p\        V P                  P	                  4       .VO5!  V n        R # )Nr   )r   r   r	   r   get_local_filename_img)r   
pixel_typefallback_onlykwargsargss   &&&, r   _openItkFormat.Reader._openp   sP    4
D%% ,,,D&t||'F'F'HP4PDIr   c                    ^# )   r   r   s   &r   _get_lengthItkFormat.Reader._get_lengthz   s    r   c                    R # Nr   r1   s   &r   _closeItkFormat.Reader._close}       r   c                l    V^ 8w  d   Rp\        V4      h\        P                  V P                  4      / 3# )r   z.Index out of range while reading from itk file)
IndexErrorr   GetArrayFromImager(   r   index	error_msgs   && r   	_get_dataItkFormat.Reader._get_data   s5    zL	 ++ ))$))4b88r   c                    R p\        V4      hz5The itk plugin does not support meta data, currently.RuntimeErrorr<   s   && r   _get_meta_dataItkFormat.Reader._get_meta_data       OIy))r   )r(   )NN)__name__
__module____qualname____firstlineno__r-   r2   r6   r?   rE   __static_attributes____classdictcell____classdict__s   @r   Readerr%   o   s$     	Q			9	* 	*r   rP   c                   8   a  ] tR t^t o R tR tR tR tRtV t	R# )ItkFormat.Writerc                6    \         '       g   \        4        R # R # r5   )r   r   r1   s   &r   r-   ItkFormat.Writer._open   s    4
 r   c                    R # r5   r   r1   s   &r   r6   ItkFormat.Writer._close   r8   r   c                v    \         P                  V4      p\        W0P                  P	                  4       4       R # r5   )r   GetImageFromArrayr   r   r'   )r   immeta_itk_imgs   &&& r   _append_dataItkFormat.Writer._append_data   s'    --b1HHll&E&E&GHr   c                    R p\        V4      hrB   rC   )r   rZ   r>   s   && r   set_meta_dataItkFormat.Writer.set_meta_data   rG   r   r   N)
rH   rI   rJ   rK   r-   r6   r\   r_   rL   rM   rN   s   @r   WriterrR      s     			I	* 	*r   ra   r   N)rH   rI   rJ   rK   __doc__r   r"   r   rP   ra   rL   rM   rN   s   @r   r   r   Z   s7     .44* *>* * *r   r   )z.giplz.iplz.mhaz.mhdz.nhdrniahdrz.nrrdz.niiz.nii.gzz.imgz.img.gzz.vtkhdf5lsmmncmnc2mghrg   pic)	z.bmpz.jpegz.jpgz.pngz.tiffz.tifz.dicomz.dcmz.gdcm)	rb   corer   r   r   r   r   r   r   r   r   r   <module>rl      s?   $ &8,  
 
B* B*r   