pcd-loader-0.1.1.0: PCD file loader.

Safe HaskellNone

PCD.Data

Description

Parser for PCD (point cloud data) files. Also provides a facility for converting from ASCII to binary formatted point data.

Synopsis

Documentation

readAsciiPoints :: Vector v a => Header -> Handle -> Parser a -> IO (v a)Source

Read point data using a user-supplied ASCII point parser.

readAsciiPointsDefault :: Header -> Handle -> IO (Vector [FieldType])Source

Load points of unknown dimension into a boxed vector with a list of FieldType as the point representation.

readBinPoints :: forall a. Storable a => Header -> Handle -> IO (Either String (Vector a))Source

Read back Storable points saved as binary data.

readPointData :: Storable a => Header -> Handle -> Parser a -> IO (Either String (Vector a))Source

Reads point data in either ASCII or binary formats given an ASCII parser for the point data type and a Storable instance. If you know that your points are binary or ASCII, consider using readBinPoints or readAsciiPoints.

readXYZ_ascii :: Fractional a => Parser (V3 a)Source

Parse 3D points serialized in ASCII.

readXYZW_ascii :: Fractional a => Parser (V4 a)Source

Parse 4D points serialized to ASCII. This is useful for points with X,Y,Z, and RGB fields each represented by a single float.

saveBinaryPcd :: forall a. Storable a => FilePath -> Header -> Vector a -> IO ()Source

Use an existing PCD header to save binary point data to a file. The supplied header is used as-is, except that its format is set to Binary.

asciiToBinary :: FilePath -> FilePath -> IO ()Source

Convert the single-precision floating point XYZ or XYZW (where "W" may be an RGB triple encoded as a single float) points in an ASCII PCD to a binary PCD file.

loadPoints :: Storable a => Parser a -> FilePath -> IO (Vector a)Source

Load points stored in a PCD file into a Vector.

loadXyz :: (Fractional a, Storable a) => FilePath -> IO (Vector (V3 a))Source

Read a PCD file consisting of floating point XYZ coordinates for each point.

loadXyzw :: (Fractional a, Storable a) => FilePath -> IO (Vector (V4 a))Source

Read a PCD file consisting of floating point XYZW coordinates for each point (where the final "W" field may be an RGB triple encoded as a float).