1 #ifndef _HELIOS_FILEMS_BASE_MEASUREMENT_WRITER_H_
2 #define _HELIOS_FILEMS_BASE_MEASUREMENT_WRITER_H_
4 #include <filems/write/core/HeliosWriter.h>
5 #include <filems/factory/SyncFileMeasurementWriterFactory.h>
6 #include <scanner/Scanner.h>
10 #include <unordered_map>
13 namespace helios {
namespace filems {
17 using std::shared_ptr;
18 using std::unordered_map;
30 template <
typename ... WriteArgs>
83 bool const lastLegInStrip
104 WriterType
const &type,
109 double const minIntensity,
110 double const deltaIntensity
129 string const &path,
bool const lastLegInStrip
146 this->shift = this->scanner->platform->scene->getShift();
156 #include <filems/write/core/BaseMeasurementWriter.tpp>
Class to handle writing of measurements to generate HELIOS++ output virtual point clouds....
Definition: BaseMeasurementWriter.h:31
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.
virtual WriterType chooseWriterType() const
Choose a type of file writer based on input flags.
glm::dvec3 shift
The pointer to the shift vector to be applied to measurements.
Definition: BaseMeasurementWriter.h:54
shared_ptr< Scanner > scanner
The scanner that generates the measurements to be written.
Definition: BaseMeasurementWriter.h:49
void setScanner(shared_ptr< Scanner > scanner)
Associate a new scanner with the base measurement writer, which implies updating the shift vector to ...
Definition: BaseMeasurementWriter.h:143
shared_ptr< Scanner > getScanner() const
Obtain the scanner associated with the base measurement writer.
Definition: BaseMeasurementWriter.h:135
glm::dvec3 const & getShift()
Obtain the shift applied by the base measurement writer.
Definition: BaseMeasurementWriter.h:153
virtual void clearPointcloudFile()
Clear point cloud file for current leg.
void finish() override
Finishes all writers.
unordered_map< string, shared_ptr< SyncFileWriter< WriteArgs ... > > > writers
Map of writers. This map allows to reuse writers for legs grouped in the same strip.
Definition: BaseMeasurementWriter.h:60
virtual void setOutputFilePath(string const &path, bool const lastLegInStrip)
Set path to output file.
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.
Alberto M. Esmoris Pena.
Definition: HeliosWriter.h:25
bool isZipOutput() const
Get the zip output flag.
Definition: HeliosWriter.h:120
virtual string getOutputPath() const
Definition: HeliosWriter.h:93
shared_ptr< SyncFileWriter< WriteArgs ... > > sfw
Synchronous file writer.
Definition: HeliosWriter.h:33
bool isLasOutput() const
Get the LAS output flag.
Definition: HeliosWriter.h:99
double lasScale
Scale factor specification to be used when LAS output format specified.
Definition: HeliosWriter.h:56
bool zipOutput
Flag specifying if detector output must be zipped (true) or not (false)
Definition: HeliosWriter.h:50
double getLasScale() const
Obtain the LAS scale of the measurement writer.
Definition: HeliosWriter.h:131
bool isLas10() const
Get the LAS 10 specification flag.
Definition: HeliosWriter.h:110
Abstract class defining common behavior for all synchronous file writers.
Definition: SyncFileWriter.h:18