PLY point cloud file reader. Supports ASCII, binary_little_endian, and binary_big_endian format variants. Parses vertex elements into PointCloud objects with automatic property mapping for x, y, z, intensity, and color channels.
PlyReader
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| ReadFile | 1 | Read a PLY file from the given path and return parsed point cloud data. |
| ReadStream | 1 | Read PLY data from an open stream. |
| LocateHeaderEnd | 1 | Locates the end of the ASCII header in the stream and reads header text. |
| ParseHeaderText | 1 | Parses the PLY header text to extract the vertex element format. |
| GetPropertyByteSize | 1 | Returns the byte size for a PLY scalar property type. |
| ReadAsciiVertices | 1 | Reads ASCII-format vertex data from the stream starting at dataStartPos. |
| ReadBinaryVertices | 1 | Reads binary-format vertex data from the stream starting at dataStartPos. |
| ReadBinaryPropertyValue | 1 | Reads a single binary property value and returns it as Double. |
| ReadListCount | 1 | Reads the count value for a list-type PLY property. |
| BuildPropertyMapping | 1 | Builds a property-to-field index mapping from vertex property definitions. |
| SwapEndian | 6 | Swaps endianness for a Double value. |
03 Members
String)Read a PLY file from the given path and return parsed point cloud data.
| Name | Type | Description |
|---|---|---|
path | String | File path to a .ply file. |
Array of PointCloud parsed from vertex elements.
Stream)Read PLY data from an open stream. The stream must be readable and seekable. Auto-detects ASCII vs binary from the header and delegates to the appropriate parser.
| Name | Type | Description |
|---|---|---|
stream | Stream | Readable, seekable stream positioned at the PLY header. |
Array of PointCloud parsed from vertex elements.
Stream, String, Int64)Locates the end of the ASCII header in the stream and reads header text. After this call, dataStartPosition will point to the first byte after the newline following "end_header".
String)Parses the PLY header text to extract the vertex element format.
String)Returns the byte size for a PLY scalar property type.
Reads ASCII-format vertex data from the stream starting at dataStartPos.
Reads binary-format vertex data from the stream starting at dataStartPos.
BinaryReader, String, Boolean)Reads a single binary property value and returns it as Double. Advances the stream by the appropriate number of bytes.
BinaryReader, String, Boolean)Reads the count value for a list-type PLY property.
Builds a property-to-field index mapping from vertex property definitions.
Int16)Swaps endianness for a Short value.
UInt16)Swaps endianness for a UShort value.
Int32)Swaps endianness for an Integer value.
UInt32)Swaps endianness for a UInteger value.
Single)Swaps endianness for a Single value.
Double)Swaps endianness for a Double value.