Class PclFile
- Namespace
- PclIO
- Assembly
- PclIO.dll
Static entry point for point cloud format detection and document opening.
public static class PclFileInheritance
Inherited Members
Methods
DetectKind(string)
Detects the format of a file or directory from its signature, extension or directory layout. Returns PclIO.PclFileKind.Unknown for anything the library does not read.
public static PclFileKind DetectKind(string path)Parameters
pathstring-
Path of a file or directory.
Returns
Exceptions
- FileNotFoundException
-
The path is neither an existing file nor a directory.
DetectKind(Stream, string?)
Detects the format from the first bytes of a seekable stream and an optional file name or extension. The stream position is restored.
public static PclFileKind DetectKind(Stream stream, string? extension = null)Parameters
streamStream-
A seekable stream positioned at the start of the data.
extensionstring?-
File name or extension (with leading dot) used where the format is identified by extension.
Returns
Exceptions
- NotSupportedException
-
The stream is not seekable.
Open(string, PclReadOptions?)
Opens a point cloud document from disk, choosing the reader with PclIO.PclFile.DetectKind(System.String).
public static PclDocument Open(string path, PclReadOptions? options = null)Parameters
pathstring-
Path of a file or directory.
optionsPclReadOptions?-
Read options, or null for PclIO.PclReadOptions.Default.
Returns
Exceptions
- FileNotFoundException
-
The path is neither an existing file nor a directory.
- DirectoryNotFoundException
-
A directory the reader needs is missing or disappears while reading.
- NotSupportedException
-
The format is not recognized or uses an unsupported feature.
- InvalidDataException
-
The file is malformed or truncated.