Helios++
Helios software for LiDAR simulations
helios::filems::BaseMeasurementWriter< WriteArgs > Class Template Referenceabstract

Class to handle writing of measurements to generate HELIOS++ output virtual point clouds. It provides the basis for the implementation of any measurement writer. More...

#include <BaseMeasurementWriter.h>

Inheritance diagram for helios::filems::BaseMeasurementWriter< WriteArgs >:
Collaboration diagram for helios::filems::BaseMeasurementWriter< WriteArgs >:

Public Member Functions

 BaseMeasurementWriter ()=default
 Default constructor for base measurement writer.
 
virtual void configure (string const &parent, string const &prefix, bool const lastLegInStrip)
 Configure the output path for the base measurement writer. More...
 
virtual WriterType chooseWriterType () const
 Choose a type of file writer based on input flags. More...
 
virtual void clearPointcloudFile ()
 Clear point cloud file for current leg.
 
virtual shared_ptr< SyncFileWriter< WriteArgs ... > > makeWriter (WriterType const &type, string const &path, bool const zipOutput, double const lasScale, glm::dvec3 shift, double const minIntensity, double const deltaIntensity) const =0
 Make a SyncFileWriter that is suitable to be used by the base measurement writer. More...
 
void finish () override
 Finishes all writers. More...
 
virtual void setOutputFilePath (string const &path, bool const lastLegInStrip)
 Set path to output file. More...
 
shared_ptr< ScannergetScanner () const
 Obtain the scanner associated with the base measurement writer. More...
 
void setScanner (shared_ptr< Scanner > scanner)
 Associate a new scanner with the base measurement writer, which implies updating the shift vector to be the same than the one defined for the scene associated to the scanner. More...
 
glm::dvec3 const & getShift ()
 Obtain the shift applied by the base measurement writer. More...
 
- Public Member Functions inherited from helios::filems::HeliosWriter< WriteArgs ... >
 HeliosWriter ()=default
 Default constructor for HELIOS++ writer.
 
virtual bool hasWriter () const
 Check whether the HeliosWriter has a non null writer (true) or not (false) More...
 
virtual fs::path getOutputFilePath () const
 Get the path to the output file. More...
 
virtual string getOutputPath () const
 
bool isLasOutput () const
 Get the LAS output flag. More...
 
void setLasOutput (bool const lasOutput)
 Set the LAS output flag. More...
 
bool isLas10 () const
 Get the LAS 10 specification flag. More...
 
void setLas10 (bool const las10)
 Set the LAS output flag. More...
 
bool isZipOutput () const
 Get the zip output flag. More...
 
void setZipOutput (bool const zipOutput)
 Set the zip output flag. More...
 
double getLasScale () const
 Obtain the LAS scale of the measurement writer. More...
 
void setLasScale (double const lasScale)
 Set the LAS scale of the measurement writer. More...
 

Protected Attributes

shared_ptr< Scannerscanner = nullptr
 The scanner that generates the measurements to be written. More...
 
glm::dvec3 shift
 The pointer to the shift vector to be applied to measurements. More...
 
unordered_map< string, shared_ptr< SyncFileWriter< WriteArgs ... > > > writers {}
 Map of writers. This map allows to reuse writers for legs grouped in the same strip.
 
- Protected Attributes inherited from helios::filems::HeliosWriter< WriteArgs ... >
shared_ptr< SyncFileWriter< WriteArgs ... > > sfw
 Synchronous file writer. More...
 
bool lasOutput
 Flag specifying if detector output must be written in LAS format (true) or not (false) More...
 
bool las10
 Flag specifying if detect output must be writing in LAS 1.0 (LAS 1.4 is written by default)
 
bool zipOutput
 Flag specifying if detector output must be zipped (true) or not (false)
 
double lasScale
 Scale factor specification to be used when LAS output format specified. More...
 

Detailed Description

template<typename ... WriteArgs>
class helios::filems::BaseMeasurementWriter< WriteArgs >

Class to handle writing of measurements to generate HELIOS++ output virtual point clouds. It provides the basis for the implementation of any measurement writer.

Author
Alberto M. Esmoris Pena
Version
1.0
See also
filems::MeasurementWriter
filems::VectorialMeasurementWriter

Member Function Documentation

◆ chooseWriterType()

template<typename ... WriteArgs>
virtual WriterType helios::filems::BaseMeasurementWriter< WriteArgs >::chooseWriterType ( ) const
virtual

Choose a type of file writer based on input flags.

Returns
Type of writer to be created

◆ configure()

template<typename ... WriteArgs>
virtual void helios::filems::BaseMeasurementWriter< WriteArgs >::configure ( string const &  parent,
string const &  prefix,
bool const  lastLegInStrip 
)
virtual

Configure the output path for the base measurement writer.

Parameters
parentPath to output directory for measurements files
prefixPrefix for the name of the output file
lastLegInStripSpecify whether the last leg belonged to a strip (true) or not (false)

◆ finish()

template<typename ... WriteArgs>
void helios::filems::BaseMeasurementWriter< WriteArgs >::finish ( )
overridevirtual

◆ getScanner()

template<typename ... WriteArgs>
shared_ptr<Scanner> helios::filems::BaseMeasurementWriter< WriteArgs >::getScanner ( ) const
inline

Obtain the scanner associated with the base measurement writer.

See also
filems::BaseMeasurementWriter::scanner

◆ getShift()

template<typename ... WriteArgs>
glm::dvec3 const& helios::filems::BaseMeasurementWriter< WriteArgs >::getShift ( )
inline

Obtain the shift applied by the base measurement writer.

See also
filems::BaseMeasurementWriter::shift

◆ makeWriter()

template<typename ... WriteArgs>
virtual shared_ptr<SyncFileWriter<WriteArgs ...> > helios::filems::BaseMeasurementWriter< WriteArgs >::makeWriter ( WriterType const &  type,
string const &  path,
bool const  zipOutput,
double const  lasScale,
glm::dvec3  shift,
double const  minIntensity,
double const  deltaIntensity 
) const
pure virtual

◆ setOutputFilePath()

template<typename ... WriteArgs>
virtual void helios::filems::BaseMeasurementWriter< WriteArgs >::setOutputFilePath ( string const &  path,
bool const  lastLegInStrip 
)
virtual

Set path to output file.

Parameters
pathNew path to output file

◆ setScanner()

template<typename ... WriteArgs>
void helios::filems::BaseMeasurementWriter< WriteArgs >::setScanner ( shared_ptr< Scanner scanner)
inline

Associate a new scanner with the base measurement writer, which implies updating the shift vector to be the same than the one defined for the scene associated to the scanner.

See also
filems::BaseMeasurementWriter::scanner
filems::BaseMeasurementWriter::shift

Member Data Documentation

◆ scanner

template<typename ... WriteArgs>
shared_ptr<Scanner> helios::filems::BaseMeasurementWriter< WriteArgs >::scanner = nullptr
protected

The scanner that generates the measurements to be written.

See also
filems::MeasurementWriter::setScanner

◆ shift

template<typename ... WriteArgs>
glm::dvec3 helios::filems::BaseMeasurementWriter< WriteArgs >::shift
protected

The pointer to the shift vector to be applied to measurements.

See also
filems::MeasurementWriter::setScanner

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