12 #ifndef __LIDAR_POINT_DATA_H__
13 #define __LIDAR_POINT_DATA_H__
17 LT_BEGIN_LIDAR_NAMESPACE
93 #define CHANNEL_NAME_X "X"
94 #define CHANNEL_NAME_Y "Y"
95 #define CHANNEL_NAME_Z "Z"
96 #define CHANNEL_NAME_Intensity "Intensity"
97 #define CHANNEL_NAME_ReturnNum "ReturnNum"
98 #define CHANNEL_NAME_NumReturns "NumReturns"
99 #define CHANNEL_NAME_ScanDir "ScanDir"
100 #define CHANNEL_NAME_EdgeFlightLine "EdgeFlightLine"
101 #define CHANNEL_NAME_ClassId "ClassId"
102 #define CHANNEL_NAME_ScanAngle "ScanAngle"
103 #define CHANNEL_NAME_UserData "UserData"
104 #define CHANNEL_NAME_SourceId "SourceId"
105 #define CHANNEL_NAME_GPSTime "GPSTime"
106 #define CHANNEL_NAME_Red "Red"
107 #define CHANNEL_NAME_Green "Green"
108 #define CHANNEL_NAME_Blue "Blue"
111 #define CHANNEL_NAME_Skip "@Skip"
128 void init(
const char *name,
DataType datatype,
int bits);
136 const char *
getName(
void)
const;
178 void init(
size_t numChannels);
290 const void *
getData(
void)
const;
359 double offset,
double scale,
379 void resize(
size_t newNumSamples);
476 const double *
getX(
void)
const;
490 const double *
getY(
void)
const;
504 const double *
getZ(
void)
const;
544 const PointData &src,
size_t srcNumPoints);
552 void resize(
size_t newNumSamples);
568 LT_END_LIDAR_NAMESPACE
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.
DataType getDataType(void) const
Get the data type.
static bool isFloat(DataType dt)
Determine if the datatype is a floating point type.
PointInfo is a group of ChannelInfo objects.
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
void init(const char *name, DataType datatype, int bits)
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.
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.