pcd-loader-0.2.0: PCD file loader.

Safe HaskellNone

PCD.Header

Description

Define a data structure for a PCD file header and an associated parser.

Synopsis

Documentation

data DimType Source

Fields attached to a point may be signed integers (I), unsigned integers (U), or floating point (F).

Constructors

I 
U 
F 

data DataFormat Source

The PCD format has both ASCII and binary variants.

Constructors

ASCII 
Binary 

fieldParser :: DimType -> Int -> Parser FieldTypeSource

Construct a parser for a field based on its type and size.

sequence' :: Monad m => [m a] -> m [a]Source

pointParser :: Header -> Parser [FieldType]Source

Assemble a parser for points by sequencing together all necessary field parsers.

nextLine :: Handle -> IO TextSource

Get the next non-comment line.

readHeader :: Handle -> IO (Header, Maybe Text)Source

Parse a PCD header. Returns the Header and the rest of the file contents.

writeHeader :: Header -> TextSource

Format a Header to be compatible with the PCD specification.

totalBinarySize :: Header -> IntSource

Compute the number of bytes this point cloud would occupy if serialized with the Binary encoding.