+
    åûj!]  ã                  óœ  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
HtHtHtHtHt ^ RIt. R0OtR R ltR R lt ! R R	]4      t ! R
 R]4      t/ RR]P,                  3bRR]P,                  3bRR]P.                  3bRR]P.                  3bRR]P0                  3bRR]P0                  3bRR1bRR1bRR]P2                  3bRR]P2                  3bRR2bRR2bRR]P4                  3bRR]P4                  3bRR ]P6                  3bR!R ]P6                  3btR"]R#&   R3tR$ R% ltR& R' lt R( R) lt!R* R+ lt"R4R, R- llt#R4R. R/ llt$R# )5a  Read and write point clouds as ASCII or binary PLY files of x, y, z vertices.

The writers store one ``vertex`` per row of a channels-last ``(*, 3)`` tensor, with only the ``double`` properties
``x``, ``y`` and ``z``. The readers parse the PLY header, read the ``x``, ``y`` and ``z`` of the ``vertex`` element
whatever their scalar type, skip other vertex properties such as normals and colours and other elements such as
faces (each reader says which ``list`` properties it rejects), and return a float32 ``(N, 3)`` tensor on the CPU.
Every function takes a ``str`` or ``os.PathLike[str]`` ending in ``.ply``.

Which function to use:

- A text file: :func:`save_pointcloud_ply` writes one, :func:`load_pointcloud_ply` reads one.
- A binary file: :func:`save_pointcloud_ply_binary` writes one in little-endian float64, 24 bytes per point, and
  :func:`load_pointcloud_ply_binary` reads one in either byte order and with any PLY scalar type.
- The points of a depth map, to write: :func:`~kornia.geometry.depth.depth_to_3d_v2` returns them channels-last.
)ÚannotationsN)ÚBinaryIOÚDictÚListÚ
NamedTupleÚOptionalÚTuplec               ó$   € V ^8„  d   QhRRRRRR/# ©é   Úfilenameústr | os.PathLike[str]Ú
pointcloudútorch.TensorÚreturnÚNone© )Úformats   "ÚVC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\geometry\pointcloud.pyÚ__annotate__r   5   s(   € ÷ G0ñ G0Ð"8ð G0Àlð G0ÐW[ñ G0ó    c                óœ  € \         P                  ! V 4      p \        V \        4      '       d&   V P	                  4       P                  R4      '       g   \        RV : 24      h\        P                  ! V4      '       g   \        R\        V4       24      hVP                  ^8  g   VP                  R,          ^8w  d"   \        R\        VP                  4       24      hVP                  R^4      pVP                  ^ ,          p\        V RRR7      ;_uu_ 4       pVP                  RR	R
RV R2RRRR.4       V^ 8”  ds   VP!                  4       P#                  4       P%                  \        P&                  4      pVP)                  4        F#  w  rgpVP+                  V: RV: RV: R24       K%  	  RRR4       R#   + '       g   i     R# ; i)aN  Write a point cloud to an ASCII PLY file as double-precision x, y, z vertices.

``save_pointcloud_ply(filename, pointcloud)`` writes the points of a channels-last tensor ``(*, 3)`` with at least
two dimensions, on any device, to a text PLY file, replacing any existing file, and returns ``None``. The file
holds the coordinates only: no normals, colours or faces. Read it back with :func:`load_pointcloud_ply`, which
returns float32, so float64 coordinates come back rounded to float32; for a binary file, use
:func:`save_pointcloud_ply_binary` instead.

Convention:
    - The file holds one ``vertex`` per row of ``pointcloud.reshape(-1, 3)``, in order and with none dropped,
      and declares the properties ``x``, ``y`` and ``z`` in that order as ``double``. Each value is printed as
      the shortest text that parses back to the same float64, a non-finite one as ``nan`` / ``inf``.
    - ``pointcloud`` is channels-last. Apply ``permute(0, 2, 3, 1)`` to a
      :func:`~kornia.geometry.depth.depth_to_3d` result or use :func:`~kornia.geometry.depth.depth_to_3d_v2`:
      a channels-first tensor whose width is 3 passes the shape check and is written scrambled.
    - The PLY writers and loaders take ``filename`` as a ``str`` or ``os.PathLike[str]`` ending in ``.ply``
      (any case); another suffix raises ``TypeError``.

Args:
    filename: path of the ``.ply`` file to write, a ``str`` or ``os.PathLike[str]``.
    pointcloud: tensor of shape ``(*, 3)`` with at least two dimensions, where the last dimension is the
      point :math:`(X, Y, Z)`.

Raises:
    TypeError: if ``filename`` is not a ``str`` or ``os.PathLike[str]`` ending in ``.ply``, if ``pointcloud`` is
        not a tensor, or if it has fewer than two dimensions or a last dimension other than 3.

See Also:
    - :func:`load_pointcloud_ply`: reads the file back, as a float32 ``(N, 3)`` tensor.
    - :func:`save_pointcloud_ply_binary`: writes the same vertices as little-endian float64 instead of text.
    - :func:`~kornia.geometry.depth.depth_to_3d_v2`: returns the channels-last ``(*, H, W, 3)`` points of a
      depth map, ready to write.
ú.plyúNInput filename must be a str or os.PathLike[str] with the .ply extension. Got ú1Input pointcloud type is not a torch.Tensor. Got ú/Input pointcloud must have shape (..., 3). Got Úwúutf-8)Úencodingúply
zformat ascii 1.0
zcomment arraiy generated
úelement vertex Ú
úproperty double x
úproperty double y
úproperty double z
úend_header
Ú Néÿÿÿÿ)ÚosÚfspathÚ
isinstanceÚstrÚlowerÚendswithÚ	TypeErrorÚtorchÚ	is_tensorÚtypeÚndimÚshapeÚtupleÚreshapeÚopenÚ
writelinesÚdetachÚcpuÚtoÚfloat64ÚtolistÚwrite)	r   r   ÚxyzÚ
num_pointsÚfÚarrÚxÚyÚzs	   &&       r   Úsave_pointcloud_plyrE   5   s‡  € ôD �yŠy˜Ó"€HÜ�x¤×%Ò%¨(¯.©.Ó*:×*CÑ*CÀF×*KÒ*KÜÐhÐiqÑhtÐuÓvÐvä�?Š?˜:×&Ò&ÜÐKÌDÐQ[ÓL\ÐK]Ð^Ó_Ð_à‡�˜Ô˜j×.Ñ.¨rÕ2°aÔ7ÜÐIÌ%ÐPZ×P`ÑP`ÓJaÐIbÐcÓdÐdð ×
Ñ
˜R Ó
#€CØ—‘˜1•€Jä	ˆh˜ g×	.Õ	.°!à	�‰àØ$Ø,Ø! * ¨RÐ0Ø%Ø%Ø%Øð	ô	
ð ˜Œ>à—*‘*“,×"Ñ"Ó$×'Ñ'¬¯©Ó6ˆCð Ÿ:™:ž<‘��aØ—‘˜1™%˜q ¡ Q q¡e¨2Ð.Ö/ñ (÷+ 
/×	.×	.Ò	.ús   ÄBF:Æ:G	c               ó$   € V ^8„  d   QhRRRRRR/# r
   r   )r   s   "r   r   r      s(   € ÷ @*ñ @*Ð)?ð @*È\ð @*Ð^bñ @*r   c           
     ó,  € \         P                  ! V 4      p \        V \        4      '       d&   V P	                  4       P                  R4      '       g   \        RV : 24      h\        P                  ! V4      '       g   \        R\        V4       24      hVP                  ^8  g   VP                  R,          ^8w  d"   \        R\        VP                  4       24      hVP                  R^4      pVP                  ^ ,          p\        V R4      ;_uu_ 4       pRRRR	V R
2RRRR.pVP                  R V 4       4       V^ 8”  d´   VP!                  4       P#                  4       P%                  \        P&                  4      P                  R4      p\(        P(                  ! RVP+                  4       4      p\,        P.                  R8X  d   VP1                  4        VP3                  VP5                  4       4       RRR4       R#   + '       g   i     R# ; i)a¡  Write a point cloud to a little-endian binary PLY file as float64 x, y, z vertices.

``save_pointcloud_ply_binary(filename, pointcloud)`` writes the points of a channels-last tensor ``(*, 3)`` with
at least two dimensions, on any device, to a ``binary_little_endian`` PLY file, 24 bytes per point,
replacing any existing file, and returns ``None``. Read it back with :func:`load_pointcloud_ply_binary`; for a
text file, use :func:`save_pointcloud_ply` instead.

See the Convention block on :func:`save_pointcloud_ply`; the payload is little-endian float64.

Args:
    filename: path of the ``.ply`` file to write, a ``str`` or ``os.PathLike[str]``.
    pointcloud: tensor of shape ``(*, 3)`` with at least two dimensions, where the last dimension is the
      point :math:`(X, Y, Z)`.

Raises:
    TypeError: if ``filename`` is not a ``str`` or ``os.PathLike[str]`` ending in ``.ply``, if ``pointcloud`` is
        not a tensor, or if it has fewer than two dimensions or a last dimension other than 3.

See Also:
    - :func:`load_pointcloud_ply_binary`: reads the file back, as a float32 ``(N, 3)`` tensor.
    - :func:`save_pointcloud_ply`: writes the same vertices as text instead.
r   r   r   r   Úwbr   z format binary_little_endian 1.0
zcomment kornia generated
r    r!   r"   r#   r$   r%   c              3  óB   "  € T F  qP                  R 4      x € K  	  R# 5i)r   N)Úencode)Ú.0Úss   & r   Ú	<genexpr>Ú-save_pointcloud_ply_binary.<locals>.<genexpr>±   s   é € Ð7±¨1—X‘X˜g×&Ð&³ùs   ‚ÚdÚbigNr'   )r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   Úarrayr<   ÚsysÚ	byteorderÚbyteswapr=   Útobytes)r   r   r>   r?   r@   ÚheaderrA   Ú
data_arrays   &&      r   Úsave_pointcloud_ply_binaryrX      s­  € ô. �yŠy˜Ó"€HÜ�x¤×%Ò%¨(¯.©.Ó*:×*CÑ*CÀF×*KÒ*KÜÐhÐiqÑhtÐuÓvÐvä�?Š?˜:×&Ò&ÜÐKÌDÐQ[ÓL\ÐK]Ð^Ó_Ð_à‡�˜Ô˜j×.Ñ.¨rÕ2°aÔ7ÜÐIÌ%ÐPZ×P`ÑP`ÓJaÐIbÐcÓdÐdð ×
Ñ
˜R Ó
#€CØ—‘˜1•€Jä	ˆh˜×	Ô	 ð Ø/Ø(Ø˜j˜\¨Ð,Ø!Ø!Ø!Øð	
ˆð 	
�‰Ñ7±Ó7Ô7à˜Œ>à—*‘*“,×"Ñ"Ó$×'Ñ'¬¯©Ó6×>Ñ>¸rÓBˆCô Ÿš S¨#¯*©*«,Ó7ˆJô �}‰} Ô%Ø×#Ñ#Ô%ð �G‰G�J×&Ñ&Ó(Ô)÷5 
×	×	Ò	ús   ÄC!HÈH	c                  ó6   € ] tR t^Ât$ R]R&   R]R&   R]R&   RtR# )	Ú_PlyElementr+   ÚnameÚintÚcountzList[Tuple[str, Optional[str]]]Ú
propertiesr   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__Ú__static_attributes__r   r   r   rZ   rZ   Â   s   ‡ Ø
ƒIØƒJà/×/r   rZ   c                  ó,   € ] tR t^Ét$ R]R&   R]R&   RtR# )Ú
_PlyHeaderr+   r   zList[_PlyElement]Úelementsr   Nr_   r   r   r   rg   rg   É   s   ‡ ØƒKØ×r   rg   ÚcharÚbÚint8ÚucharÚBÚuint8ÚshortÚhÚint16ÚushortÚuint16r\   ÚiÚint32ÚuintÚuint32Úfloatr@   Úfloat32ÚdoublerO   r;   z,Dict[str, Tuple[str, Optional[torch.dtype]]]Ú_PLY_SCALAR_TYPESc               ó$   € V ^8„  d   QhRRRRRR/# )r   r@   r   r   r+   r   rg   r   )r   s   "r   r   r   ä   s!   € ÷ 8%ñ 8%˜ð 8%¨Cð 8%°Jñ 8%r   c                ó�  € V P                  4       P                  4       R8w  d   \        V: R24      hRp. p V P                  4       pV'       g   \        RV: R24      hVP                  RRR7      P	                  4       pV'       g   KT  V^ ,          pVR	8X  d   EMÝVR9   d   Ko  VR
8X  dB   \        V4      ^8  g   V^,          \        9  d   \        RV: RV: R24      hV^,          pK·  VR8X  dx   \        V4      ^8w  d   \        RV: RV: R24      h \        V^,          4      pT^ 8  d   \        RT: RT R24      hTP                  \        T^,          T. 4      4       EK5  VR8X  dô   V'       g   \        RV: R24      h\        V4      ^8X  dH   V^,          \        9   d6   VR,          P                  P                  V^,          V^,          34       EK«  \        V4      ^8X  da   V^,          R8X  dS   V^,          \        9   dA   V^,          \        9   d/   VR,          P                  P                  V^,          R34       EK  \        RV: RV: R24      h\        RV: RV: R24      hVf   \        RV: R24      h\        W#4      #   \         d"   p\        RT^,          : RT: R24      ThRp?ii ; i)zÐParse a PLY header up to and including ``end_header``.

Leaves the file positioned at the first byte of the element data. The whole header is ASCII by
definition of the format, whatever the payload encoding.
s   plyz1 is not a PLY file: the first line must be 'ply'.NzPLY header in z has no 'end_header' line.ÚasciiÚreplace)ÚerrorsÚ
end_headerr   zUnsupported PLY format line ú in Ú.ÚelementzMalformed PLY element line zInvalid PLY element count z*PLY element count must be non-negative in z. Got Úpropertyz#PLY property before any element in ÚlistzMalformed PLY property line zUnknown PLY header keyword z has no 'format' line.)ÚcommentÚobj_infor'   )ÚreadlineÚstripÚ
ValueErrorÚdecodeÚsplitÚlenÚ_PLY_FORMATSr\   ÚappendrZ   r{   r^   rg   )	r@   r   Úfmtrh   ÚrawÚtokensÚkeywordr]   Úexcs	   &&       r   Ú_read_ply_headerr–   ä   s«  € ð 	‡z�zƒ|×ÑÓ˜vÔ%Ü˜H™<Ð'XÐYÓZÐZà€CØ"$€HØ
Ø�j‰j‹lˆßÜ˜~¨h©\Ð9SÐTÓUÐUØ—‘˜G¨I�Ó6×<Ñ<Ó>ˆßÙØ˜•)ˆØ�lÔ"ÙØÐ-Ô-ÙØ�hÔÜ�6‹{˜QŒ &¨¥)´<Ô"?Ü Ð#?À¹wÀdÈ8É,ÐVWÐ!XÓYÐYØ˜•)ŠCØ˜	Ô!Ü�6‹{˜aÔÜ Ð#>¸s¹gÀTÈ(ÉÐUVÐ!WÓXÐXðgÜ˜F 1�I›�ð �qŒyÜ Ð#MÈhÉ\ÐY_Ð`eÐ_fÐfgÐ!hÓiÐiØ�O‰OœK¨¨q­	°5¸"Ó=×>Ø˜
Ô"ßÜ Ð#FÀxÁlÐRSÐ!TÓUÐUÜ�6‹{˜aÔ F¨1¥IÔ1BÔ$BØ˜•×'Ñ'×.Ñ.°°qµ	¸6À!½9Ð/E×Fä�F“˜qÔ Ø˜1•I Ô'Ø˜1•IÔ!2Ô2Ø˜1•IÔ!2Ô2à˜•×'Ñ'×.Ñ.°°qµ	¸4Ð/@×Aä Ð#?À¹wÀdÈ8É,ÐVWÐ!XÓYÐYäÐ:¸7¹+ÀTÈ(ÉÐUVÐWÓXÐXà
‚{Ü˜>¨(©Ð5KÐLÓMÐMÜ�cÓ$Ð$øô1 ô gÜ Ð#=¸fÀQ½i¹]È$ÈxÉlÐZ[Ð!\Ó]ÐcfÐfûðgús   ÄJ ÊKÊ$K Ë Kc               ó$   € V ^8„  d   QhRRRRRR/# )r   rV   rg   r   r+   r   z-Tuple[int, _PlyElement, Tuple[int, int, int]]r   )r   s   "r   r   r     s'   € ÷ Mñ M˜zð M°Sð MÐ=jñ Mr   c           	     óä  € \        V P                  4       F›  w  r#VP                  R8X  g   K  VP                   F  w  rEVe   K  \	        RV: RV: R24      h	  VP                   UUu. uF  w  rFVNK	  	  ppp VP                  R4      VP                  R4      VP                  R4      3pY#T3u # 	  \	        RV: R24      hu uppi   \         d   p	\	        RT: R	T R
24      T	hRp	?	ii ; i)zOLocate the ``vertex`` element and the column indices of ``x``, ``y`` and ``z``.ÚvertexNzPLY vertex element in ú has a list property zJ; list properties are only supported in elements that follow the vertices.rB   rC   rD   z) must declare x, y and z properties. Got rƒ   ú	PLY file z declares no 'vertex' element.)Ú	enumeraterh   r[   r^   r‹   Úindex)
rV   r   r�   r„   r[   Úscalar_typeÚ_Únamesr>   r•   s
   &&        r   Ú_ply_vertex_layoutr¡     s  € ä# F§O¡OÖ4‰ˆØ�<‰<˜8Ö#Ø%,×%7Ô%7Ñ!�ØÔ&ô %Ø0°±Ð<QÐRVÑQYð Zcð cóð ñ &8ð *1×);Ò);Ô<Ñ);™g˜d“TÑ);ˆEÑ<ðØ—{‘{ 3Ó'¨¯©°SÓ)9¸5¿;¹;ÀsÓ;KÐL�ð
  3Ð&Ò&ñ% 5ô& �y ¡Ð,JÐKÓ
LÐLùó =øô ô Ü Ø,¨X©LÐ8aÐbgÐahÐhiÐjóàðûðús   Á*CÁ;2CÃC/ÃC*Ã*C/c               ó    € V ^8„  d   QhRRRR/# )r   Úheader_sizeúOptional[int]r   r   r   )r   s   "r   r   r   7  s   € ÷ 
ñ 
 =ð 
°Tñ 
r   c                óL   € V e    \         P                  ! R\        ^R7       R # R # )Nz‹`header_size` is ignored since kornia 0.9.0: the PLY header is parsed up to `end_header`. The argument will be removed in a future release.)Ú
stacklevel)ÚwarningsÚwarnÚDeprecationWarning)r£   s   &r   Ú_warn_header_sizerª   7  s%   € ØÒÜ�Šð@äØ÷		
ñ r   c               ó    € V ^8„  d   QhRRRR/# )r   r   r+   r   r   r   )r   s   "r   r   r   A  s   € ÷ Dñ D #ð D¨$ñ Dr   c                óú   € \        V \        4      '       d&   V P                  4       P                  R 4      '       g   \	        RV : 24      h\
        P                  P                  V 4      '       g   \        R4      hR# )r   r   z'Input filename is not an existing file.N)	r*   r+   r,   r-   r.   r(   ÚpathÚisfiler‹   )r   s   &r   Ú_check_ply_filenamer¯   A  s_   € Ü�x¤×%Ò%¨(¯.©.Ó*:×*CÑ*CÀF×*KÒ*KÜÐhÐiqÑhtÐuÓvÐvÜ�7‰7�>‰>˜(×#Ò#ÜÐBÓCÐCñ $r   c               ó$   € V ^8„  d   QhRRRRRR/# ©r   r   r   r£   r¤   r   r   r   )r   s   "r   r   r   H  s-   € ÷ JDñ JDÐ"8ð JDÀ}ð JDÐ`lñ JDr   c                óÚ  € \         P                  ! V 4      p \        V 4       \        V4       \	        V R4      ;_uu_ 4       p\        W 4      pVP                  R8w  d   \        V : RVP                   R24      h\        W04      w  rEpVP                  RV  FS  p\        VP                  4       F7  pVP                  4       '       d   K  \        RV : RVP                  : R24      h	  KU  	  \        VP                  4      p	Vw  r«p. p\        VP                  4       FÏ  pVP                  4       pV'       g!   \        RV : R	VP                   R
V R24      hVP!                  4       p\        V4      V	8  d0   \        RV : R	VP                   RV	 RV R\        V4       R24      h VP#                  \%        VV
,          4      \%        VV,          4      \%        VV,          4      34       KÑ  	  RRR4       \&        P(                  ! X\&        P*                  R7      P-                  R^4      #   \         d   p\        RT : RT RT R24      ThRp?ii ; i  + '       g   i     Lp; i)aW  Read the x, y, z vertices of an ASCII PLY file into a float32 ``(N, 3)`` tensor.

``points = load_pointcloud_ply(filename)`` reads an ASCII PLY file and returns the ``x``, ``y`` and ``z`` of its
``N`` vertices as a float32 ``(N, 3)`` tensor on the CPU, so a float64 cloud written by
:func:`save_pointcloud_ply` comes back rounded to float32. For a binary PLY file, use
:func:`load_pointcloud_ply_binary` instead.

The header is parsed up to ``end_header``; the number of points comes from the
``element vertex N`` declaration and the coordinates from the ``x``, ``y`` and ``z``
properties, whatever other properties (normals, colours) or elements (faces) the file carries.
A ``list`` property among the vertex properties is rejected, since it spans a variable number of
tokens and would shift every column after it. See the Convention block on :func:`save_pointcloud_ply`.

Args:
    filename: path of an existing ``.ply`` file, a ``str`` or ``os.PathLike[str]``.
    header_size: deprecated and ignored, with a ``DeprecationWarning`` when given; the header is parsed instead
        of skipped.

Return:
    tensor containing the loaded points with shape ``(N, 3)`` in ``float32``, where
    :math:`N` is the declared vertex count.

Raises:
    TypeError: if ``filename`` is not a ``str`` or ``os.PathLike[str]`` ending in ``.ply``.
    ValueError: if the file does not exist or does not start with a well-formed PLY header; if it is a binary
        PLY file; if it has no ``vertex`` element, no ``x``, ``y`` or ``z`` vertex property, or a ``list`` vertex
        property; or if the payload ends early, a vertex has fewer values than declared properties, or a
        coordinate is not a number.

See Also:
    - :func:`save_pointcloud_ply`: writes the ASCII files this function reads.
    - :func:`load_pointcloud_ply_binary`: reads a binary PLY file, little- or big-endian.
Úrbr~   z is a z7 PLY file; use `load_pointcloud_ply_binary` to read it.Nr›   z ends inside element rƒ   ú
 declares z% vertices but the payload ends after z	 of them.z vertices with z properties, but vertex z has z values.z( has a non-numeric coordinate on vertex z: ©Údtyper'   )r(   r)   r¯   rª   r6   r–   r   r‹   r¡   rh   Úranger]   r‰   r[   rŽ   r^   r�   Úextendrx   r/   Útensorry   r5   )r   r£   r@   rV   Úvertex_indexr™   r>   r„   rŸ   Únum_columnsÚindex_xÚindex_yÚindex_zÚpointsÚrowÚliner“   r•   s   &&                r   Úload_pointcloud_plyrÂ   H  sJ  € ôD �yŠy˜Ó"€HÜ˜Ô!Ü�kÔ"ä	ˆh˜×	Ô	 Ü! !Ó.ˆØ�=‰=˜GÔ#ÜØ‘,˜f V§]¡] OÐ3jÐkóð ô %7°vÓ$HÑ!ˆ˜cð —‘ }¨Ó5ˆGÜ˜7Ÿ=™=Ö)�Ø—z‘z—|”|Ü$ y°±Ð<QÐRY×R^ÑR^ÑQaÐabÐ%cÓdÐdó *ñ 6ô
 ˜&×+Ñ+Ó,ˆð %(Ñ!ˆ˜'Ø ˆÜ˜Ÿ™Ö&ˆCØ—:‘:“<ˆDßÜ Ø ™|¨:°f·l±l°^ÐChÐilÐhmÐmvÐwóð ð —Z‘Z“\ˆFÜ�6‹{˜[Ô(Ü Ø ™|¨:°f·l±l°^À?ÐS^ÐR_ð `"Ø"%  e¬C°«K¨=¸ðBóð ðyØ—‘œu V¨G¥_Ó5´u¸VÀG½_Ó7MÌuÐU[Ð\cÕUdÓOeÐfÖgñ '÷' 
ôH �<Š<˜¤e§m¡mÔ4×<Ñ<¸RÀÓCÐCøô ô yÜ  9¨X©LÐ8`ÐadÐ`eÐegÐhkÐglÐlmÐ!nÓoÐuxÐxûðyú÷C 
×	ús9   ÁBIÃ
CIÆ*AH0Ç.IÈ0I	È;I	ÉI	ÉIÉI*	c               ó$   € V ^8„  d   QhRRRRRR/# r±   r   )r   s   "r   r   r   •  s-   € ÷ YVñ YVÐ)?ð YVÈmð YVÐgsñ YVr   c                óÐ  a a€ \         P                  ! S 4      o \        S 4       \        V4       \	        S R4      ;_uu_ 4       p\        VS 4      pVP                  R8X  d   \        S : R24      hVP                  R8X  d   RMRo\        VS 4      w  rEpR VV 3R llpVP                  R	V  Fa  pVP                  ^ 8”  g   K  VP                  VP                  \        P                  ! V! V4      4      ,          \         P                  4       Kc  	  V! V4      p	\        P                  ! V	4      p
VP                  V
,          pVP                  V4      p\!        V4      V8w  d-   \        R
S : RVP                   RV R\!        V4       R2	4      h R	R	R	4       XP                  ^ 8X  d'   \"        P$                  ! R\"        P&                  R7      # VP(                   UUu0 uF  w  rÞVkK	  	  ppp\!        V4      ^8X  dß   \*        \-        \/        V4      4      ,          w  ppVe¹   \0        P0                  ! VX4      pSR8H  \2        P4                  R8H  8w  d   VP7                  4        \"        P8                  ! VVR7      P;                  VP                  \!        VP(                  4      4      pVR\=        X4      3,          P?                  \"        P&                  4      # \        P@                  ! X	X4      p\"        PB                  ! V UUu. uF  pX Uu. uF  pVV,          NK  	  upNK  	  upp\"        P&                  R7      #   + '       g   i     EL»; iu uppi u upi u uppi )a/  Read the x, y, z vertices of a big- or little-endian binary PLY file as ``(N, 3)``.

``points = load_pointcloud_ply_binary(filename)`` reads a ``binary_little_endian`` or ``binary_big_endian`` PLY
file and returns the ``x``, ``y`` and ``z`` of its ``N`` vertices as a float32 ``(N, 3)`` tensor on the CPU, so a
float64 cloud written by :func:`save_pointcloud_ply_binary` comes back rounded to float32. For an ASCII PLY file,
use :func:`load_pointcloud_ply` instead.

The header is parsed up to ``end_header``; the number of points comes from the
``element vertex N`` declaration and the coordinates from the ``x``, ``y`` and ``z``
properties, whatever their scalar type. Extra vertex properties (normals, colours) are skipped,
and so are elements that follow the vertices (faces). Both little- and big-endian payloads are
read. A ``list`` property is only supported in elements that *follow* the vertices. Among the
vertex properties, or in an element that precedes them, its byte length is unknown without
parsing it, so such a file is rejected. See the Convention block on :func:`save_pointcloud_ply`.

Args:
    filename: path of an existing ``.ply`` file, a ``str`` or ``os.PathLike[str]``.
    header_size: deprecated and ignored, with a ``DeprecationWarning`` when given; the header is parsed instead
        of skipped.

Return:
    tensor containing the loaded points with shape ``(N, 3)`` in ``float32``, where
    :math:`N` is the declared vertex count.

Raises:
    TypeError: if ``filename`` is not a ``str`` or ``os.PathLike[str]`` ending in ``.ply``.
    ValueError: if the file does not exist or does not start with a well-formed PLY header; if it is an ASCII
        PLY file; if it has no ``vertex`` element or no ``x``, ``y`` or ``z`` vertex property; if a ``list``
        property is among the vertex properties or in an element before them; or if fewer bytes follow the
        header than the vertices need.

See Also:
    - :func:`save_pointcloud_ply_binary`: writes the little-endian files this function reads.
    - :func:`load_pointcloud_ply`: reads an ASCII PLY file.
r³   r~   z< is an ASCII PLY file; use `load_pointcloud_ply` to read it.Úbinary_little_endianÚ<Ú>c               ó    € V ^8„  d   QhRRRR/# )r   r„   rZ   r   r+   r   )r   s   "r   r   Ú0load_pointcloud_ply_binary.<locals>.__annotate__Ä  s   € ÷ 		+ñ 		+ Kð 		+°Cñ 		+r   c           
     óô   <€ . pV P                    FN  w  r#Vf#   \        RV P                  : RS: RV: R24      hVP                  \        V,          ^ ,          4       KP  	  SRP                  V4      ,           # )NzPLY element r‚   rš   z>; list properties are only supported after the vertex element.Ú )r^   r‹   r[   r�   r{   Újoin)r„   Úcodesr[   rž   Úendianr   s   &   €€r   Úelement_structÚ2load_pointcloud_ply_binary.<locals>.element_structÄ  s„   ø€ ØˆEØ%,×%7Ô%7Ñ!�ØÒ&Ü$Ø& w§|¡|Ñ&6°d¸8¹,ÐF[Ð\`Ñ[cð dWð Wóð ð —‘Ô.¨{Õ;¸AÕ>Ö?ñ &8ð ˜BŸG™G E›NÕ*Ð*r   Nr›   r´   z vertices (z bytes) but only z bytes follow the header.rµ   Úlittle:NNN)é    é   )"r(   r)   r¯   rª   r6   r–   r   r‹   r¡   rh   r]   ÚseekÚstructÚcalcsizeÚSEEK_CURÚreadrŽ   r/   Úemptyry   r^   r{   ÚnextÚiterrQ   rR   rS   rT   Ú
frombufferr5   r†   r:   Úiter_unpackr¹   )r   r£   r@   rV   rº   r™   r>   rÏ   r„   Úvertex_formatÚstrideÚexpectedÚdatarŸ   rž   Úscalar_typesÚcoder¶   ÚvaluesÚtableÚrowsrÀ   rt   rÎ   s   f&                     @r   Úload_pointcloud_ply_binaryrç   •  s¹  ù€ ôH �yŠy˜Ó"€HÜ˜Ô!Ü�kÔ"ä	ˆh˜×	Ô	 Ü! ! XÓ.ˆØ�=‰=˜GÔ#Ü ™|Ð+gÐhÓiÐiØŸ™Ð)?Ô?‘ÀSˆÜ$6°v¸xÓ$HÑ!ˆ˜c÷		+ñ 		+ð —‘ }¨Ó5ˆGØ�}‰}˜qÖ Ø—‘�w—}‘}¤v§¢±~ÀgÓ7NÓ'OÕOÔQS×Q\ÑQ\Ö]ñ 6ñ ' vÓ.ˆÜ—’ Ó/ˆØ—<‘< &Õ(ˆØ�v‰v�hÓˆÜˆt‹9˜Ô ÜØ˜H™< z°&·,±,°¸{È8È*ð UÜ ›I˜;Ð&?ðAóð ð !÷5 
ð@ ‡|�|�qÔÜ�{Š{˜6¬¯©Ô7Ð7à6<×6GÒ6GÔHÑ6G¡N A“KÑ6G€LÑHÜ
ˆ<Ó˜AÔÜ'¬¬T°,Ó-?Ó(@ÕA‰ˆˆeØÒä—[’[  tÓ,ˆFØ˜#‘¤3§=¡=°HÑ#<Ô=Ø—‘Ô!Ü×$Ò$ V°5Ô9×AÑAÀ&Ç,Á,ÔPSÐTZ×TeÑTeÓPfÓgˆEà˜œD ›I˜Õ&×)Ñ)¬%¯-©-Ó8Ð8ô ×Ò˜m¨TÓ2€DÜ�<Š<¹$Ô?¹$°3©#Ó.©# Q˜#˜aŸ&˜&©#Ô.¹$Ò?ÄuÇ}Á}ÔUÐU÷c 
×	Ð	üóF Iùò /ùÓ?s2   ÁA;MÃCMÇMÌ		M"
ÌMÌ$M"
ÍM	ÍM"
)rÂ   rç   rE   rX   )ÚHN)ÚIN)r~   rÅ   Úbinary_big_endian)N)%Ú__conditional_annotations__Ú__doc__Ú
__future__r   rQ   r(   rÕ   rR   r§   Útypingr   r   r   r   r   r   r/   Ú__all__rE   rX   rZ   rg   rk   rn   rq   ru   ry   r;   r{   rd   r�   r–   r¡   rª   r¯   rÂ   rç   )rë   s   @r   Ú<module>rð      sÓ  øðô$õ  #ã Û 	Û Û 
Û ß D× Dã ò€õG0õT@*ôF0�*ô 0ô �ô  ðCØ
ˆS�%—*‘*ÐðCà
ˆS�%—*‘*ÐðCð ˆc�5—;‘;ÐðCð ˆc�5—;‘;Ðð	Cð
 ˆc�5—;‘;ÐðCð ˆc�5—;‘;ÐðCð ˆkðCð ˆkðCð 
ˆC�—‘ÐðCð ˆc�5—;‘;ÐðCð ˆKðCð ˆkðCð ˆc�5—=‘=Ð!ðCð ��U—]‘]Ð#ðCð ˆs�E—M‘MÐ"ðCð  ��U—]‘]Ð#ð!CÐ Ð?ó ð$ F€õ8%õvMõ0
õD÷JD÷ZYVñ YVr   