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_ScannerChannel "ScannerChannel"
103 #define CHANNEL_NAME_ClassId "ClassId"
104 #define CHANNEL_NAME_ClassFlags "ClassFlags"
105 #define CHANNEL_NAME_ScanAngle "ScanAngle"
106 #define CHANNEL_NAME_UserData "UserData"
107 #define CHANNEL_NAME_SourceId "SourceId"
108 #define CHANNEL_NAME_GPSTime_Week "GPSTime"
109 #define CHANNEL_NAME_GPSTime_Adjusted "GPSTime_Adjusted"
110 #define CHANNEL_NAME_Red "Red"
111 #define CHANNEL_NAME_Green "Green"
112 #define CHANNEL_NAME_Blue "Blue"
113 #define CHANNEL_NAME_NearInfrared "NearInfrared"
116 #define CHANNEL_NAME_Skip "@Skip"
133 void init(
const char *name,
DataType datatype,
int bits,
double quantization = 0);
141 const char *
getName(
void)
const;
192 void init(
size_t numChannels);
196 void init(
const PointInfo &pointInfo,
const char *
const *channels,
size_t numChannels);
197 void init(
const PointData &pointData,
const char *
const *channels,
size_t numChannels);
199 void init(
const PointInfo &pointInfo,
const size_t *channels,
size_t numChannels);
200 void init(
const PointData &pointData,
const size_t *channels,
size_t numChannels);
315 const void *
getData(
void)
const;
384 double offset,
double scale,
404 void resize(
size_t newNumSamples);
410 void setData(
void *data,
bool deleteData);
506 const double *
getX(
void)
const;
520 const double *
getY(
void)
const;
534 const double *
getZ(
void)
const;
574 const PointData &src,
size_t srcNumPoints);
582 void resize(
size_t newNumSamples);
598 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)
void setQuantization(double value)
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.
void setData(void *data, bool deleteData)
change the buffer
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.