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

#include <LasScalarFieldLoader.h>

Public Member Functions

 LasScalarFieldLoader (std::vector< LasScalarField > &standardScalarFields, std::vector< LasExtraScalarField > &extraScalarFields, ccPointCloud &pointCloud)
 
CC_FILE_ERROR handleScalarFields (ccPointCloud &pointCloud, const laszip_point &currentPoint)
 
CC_FILE_ERROR handleRGBValue (ccPointCloud &pointCloud, const laszip_point &currentPoint)
 
CC_FILE_ERROR handleExtraScalarFields (ccPointCloud &pointCloud, const laszip_point &currentPoint)
 
void setIgnoreFieldsWithDefaultValues (bool state)
 
void setForce8bitRgbMode (bool state)
 
void setManualTimeShift (double timeShift)
 
const std::vector< LasScalarField > & standardFields () const
 
const std::vector< LasExtraScalarField > & extraFields () const
 

Detailed Description

Class with the logic on how to load LAS dimensions values from the LAS file into a ccPointCloud's scalar field.

This also handles LAS extra scalar fields, as well as RGB.

Constructor & Destructor Documentation

◆ LasScalarFieldLoader()

LasScalarFieldLoader::LasScalarFieldLoader ( std::vector< LasScalarField > &  standardScalarFields,
std::vector< LasExtraScalarField > &  extraScalarFields,
ccPointCloud &  pointCloud 
)

Member Function Documentation

◆ extraFields()

const std::vector<LasExtraScalarField>& LasScalarFieldLoader::extraFields ( ) const
inline

Referenced by LasIOFilter::loadFile().

◆ handleExtraScalarFields()

CC_FILE_ERROR LasScalarFieldLoader::handleExtraScalarFields ( ccPointCloud &  pointCloud,
const laszip_point &  currentPoint 
)

◆ handleRGBValue()

CC_FILE_ERROR LasScalarFieldLoader::handleRGBValue ( ccPointCloud &  pointCloud,
const laszip_point &  currentPoint 
)

In LAS files, the red, green and blue channels are normal LAS fields, however in ACloudViewer RGB is handled differently.

References ccPointCloud::addRGBColor(), ecvColor::black(), ecvColor::blue(), CC_FERR_NO_ERROR, CC_FERR_NOT_ENOUGH_MEMORY, ecvColor::green(), ccPointCloud::hasColors(), ecvColor::red(), ccPointCloud::reserveTheRGBTable(), and cloudViewer::PointCloudTpl< T >::size().

Referenced by LasIOFilter::loadFile().

◆ handleScalarFields()

◆ setForce8bitRgbMode()

void LasScalarFieldLoader::setForce8bitRgbMode ( bool  state)
inline

Referenced by LasIOFilter::loadFile().

◆ setIgnoreFieldsWithDefaultValues()

void LasScalarFieldLoader::setIgnoreFieldsWithDefaultValues ( bool  state)
inline

Referenced by LasIOFilter::loadFile().

◆ setManualTimeShift()

void LasScalarFieldLoader::setManualTimeShift ( double  timeShift)
inline

If nan, this value will be ignored and the time shift will be taken using the first value encountered.

Referenced by LasIOFilter::loadFile().

◆ standardFields()

const std::vector<LasScalarField>& LasScalarFieldLoader::standardFields ( ) const
inline

Referenced by LasIOFilter::loadFile().

Member Data Documentation

◆ floatingValues

double LasScalarFieldLoader::floatingValues[LasExtraScalarField::MAX_DIM_SIZE]

◆ signedValues

int64_t LasScalarFieldLoader::signedValues[LasExtraScalarField::MAX_DIM_SIZE]

◆ unsignedValues

uint64_t LasScalarFieldLoader::unsignedValues[LasExtraScalarField::MAX_DIM_SIZE]

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