![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <LasScalarField.h>

Classes | |
| struct | Range |
Public Types | |
| enum | Id { Intensity = 0 , ReturnNumber = 1 , NumberOfReturns = 2 , ScanDirectionFlag , EdgeOfFlightLine , Classification , SyntheticFlag , KeypointFlag , WithheldFlag , ScanAngleRank , UserData , PointSourceId , GpsTime , ExtendedScanAngle , ExtendedScannerChannel , OverlapFlag , ExtendedClassification , ExtendedReturnNumber , ExtendedNumberOfReturns , NearInfrared } |
Public Member Functions | |
| LasScalarField ()=delete | |
| LasScalarField (LasScalarField::Id id, ccScalarField *sf=nullptr) | |
| const char * | name () const |
Static Public Member Functions | |
| static constexpr const char * | NameFromId (LasScalarField::Id id) |
| Returns the name that correspond to the given LasScalarField::Id variant. More... | |
| static LasScalarField::Id | IdFromName (const char *name, unsigned targetPointFormat) |
| static LasScalarField::Range | ValueRange (LasScalarField::Id id) |
| Returns the range of value the given field (ID) supports. More... | |
| static std::vector< LasScalarField > | ForPointFormat (unsigned pointFormatId) |
Public Attributes | |
| Id | id |
| The Id of the LAS field this relates to. More... | |
| ccScalarField * | sf {nullptr} |
| Range | range |
class used to link a LAS field defined by the LAS standard to the ACloudViewer scalar field that stores or will store the values.
Definition at line 37 of file LasScalarField.h.
| enum LasScalarField::Id |
Enum used to uniquely identify LAS fields with a clear distinction between 'normal' and 'extended' fields which may have the same name (e.g. Classification)
Definition at line 42 of file LasScalarField.h.
|
delete |
|
explicit |
Definition at line 233 of file LasScalarField.cpp.
|
static |
Returns the scalar fields that correspond the the point format ID as per LAS specifications.
Definition at line 245 of file LasScalarField.cpp.
References LasNames::Classification, LasNames::EdgeOfFlightLine, LasNames::GpsTime, LasDetails::HasGpsTime(), LasDetails::HasNearInfrared(), LasNames::Intensity, LasNames::KeypointFlag, LasNames::NearInfrared, LasNames::NumberOfReturns, LasNames::OverlapFlag, LasNames::PointSourceId, LasNames::ReturnNumber, LasNames::ScanAngleRank, LasNames::ScanDirectionFlag, LasNames::SyntheticFlag, LasNames::UserData, and LasNames::WithheldFlag.
Referenced by LasSaveDialog::handleSelectedPointFormatChange(), and LasIOFilter::loadFile().
|
static |
Returns the LasScalarField::Id variant that correspond to the given name
Point Format is needed, as we have different Id for the same name depending on the point format. For example: The "Classification" field has a different Id in fmt >= 6 as it allows to store more information.
Throws a logic_error if the name does not have a matching id
Definition at line 68 of file LasScalarField.cpp.
References LasNames::Classification, LasNames::EdgeOfFlightLine, LasNames::GpsTime, LasNames::Intensity, IsPointFormatExtended(), LasNames::KeypointFlag, name(), LasNames::NearInfrared, LasNames::NumberOfReturns, LasNames::OverlapFlag, LasNames::PointSourceId, LasNames::ReturnNumber, LasNames::ScanAngle, LasNames::ScanAngleRank, LasNames::ScanDirectionFlag, LasNames::ScannerChannel, LasNames::SyntheticFlag, LasNames::UserData, CVLog::Warning(), and LasNames::WithheldFlag.
Referenced by LasSaveDialog::fieldsToSave(), and LasSaveDialog::handleComboBoxChange().
| const char * LasScalarField::name | ( | ) | const |
Definition at line 240 of file LasScalarField.cpp.
References NameFromId().
Referenced by LasSaveDialog::handleSelectedPointFormatChange(), and IdFromName().
|
staticconstexpr |
Returns the name that correspond to the given LasScalarField::Id variant.
Definition at line 19 of file LasScalarField.cpp.
References LasNames::Classification, Classification, LasNames::EdgeOfFlightLine, EdgeOfFlightLine, ExtendedClassification, ExtendedNumberOfReturns, ExtendedReturnNumber, ExtendedScanAngle, ExtendedScannerChannel, LasNames::GpsTime, GpsTime, LasNames::Intensity, Intensity, LasNames::KeypointFlag, KeypointFlag, LasNames::NearInfrared, NearInfrared, LasNames::NumberOfReturns, NumberOfReturns, LasNames::OverlapFlag, OverlapFlag, LasNames::PointSourceId, PointSourceId, LasNames::ReturnNumber, ReturnNumber, LasNames::ScanAngle, LasNames::ScanAngleRank, ScanAngleRank, LasNames::ScanDirectionFlag, ScanDirectionFlag, LasNames::ScannerChannel, LasNames::SyntheticFlag, SyntheticFlag, LasNames::UserData, UserData, LasNames::WithheldFlag, and WithheldFlag.
Referenced by name().
|
static |
Returns the range of value the given field (ID) supports.
Definition at line 181 of file LasScalarField.cpp.
References Classification, EdgeOfFlightLine, ExtendedClassification, ExtendedNumberOfReturns, ExtendedReturnNumber, ExtendedScanAngle, ExtendedScannerChannel, LasScalarField::Range::ForBitCount(), GpsTime, Intensity, KeypointFlag, max(), NearInfrared, NumberOfReturns, OverlapFlag, PointSourceId, ReturnNumber, ScanAngleRank, ScanDirectionFlag, SyntheticFlag, UserData, and WithheldFlag.
Referenced by LasSaveDialog::handleComboBoxChange(), and LasDetails::SelectBestVersion().
| Id LasScalarField::id |
The Id of the LAS field this relates to.
Definition at line 123 of file LasScalarField.h.
| Range LasScalarField::range |
Definition at line 132 of file LasScalarField.h.
| ccScalarField* LasScalarField::sf {nullptr} |
Pointer to the 'linked' ACloudViewer scalar field.
When reading (loading points) values of the LAS field will be stored into the scalar field pointed by sf.
When writing (saving points) values of the scalar field pointed by sf will be stored to the corresponding LAS field (using the Id).
Definition at line 131 of file LasScalarField.h.