Safe Haskell | None |
---|
Parser for PCD (point cloud data) files. Also provides a facility for converting from ASCII to binary formatted point data.
- readAsciiPoints :: Vector v a => Header -> Handle -> Parser a -> IO (v a)
- readAsciiPointsDefault :: Header -> Handle -> IO (Vector [FieldType])
- readBinPoints :: forall a. Storable a => Header -> Handle -> IO (Either String (Vector a))
- readPointData :: Storable a => Header -> Handle -> Parser a -> IO (Either String (Vector a))
- readXYZ_ascii :: Fractional a => Parser (V3 a)
- readXYZW_ascii :: Fractional a => Parser (V4 a)
- saveBinaryPcd :: forall a. Storable a => FilePath -> Header -> Vector a -> IO ()
- asciiToBinary :: FilePath -> FilePath -> IO ()
- loadPoints :: Storable a => Parser a -> FilePath -> IO (Vector a)
- loadXyz :: (Fractional a, Storable a) => FilePath -> IO (Vector (V3 a))
- loadXyzw :: (Fractional a, Storable a) => FilePath -> IO (Vector (V4 a))
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
.