NDEVR
API Documentation

Provides support for reading and writing to LAS and LAZ point cloud files using the FactoryIO interface. More...

Inheritance diagram for LASFactory:
[legend]
Collaboration diagram for LASFactory:
[legend]

Public Member Functions

void addGeneratingSoftwareToTreatAsScan (const StringView &software)
 Adds a software name to the scan-treatment list.
bool canRead (const FactoryParameters &file) override
 Checks whether this factory can read the given file.
void clearGeneratingSoftwareToTreatAsScan ()
 Clears the list of generating software to treat as scan data.
FactoryOptions defaultReadOptions (const FactoryParameters &file) const override
 Gets the default read options for a given file.
FactoryOptions defaultWriteOptions (const FactoryParameters &file) const override
 Gets the default write options for a given file.
bool determineExtension (const File &file, String &extension) override
 Determines the file extension for the given file.
FactoryFeatures factoryFeatures (const FactoryParameters &file, bool is_import) const override
 Gets the feature capabilities of this factory for a given file.
Buffer< UUIDfilterModelsToExport (Buffer< UUID > models_to_check, const DesignObjectLookup *lookup, const FileFormat &export_format) const override
 Filters models to only include those exportable in the given format.
void getSupportedFormats (Buffer< FileFormat > &formats, bool is_read) override
 Populates the buffer with supported file formats.
bool readFile (FactoryParameters &file) override
 Reads a LAS/LAZ file into the design.
void readPoints (Model &station, LASreader *reader, FactoryParameters &params)
 Reads point data from a LASreader into a model.
void setGeneratingSoftwareToTreatAsScan (const Buffer< String > &software)
 Sets the list of generating software names that should treat data as scan data.
bool writeFile (FactoryParameters &file) override
 Writes design data to a LAS/LAZ file.
Public Member Functions inherited from IOFactory
 IOFactory (const StringView &factory_name)
 Constructs an IOFactory with the given factory name.
virtual ~IOFactory ()
 Virtual destructor.
virtual bool canRead (const File &file)
 Checks whether this factory can read the given file.
virtual bool canRead (const FileFormat &file)
 Checks whether this factory can read the given file format.
virtual bool canWrite (const FactoryParameters &file)
 Checks whether this factory can write using the given FactoryParameters.
virtual bool canWrite (const File &file)
 Checks whether this factory can write the given file.
virtual bool canWrite (const FileFormat &file)
 Checks whether this factory can write the given file format.
String factoryReadAppFeature () const
 Returns the application feature string required for read operations.
String factoryWriteAppFeature () const
 Returns the application feature string required for write operations.
virtual String getIcon (const File &file)
 Returns the icon name associated with the given file type.
void getSupportedFormats (Buffer< FileFormat > &formats)
 Populates the given buffer with all supported file formats (both read and write).
virtual void getSupportedFormats (Buffer< FileFormat > &formats, const File &file)
 Populates the given buffer with formats supported for the specified file.
virtual void getSupportedFormats (Buffer< FileFormat > &formats, DesignObjectLookup *lookup, const Buffer< UUID > &models)
 Populates the given buffer with formats supported for writing the specified models.
virtual void getSupportedFormatsByModelType (Buffer< FileFormat > &formats, bool is_read, const StringView &model_type)
 Populates the given buffer with formats matching a specific model type.
virtual void getSupportedFormatsForExtension (Buffer< FileFormat > &formats, bool is_read, const StringView &extension)
 Populates the given buffer with formats matching a specific file extension.
virtual bool isAutoEnabled () const
 Checks whether this factory is automatically enabled without requiring a password.
virtual bool isFactoryEnabled (bool is_read) const
 Checks whether this factory is enabled for reading or writing.
const Stringname () const
 Returns the name of this factory.
Buffer< UUIDreadFileWithDefaultSettings (const File &file, DesignObjectLookup *lookup)
 Reads a file using default settings and returns the UUIDs of the created models.
Buffer< ScenereadScenesFromFile (const File &file)
 Reads scenes from a file and returns them as a buffer of Scene objects.
void throwIfNotEnabled (bool is_read)
 Throws an exception if the factory is not enabled for the given operation direction.
virtual bool updateFromFile (const FactoryParameters &file, const FactoryOptions &old_options)
 Updates the factory parameters from a file, comparing against old options.
bool writeScenesToFile (const File &file, const Buffer< Scene > &scene)
 Writes a buffer of scenes to a file.

Static Public Member Functions

static LASFactory * DefaultFactory ()
 Gets the singleton LASFactory instance.
static constexpr StringView const FactoryID ()
 Gets the unique factory identifier string.
static FileFormat LASFormat ()
 Gets the FileFormat descriptor for LAS files.
static FileFormat LAZFormat ()
 Gets the FileFormat descriptor for LAZ (compressed LAS) files.
Static Public Member Functions inherited from IOFactory
static void EnableExtension (const StringView &extension, const StringView &read_password, const StringView &write_password)
 Enables a specific file extension with the given read and write passwords.
static void EnableFactory (const StringView &factory, const StringView &read_password, const StringView &write_password)
 Enables a factory by name with the given read and write passwords.
static void EnableFactory (IOFactory *factory, const StringView &read_password, const StringView &write_password)
 Registers an IOFactory instance with the system, enabling it for read and/or write.

Protected Attributes

Buffer< Stringm_generating_software_to_treat_as_scan
 Software names whose output is treated as scan data.

Detailed Description

Provides support for reading and writing to LAS and LAZ point cloud files using the FactoryIO interface.


Definition at line 49 of file LASFactory.h.

Member Function Documentation

◆ addGeneratingSoftwareToTreatAsScan()

void LASFactory::addGeneratingSoftwareToTreatAsScan ( const StringView & software)

Adds a software name to the scan-treatment list.

Parameters
[in]softwareThe software name to add.

◆ canRead()

bool LASFactory::canRead ( const FactoryParameters & file)
overridevirtual

Checks whether this factory can read the given file.

Parameters
[in]fileThe file parameters to check.
Returns
True if the file can be read.

Reimplemented from IOFactory.

◆ DefaultFactory()

LASFactory * LASFactory::DefaultFactory ( )
static

Gets the singleton LASFactory instance.

Returns
A pointer to the default LASFactory.

◆ defaultReadOptions()

FactoryOptions LASFactory::defaultReadOptions ( const FactoryParameters & file) const
overridevirtual

Gets the default read options for a given file.

Parameters
[in]fileThe file parameters.
Returns
The default read options.

Reimplemented from IOFactory.

◆ defaultWriteOptions()

FactoryOptions LASFactory::defaultWriteOptions ( const FactoryParameters & file) const
overridevirtual

Gets the default write options for a given file.

Parameters
[in]fileThe file parameters.
Returns
The default write options.

Reimplemented from IOFactory.

◆ determineExtension()

bool LASFactory::determineExtension ( const File & file,
String & extension )
overridevirtual

Determines the file extension for the given file.

Parameters
[in]fileThe file to check.
[in]extensionOutput parameter for the determined extension.
Returns
True if the extension was determined.

Reimplemented from IOFactory.

◆ factoryFeatures()

FactoryFeatures LASFactory::factoryFeatures ( const FactoryParameters & file,
bool is_import ) const
overridevirtual

Gets the feature capabilities of this factory for a given file.

Parameters
[in]fileThe file parameters.
[in]is_importTrue for import, false for export.
Returns
The factory feature flags.

Implements IOFactory.

◆ FactoryID()

constexpr StringView const LASFactory::FactoryID ( )
inlinestaticconstexpr

Gets the unique factory identifier string.

Returns
The factory ID string view.

Definition at line 135 of file LASFactory.h.

◆ filterModelsToExport()

Buffer< UUID > LASFactory::filterModelsToExport ( Buffer< UUID > models_to_check,
const DesignObjectLookup * lookup,
const FileFormat & export_format ) const
overridevirtual

Filters models to only include those exportable in the given format.

Parameters
[in]models_to_checkThe model UUIDs to evaluate.
[in]lookupThe design object lookup.
[in]export_formatThe target export format.
Returns
A buffer of exportable model UUIDs.

Reimplemented from IOFactory.

◆ getSupportedFormats()

void LASFactory::getSupportedFormats ( Buffer< FileFormat > & formats,
bool is_read )
overridevirtual

Populates the buffer with supported file formats.

Parameters
[in]formatsThe buffer to populate.
[in]is_readTrue for read formats, false for write formats.

Implements IOFactory.

◆ LASFormat()

FileFormat LASFactory::LASFormat ( )
static

Gets the FileFormat descriptor for LAS files.

Returns
The LAS FileFormat.

◆ LAZFormat()

FileFormat LASFactory::LAZFormat ( )
static

Gets the FileFormat descriptor for LAZ (compressed LAS) files.

Returns
The LAZ FileFormat.

◆ readFile()

bool LASFactory::readFile ( FactoryParameters & file)
overridevirtual

Reads a LAS/LAZ file into the design.

Parameters
[in]fileThe file parameters including path and output settings.
Returns
True if reading succeeded.

Implements IOFactory.

◆ readPoints()

void LASFactory::readPoints ( Model & station,
LASreader * reader,
FactoryParameters & params )

Reads point data from a LASreader into a model.

Parameters
[in]stationThe model to populate with point data.
[in]readerThe LASreader to read from.
[in]paramsThe factory parameters for configuration.

◆ setGeneratingSoftwareToTreatAsScan()

void LASFactory::setGeneratingSoftwareToTreatAsScan ( const Buffer< String > & software)

Sets the list of generating software names that should treat data as scan data.

Parameters
[in]softwareThe list of software names.

◆ writeFile()

bool LASFactory::writeFile ( FactoryParameters & file)
overridevirtual

Writes design data to a LAS/LAZ file.

Parameters
[in]fileThe file parameters including path and source models.
Returns
True if writing succeeded.

Implements IOFactory.


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