ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
LasScalarField Struct Reference

#include <LasScalarField.h>

Collaboration diagram for LasScalarField:

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< LasScalarFieldForPointFormat (unsigned pointFormatId)
 

Public Attributes

Id id
 The Id of the LAS field this relates to. More...
 
ccScalarFieldsf {nullptr}
 
Range range
 

Detailed Description

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.

Member Enumeration Documentation

◆ 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)

Enumerator
Intensity 
ReturnNumber 
NumberOfReturns 
ScanDirectionFlag 
EdgeOfFlightLine 
Classification 
SyntheticFlag 
KeypointFlag 
WithheldFlag 
ScanAngleRank 
UserData 
PointSourceId 
GpsTime 
ExtendedScanAngle 
ExtendedScannerChannel 
OverlapFlag 
ExtendedClassification 
ExtendedReturnNumber 
ExtendedNumberOfReturns 
NearInfrared 

Definition at line 42 of file LasScalarField.h.

Constructor & Destructor Documentation

◆ LasScalarField() [1/2]

LasScalarField::LasScalarField ( )
delete

◆ LasScalarField() [2/2]

LasScalarField::LasScalarField ( LasScalarField::Id  id,
ccScalarField sf = nullptr 
)
explicit

Definition at line 233 of file LasScalarField.cpp.

Member Function Documentation

◆ ForPointFormat()

◆ IdFromName()

LasScalarField::Id LasScalarField::IdFromName ( const char *  name,
unsigned  targetPointFormat 
)
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().

◆ name()

const char * LasScalarField::name ( ) const

Definition at line 240 of file LasScalarField.cpp.

References NameFromId().

Referenced by LasSaveDialog::handleSelectedPointFormatChange(), and IdFromName().

◆ NameFromId()

◆ ValueRange()

Member Data Documentation

◆ id

Id LasScalarField::id

The Id of the LAS field this relates to.

Definition at line 123 of file LasScalarField.h.

◆ range

Range LasScalarField::range

Definition at line 132 of file LasScalarField.h.

◆ sf

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.


The documentation for this struct was generated from the following files: