12 #ifndef __LIDAR_POINT_DATA_H__
13 #define __LIDAR_POINT_DATA_H__
17 LT_BEGIN_LIDAR_NAMESPACE
94 #define CHANNEL_NAME_X "X"
95 #define CHANNEL_NAME_Y "Y"
96 #define CHANNEL_NAME_Z "Z"
97 #define CHANNEL_NAME_Intensity "Intensity"
98 #define CHANNEL_NAME_ReturnNum "ReturnNum"
99 #define CHANNEL_NAME_NumReturns "NumReturns"
100 #define CHANNEL_NAME_ScanDir "ScanDir"
101 #define CHANNEL_NAME_EdgeFlightLine "EdgeFlightLine"
102 #define CHANNEL_NAME_ClassId "ClassId"
103 #define CHANNEL_NAME_ScanAngle "ScanAngle"
104 #define CHANNEL_NAME_UserData "UserData"
105 #define CHANNEL_NAME_SourceId "SourceId"
106 #define CHANNEL_NAME_GPSTime_Week "GPSTime"
107 #define CHANNEL_NAME_GPSTime_Adjusted "GPSTime_Adjusted"
108 #define CHANNEL_NAME_Red "Red"
109 #define CHANNEL_NAME_Green "Green"
110 #define CHANNEL_NAME_Blue "Blue"
113 #define CHANNEL_NAME_Skip "@Skip"
130 void init(
const char *name,
DataType datatype,
int bits,
double quantization = 0);
138 const char *
getName(
void)
const;
188 void init(
size_t numChannels);
304 const void *
getData(
void)
const;
373 double offset,
double scale,
393 void resize(
size_t newNumSamples);
490 const double *
getX(
void)
const;
504 const double *
getY(
void)
const;
518 const double *
getZ(
void)
const;
558 const PointData &src,
size_t srcNumPoints);
566 void resize(
size_t newNumSamples);
582 LT_END_LIDAR_NAMESPACE
bool operator!=(const PointInfo &rhs) const
size_t getNumSamples(void) const
Get the number of samples.
bool hasValidXYZ(void) const
Make sure the PointInfo has X, Y, and Z channels.
ChannelInfo stores the basic properties of a channel.
static void copy(ChannelData &dst, size_t dstOffset, const ChannelData &src, size_t srcOffset, size_t length)
Copy samples between channels.
void setOffset(size_t offset)
dirty hack – only use this if you're the buffer onwer
const double * getY(void) const
Get the Y values.
void init(const ChannelInfo &info, size_t numSamples)
const void * getData(void) const
Get the data buffer.
bool operator==(const PointInfo &rhs) const
DataType getDataType(void) const
Get the data type.
static bool isFloat(DataType dt)
Determine if the datatype is a floating point type.
void init(const char *name, DataType datatype, int bits, double quantization=0)
PointInfo is a group of ChannelInfo objects.
static DataType toDataType(const char *str)
void resize(size_t newNumSamples)
Resize the data buffer.
void init(size_t numChannels)
bool operator!=(const ChannelInfo &rhs) const
bool hasChannel(const char *name) const
Determine if there is a channel with a given name.
void setOffset(size_t offset)
dirty hack – only use this if you're the buffer onwer
bool hasChannel(const char *name) const
Determine if there is a channel with a given name.
static const char * toString(DataType dt)
Get the string representation.
const char * getName(void) const
Get the name.
double getQuantization(void) const
Get the quantization scale.
PointData is a group of ChannelData objects.
size_t getChannelIndex(const char *name) const
Get the index for a given channel.
const double * getX(void) const
Get the X values.
void init(const PointInfo &pointInfo, size_t numSamples)
const double * getZ(void) const
Get the Z values.
const ChannelData & getChannel(size_t idx) const
Access the channel data.
bool operator==(const ChannelInfo &rhs) const
static int byteWidth(DataType dt)
Get the data type size.
const ChannelInfo & getChannel(size_t idx) const
Access the channel info.
size_t getNumChannels(void) const
Get the number of channels.
size_t getNumChannels(void) const
Get the number of channels.
static void merge(PointData &dst, size_t dstNumPoints, const PointData &src, size_t srcNumPoints)
Merge points.
static bool isSigned(DataType dt)
Determine if the datatype is signed.
void resize(size_t newNumSamples)
Resize the data buffer.
static void copy(PointData &dst, size_t dstOffset, const PointData &src, size_t srcOffset, size_t length)
Copy samples between buffers.
Helper functions for interaction with the DataType enum.
void setDataType(DataType datatype)
Channge the data type on the fly.
DataType
Channel data types.
ChannelData adds sample values to the ChannelInfo class.
static void convert(ChannelData &dst, size_t dstOffset, const ChannelData &src, size_t srcOffset, size_t length)
Copy and convert the data type of samples between channel.
size_t getNumSamples(void) const
Get the number of samples.
size_t getBits(void) const
Get the bit precision.