ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
LasExtraScalarField Class Reference

This serves the same purpose as LasScalarField but for extra bytes. More...

#include <LasExtraScalarField.h>

Collaboration diagram for LasExtraScalarField:

Public Types

enum class  DimensionSize { One = 1 , Two = 2 , Three = 3 }
 
enum  DataType {
  Undocumented = 0 , u8 = 1 , i8 , u16 ,
  i16 , u32 , i32 , u64 ,
  i64 , f32 , f64 , Invalid
}
 Data types available LAS Extra Field. More...
 
enum  Kind { Signed , Unsigned , Floating }
 

Public Member Functions

 LasExtraScalarField ()=default
 
uint8_t typeCode () const
 
unsigned elementSize () const
 
unsigned numElements () const
 
unsigned byteSize () const
 
Kind kind () const
 
const char * typeName () const
 
bool noDataIsRelevant () const
 
bool minIsRelevant () const
 
bool maxIsRelevant () const
 
bool scaleIsRelevant () const
 
bool offsetIsRelevant () const
 
void setOffsetIsRelevant (bool isRelevant)
 
void setScaleIsRelevant (bool isRelevant)
 
void resetScalarFieldsPointers ()
 

Static Public Member Functions

static std::vector< LasExtraScalarFieldParseExtraScalarFields (const laszip_header &laszipHeader)
 
static std::vector< LasExtraScalarFieldParseExtraScalarFields (const laszip_vlr_struct &extraBytesVlr)
 
static void InitExtraBytesVlr (laszip_vlr_struct &vlr, const std::vector< LasExtraScalarField > &extraFields)
 
static void UpdateByteOffsets (std::vector< LasExtraScalarField > &extraFields)
 
static unsigned TotalExtraBytesSize (const std::vector< LasExtraScalarField > &extraScalarFields)
 
static void MatchExtraBytesToScalarFields (std::vector< LasExtraScalarField > &extraScalarFields, const ccPointCloud &pointCloud)
 
static std::tuple< DataType, DimensionSizeDataTypeFromValue (uint8_t value)
 

Public Attributes

DataType type {Undocumented}
 
DimensionSize dimensions {DimensionSize::One}
 
uint8_t options {0}
 
char name [MAX_NAME_SIZE] = ""
 
char description [MAX_DESCRIPTION_SIZE] = ""
 
uint8_t noData [MAX_DIM_SIZE][8] = {0}
 
uint8_t mins [MAX_DIM_SIZE][8] = {0}
 
uint8_t maxs [MAX_DIM_SIZE][8] = {0}
 
double scales [MAX_DIM_SIZE] = {0.0}
 
double offsets [MAX_DIM_SIZE] = {0.0}
 
unsigned byteOffset {0}
 
ccScalarFieldscalarFields [MAX_DIM_SIZE] = {nullptr}
 
char ccName [MAX_NAME_SIZE+8] = {0}
 

Static Public Attributes

static constexpr unsigned MAX_DIM_SIZE = 3
 
static constexpr unsigned MAX_NAME_SIZE = 32
 
static constexpr unsigned MAX_DESCRIPTION_SIZE = 32
 

Detailed Description

This serves the same purpose as LasScalarField but for extra bytes.

Definition at line 41 of file LasExtraScalarField.h.

Member Enumeration Documentation

◆ DataType

Data types available LAS Extra Field.

Enumerator
Undocumented 
u8 
i8 
u16 
i16 
u32 
i32 
u64 
i64 
f32 
f64 
Invalid 

Definition at line 62 of file LasExtraScalarField.h.

◆ DimensionSize

Enumerator
One 
Two 
Three 

Definition at line 54 of file LasExtraScalarField.h.

◆ Kind

Enumerator
Signed 
Unsigned 
Floating 

Definition at line 78 of file LasExtraScalarField.h.

Constructor & Destructor Documentation

◆ LasExtraScalarField()

LasExtraScalarField::LasExtraScalarField ( )
default

Member Function Documentation

◆ byteSize()

unsigned LasExtraScalarField::byteSize ( ) const

Definition at line 167 of file LasExtraScalarField.cpp.

References elementSize(), and numElements().

Referenced by ParseExtraScalarFields().

◆ DataTypeFromValue()

std::tuple< LasExtraScalarField::DataType, LasExtraScalarField::DimensionSize > LasExtraScalarField::DataTypeFromValue ( uint8_t  value)
static

Definition at line 67 of file LasExtraScalarField.cpp.

References One, Three, and Two.

◆ elementSize()

unsigned LasExtraScalarField::elementSize ( ) const

Definition at line 134 of file LasExtraScalarField.cpp.

References f32, f64, i16, i32, i64, i8, Invalid, type, u16, u32, u64, u8, and Undocumented.

Referenced by byteSize().

◆ InitExtraBytesVlr()

void LasExtraScalarField::InitExtraBytesVlr ( laszip_vlr_struct vlr,
const std::vector< LasExtraScalarField > &  extraFields 
)
static

Definition at line 302 of file LasExtraScalarField.cpp.

References copy.

Referenced by LasSaver::LasSaver().

◆ kind()

LasExtraScalarField::Kind LasExtraScalarField::kind ( ) const

Definition at line 279 of file LasExtraScalarField.cpp.

References f32, f64, Floating, i16, i32, i64, i8, Invalid, Signed, type, u16, u32, u64, u8, Undocumented, and Unsigned.

◆ MatchExtraBytesToScalarFields()

void LasExtraScalarField::MatchExtraBytesToScalarFields ( std::vector< LasExtraScalarField > &  extraScalarFields,
const ccPointCloud pointCloud 
)
static

◆ maxIsRelevant()

bool LasExtraScalarField::maxIsRelevant ( ) const

Definition at line 240 of file LasExtraScalarField.cpp.

References options.

◆ minIsRelevant()

bool LasExtraScalarField::minIsRelevant ( ) const

Definition at line 235 of file LasExtraScalarField.cpp.

References options.

◆ noDataIsRelevant()

bool LasExtraScalarField::noDataIsRelevant ( ) const

Definition at line 230 of file LasExtraScalarField.cpp.

References options.

◆ numElements()

unsigned LasExtraScalarField::numElements ( ) const

◆ offsetIsRelevant()

bool LasExtraScalarField::offsetIsRelevant ( ) const

Definition at line 250 of file LasExtraScalarField.cpp.

References options.

Referenced by LasExtraScalarFieldCard::fillFrom().

◆ ParseExtraScalarFields() [1/2]

std::vector< LasExtraScalarField > LasExtraScalarField::ParseExtraScalarFields ( const laszip_header &  laszipHeader)
static

Definition at line 178 of file LasExtraScalarField.cpp.

References LasDetails::IsExtraBytesVlr().

Referenced by LasIOFilter::loadFile().

◆ ParseExtraScalarFields() [2/2]

std::vector< LasExtraScalarField > LasExtraScalarField::ParseExtraScalarFields ( const laszip_vlr_struct extraBytesVlr)
static

◆ resetScalarFieldsPointers()

void LasExtraScalarField::resetScalarFieldsPointers ( )

Definition at line 371 of file LasExtraScalarField.cpp.

References MAX_DIM_SIZE, and scalarFields.

◆ scaleIsRelevant()

bool LasExtraScalarField::scaleIsRelevant ( ) const

Definition at line 245 of file LasExtraScalarField.cpp.

References options.

Referenced by LasExtraScalarFieldCard::fillFrom().

◆ setOffsetIsRelevant()

void LasExtraScalarField::setOffsetIsRelevant ( bool  isRelevant)

Definition at line 267 of file LasExtraScalarField.cpp.

References options.

Referenced by LasExtraScalarFieldCard::fillField().

◆ setScaleIsRelevant()

void LasExtraScalarField::setScaleIsRelevant ( bool  isRelevant)

Definition at line 255 of file LasExtraScalarField.cpp.

References options.

Referenced by LasExtraScalarFieldCard::fillField().

◆ TotalExtraBytesSize()

unsigned LasExtraScalarField::TotalExtraBytesSize ( const std::vector< LasExtraScalarField > &  extraScalarFields)
static

Definition at line 362 of file LasExtraScalarField.cpp.

Referenced by LasSaver::LasSaver().

◆ typeCode()

uint8_t LasExtraScalarField::typeCode ( ) const

Definition at line 322 of file LasExtraScalarField.cpp.

References numElements(), and type.

◆ typeName()

const char * LasExtraScalarField::typeName ( ) const

Definition at line 330 of file LasExtraScalarField.cpp.

References f32, f64, i16, i32, i64, i8, Invalid, type, u16, u32, u64, u8, and Undocumented.

Referenced by ParseExtraScalarFields().

◆ UpdateByteOffsets()

void LasExtraScalarField::UpdateByteOffsets ( std::vector< LasExtraScalarField > &  extraFields)
static

Definition at line 379 of file LasExtraScalarField.cpp.

References byteOffset.

Referenced by LasSaver::LasSaver().

Member Data Documentation

◆ byteOffset

unsigned LasExtraScalarField::byteOffset {0}

Definition at line 140 of file LasExtraScalarField.h.

Referenced by ParseExtraScalarFields(), and UpdateByteOffsets().

◆ ccName

char LasExtraScalarField::ccName[MAX_NAME_SIZE+8] = {0}

Definition at line 147 of file LasExtraScalarField.h.

Referenced by LasExtraScalarFieldCard::fillFrom().

◆ description

char LasExtraScalarField::description[MAX_DESCRIPTION_SIZE] = ""

◆ dimensions

DimensionSize LasExtraScalarField::dimensions {DimensionSize::One}

Definition at line 128 of file LasExtraScalarField.h.

Referenced by LasExtraScalarFieldCard::fillField(), and numElements().

◆ MAX_DESCRIPTION_SIZE

constexpr unsigned LasExtraScalarField::MAX_DESCRIPTION_SIZE = 32
staticconstexpr

◆ MAX_DIM_SIZE

constexpr unsigned LasExtraScalarField::MAX_DIM_SIZE = 3
staticconstexpr

When the extra dimension in an array type, it can have at most 3 elements.

Eg: A Color extra array dimension with 3 elements, so that each points have Color[0], Color[1], Color[2] as in a single extra dimension definition.

Definition at line 50 of file LasExtraScalarField.h.

Referenced by LasScalarFieldSaver::handleExtraFields(), and resetScalarFieldsPointers().

◆ MAX_NAME_SIZE

constexpr unsigned LasExtraScalarField::MAX_NAME_SIZE = 32
staticconstexpr

◆ maxs

uint8_t LasExtraScalarField::maxs[MAX_DIM_SIZE][8] = {0}

Definition at line 135 of file LasExtraScalarField.h.

◆ mins

uint8_t LasExtraScalarField::mins[MAX_DIM_SIZE][8] = {0}

Definition at line 134 of file LasExtraScalarField.h.

◆ name

◆ noData

uint8_t LasExtraScalarField::noData[MAX_DIM_SIZE][8] = {0}

Definition at line 133 of file LasExtraScalarField.h.

◆ offsets

double LasExtraScalarField::offsets[MAX_DIM_SIZE] = {0.0}

◆ options

uint8_t LasExtraScalarField::options {0}

◆ scalarFields

◆ scales

double LasExtraScalarField::scales[MAX_DIM_SIZE] = {0.0}

◆ type


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