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;
157 size_t getBits(
void)
const;
164 double getQuantization(
void)
const;
165 void setQuantization(
double value);
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);
208 size_t getNumChannels(
void)
const;
238 bool hasChannel(
const char *name)
const;
248 const ChannelInfo *getChannel(
const char *name)
const;
268 size_t getChannelIndex(
const char *name)
const;
276 bool hasValidXYZ(
void)
const;
279 bool operator==(
const PointInfo &rhs)
const;
297 void init(
const ChannelInfo &info,
size_t numSamples);
305 size_t getNumSamples(
void)
const;
315 const void *getData(
void)
const;
340 static void copy(
ChannelData &dst,
size_t dstOffset,
359 static void convert(
ChannelData &dst,
size_t dstOffset,
382 static void convert(
ChannelData &dst,
size_t dstOffset,
384 double offset,
double scale,
396 void setDataType(
DataType datatype);
404 void resize(
size_t newNumSamples);
407 void setOffset(
size_t offset);
410 void setData(
void *data,
bool deleteData);
434 void init(
const PointInfo &pointInfo,
size_t numSamples);
441 size_t getNumChannels(
void)
const;
449 size_t getNumSamples(
void)
const;
479 bool hasChannel(
const char *name)
const;
489 const ChannelData *getChannel(
const char *name)
const;
506 const double *getX(
void)
const;
520 const double *getY(
void)
const;
534 const double *getZ(
void)
const;
556 static void copy(
PointData &dst,
size_t dstOffset,
573 static void merge(
PointData &dst,
size_t dstNumPoints,
574 const PointData &src,
size_t srcNumPoints);
582 void resize(
size_t newNumSamples);
585 void setOffset(
size_t offset);
598 LT_END_LIDAR_NAMESPACE
bool operator!=(const ChannelInfo &rhs) const
static const char * toString(DataType dt)
Get the string representation.
bool operator!=(const PointInfo &rhs) const
Helper functions for interaction with the DataType enum.
PointInfo is a group of ChannelInfo objects.
DataType
Channel data types.
static bool isSigned(DataType dt)
Determine if the datatype is signed.
PointData is a group of ChannelData objects.
ChannelInfo stores the basic properties of a channel.
static DataType toDataType(const char *str)
ChannelData adds sample values to the ChannelInfo class.
static int byteWidth(DataType dt)
Get the data type size.
static bool isFloat(DataType dt)
Determine if the datatype is a floating point type.