Helios++
Helios software for LiDAR simulations
helios::filems::LasWriterSpec Class Reference

Class representing the specification defining a LasWriter (not the writer itself) More...

#include <LasWriterSpec.h>

Public Member Functions

 LasWriterSpec ()=default
 Default constructor for LasWriterSpec.
 
 LasWriterSpec (const string &path, double const scaleFactor=0.0001, glm::dvec3 const offset=glm::dvec3(0, 0, 0), double const minIntensity=0.0, double const deltaIntensity=1000000.0)
 LAS writer specification constructor. More...
 
 LasWriterSpec (LasWriterSpec const &lws)
 Copy constructor. It must be overridden to prevent segmentation fault when copying the LAS attributes such as the LASpoint. More...
 
void craft ()
 Craft the header of the LAS File for version 1.0.
 
void craft14 ()
 Craft the header of the LAS File for version 1.4.
 
void addExtraAttributes ()
 Creation of extra attributes to be added to each record.
 
void initLASPoint ()
 Initialize the LAS point structure with data from header.
 
shared_ptr< LASwriter > makeWriter (std::string const &path, bool const compress)
 Build a LAS writer from this specification. More...
 
void finish ()
 Remove and release everything that has been initialized in the process of building the writer from the specification. More...
 

Public Attributes

LASwriteOpener lwOpener
 LASwriter opener. Used to instantiate LASwriter lw.
 
LASheader lwHeader
 Header definition for the LAS file.
 
LASpoint lp
 LASpoint used to build different points which shall be written to LAS output file.
 
double scaleFactor
 Scale factor for coordinates. More...
 
double scaleFactorInverse
 Inverse of the scale factor. More...
 
glm::dvec3 offset
 Offset for coordinates. More...
 
double minIntensity
 Minimum value for intensity. Values less than this will be clipped to minIntensity.
 
double maxIntensity
 Maximum value for intensity. Values greater than this will be clipped to maxIntensity.
 
double deltaIntensity
 The difference between max and min intensity. More...
 
double intensityCoefficient
 Precomputed intensity coefficient. More...
 
I32 ewAttrIdx
 Index of echo width attribute in LAS header definition.
 
I32 fwiAttrIdx
 Index of full wave index attribute in LAS header definition.
 
I32 hoiAttrIdx
 Index of hit object ID attribute in LAS header definition.
 
I32 ampAttrIdx
 Index of helios amplitude attribute in LAS header definition.
 
I32 ewAttrStart
 Echo width attribute start (LAS extra bytes format)
 
I32 fwiAttrStart
 Full wave index attribute start (LAS extra bytes format)
 
I32 hoiAttrStart
 Hit object ID attribute start (LAS extra bytes format)
 
I32 ampAttrStart
 Helios amplitude attribute start (LAS extra bytes format)
 

Detailed Description

Class representing the specification defining a LasWriter (not the writer itself)

Author
Alberto M. Esmoris Pena
Version
1.0
See also
filems::LasSyncFileWriter
filems::MultiLasSyncFileWriter

Constructor & Destructor Documentation

◆ LasWriterSpec() [1/2]

helios::filems::LasWriterSpec::LasWriterSpec ( const string &  path,
double const  scaleFactor = 0.0001,
glm::dvec3 const  offset = glm::dvec3(0, 0, 0),
double const  minIntensity = 0.0,
double const  deltaIntensity = 1000000.0 
)
inlineexplicit

LAS writer specification constructor.

Parameters
compressSpecify if use compressed LAS format (LAZ) or not (pure LAS)
See also
LasWriterSpec::scaleFactor
LasWriterSpec::ofset
LasWriterSpec::minIntensity
LasWriterSpec::deltaIntensity

◆ LasWriterSpec() [2/2]

helios::filems::LasWriterSpec::LasWriterSpec ( LasWriterSpec const &  lws)
inline

Copy constructor. It must be overridden to prevent segmentation fault when copying the LAS attributes such as the LASpoint.

See also
LasWriterSpec::lp

Member Function Documentation

◆ finish()

void helios::filems::LasWriterSpec::finish ( )
inline

Remove and release everything that has been initialized in the process of building the writer from the specification.

See also
filems::LasSyncFileWriter::finish

◆ makeWriter()

shared_ptr<LASwriter> helios::filems::LasWriterSpec::makeWriter ( std::string const &  path,
bool const  compress 
)
inline

Build a LAS writer from this specification.

Returns
Built LAS writer from current state of specification

Member Data Documentation

◆ deltaIntensity

double helios::filems::LasWriterSpec::deltaIntensity

The difference between max and min intensity.

\[ \Delta_{I} = I_{max} - I_{min} \]

◆ intensityCoefficient

double helios::filems::LasWriterSpec::intensityCoefficient

Precomputed intensity coefficient.

\[ I_{c} = \frac{65535}{\Delta_{I}} \]

\(65535\) comes from \(2^{16} - 1\) as LAS standard defines 16 bits to store intensity

◆ offset

glm::dvec3 helios::filems::LasWriterSpec::offset

Offset for coordinates.

\[ X_{coord} = \left( {X_{record} \cdot X_{scale}} \right) + X_{offset} \]

◆ scaleFactor

double helios::filems::LasWriterSpec::scaleFactor

Scale factor for coordinates.

\[ X_{coord} = \left( {X_{record} \cdot X_{scale}} \right) + X_{offset} \]

◆ scaleFactorInverse

double helios::filems::LasWriterSpec::scaleFactorInverse

Inverse of the scale factor.

\[ \frac{1}{\textrm{scaleFactor}} \]


The documentation for this class was generated from the following file: