4#include "CommonTypes.h"
5#include "ErrorStatus.h"
10class ProfileBatchImpl;
59 using PointCloud = UntexturedPointCloud;
154 double xResolution,
double yResolution,
bool useEncoderValues,
int triggerInterval,
155 CoordinateUnit coordinateUnit = CoordinateUnit::Millimeter)
const;
174 double xResolution,
double yResolution,
bool useEncoderValues,
int triggerInterval,
175 CoordinateUnit coordinateUnit = CoordinateUnit::Millimeter)
const;
204 bool useEncoderValues,
int triggerInterval,
205 FileFormat fileFormat,
const std::string& fileName,
206 CoordinateUnit coordinateUnit = CoordinateUnit::Millimeter,
207 bool isOrganized =
false)
const;
236 bool useEncoderValues,
int triggerInterval,
237 FileFormat fileFormat,
const std::string& fileName,
238 CoordinateUnit coordinateUnit = CoordinateUnit::Millimeter,
239 bool isOrganized =
false)
const;
262 bool isOrganized =
false, CoordinateUnit coordinateUnit = CoordinateUnit::Millimeter);
283 const TexturedPointCloud& pointCloud, FileFormat FileFormat,
const std::string& fileName,
284 bool isOrganized =
false, CoordinateUnit coordinateUnit = CoordinateUnit::Millimeter);
302 std::shared_ptr<ProfileBatchImpl> _impl;
303 friend class ProfilerImpl;
304 friend class VirtualProfilerImpl;
Represents the data struct of the profile data.
Represents a batch of profiles, which can be obtained by calling Profiler::retrieveBatchData()....
bool isEmpty() const
Checks if the ProfileBatch object has no elements.
EncoderArray getEncoderArray() const
Gets an array of encoder values of all profiles in the batch. Each profile data corresponds to an enc...
IntensityImage getIntensityImage() const
Gets the intensity image data in the batch. The invalid data of intensity image is 0.
int getFlag() const
Gets the flags of the ProfileBatch object. See BatchFlag for details.
void reserve(size_t height)
Reserves the input height for the ProfileBatch object.
static ErrorStatus saveUntexturedPointCloud(const UntexturedPointCloud &pointCloud, FileFormat fileFormat, const std::string &fileName, bool isOrganized=false, CoordinateUnit coordinateUnit=CoordinateUnit::Millimeter)
Saves the untextured point cloud data in the batch. Each point in UntexturedPointCloud contains the X...
TexturedPointCloud getTexturedPointCloud(double xResolution, double yResolution, bool useEncoderValues, int triggerInterval, CoordinateUnit coordinateUnit=CoordinateUnit::Millimeter) const
Gets the textured point cloud data in the batch. Each point in TexturedPointCloud contains the X,...
UntexturedPointCloud getUntexturedPointCloud(double xResolution, double yResolution, bool useEncoderValues, int triggerInterval, CoordinateUnit coordinateUnit=CoordinateUnit::Millimeter) const
Gets the untextured point cloud data in the batch. Each point in UntexturedPointCloud contains the X,...
size_t validHeight() const
Returns the valid height of the ProfileBatch object (the number of profiles with valid intensity and ...
void clear()
Clears the data in the ProfileBatch object.
~ProfileBatch()=default
Default destructor.
bool checkFlag(BatchFlag flag) const
Checks if the BatchFlag value of the ProfileBatch object matches the input value.
ProfileBatch(size_t width)
Constructor.
ErrorStatus saveUntexturedPointCloud(double xResolution, double yResolution, bool useEncoderValues, int triggerInterval, FileFormat fileFormat, const std::string &fileName, CoordinateUnit coordinateUnit=CoordinateUnit::Millimeter, bool isOrganized=false) const
Saves the untextured point cloud data in the batch. Each point in UntexturedPointCloud contains the X...
ProfileIndexArray getProfileIndexArray() const
Gets an array of indices of all profiles in the batch. Each profile data corresponds to an index.
ErrorStatus saveTexturedPointCloud(double xResolution, double yResolution, bool useEncoderValues, int triggerInterval, FileFormat fileFormat, const std::string &fileName, CoordinateUnit coordinateUnit=CoordinateUnit::Millimeter, bool isOrganized=false) const
Saves the textured point cloud data in the batch. Each point in TexturedPointCloud contains the X,...
static ErrorStatus saveTexturedPointCloud(const TexturedPointCloud &pointCloud, FileFormat FileFormat, const std::string &fileName, bool isOrganized=false, CoordinateUnit coordinateUnit=CoordinateUnit::Millimeter)
Saves the textured point cloud data in the batch. Each point in TexturedPointCloud contains the X,...
size_t width() const
Returns the width of the ProfileBatch object (the number of data points per profile).
ErrorStatus getErrorStatus() const
Gets the error code and description of the function.
bool append(const ProfileBatch &batch)
Appends the data of one ProfileBatch object to another.
size_t height() const
Returns the height of the ProfileBatch object (the number of profiles in the batch).
BatchFlag
Describes the status of the ProfileBatch object.
DepthMap getDepthMap() const
Gets the depth map data in the batch. Each point in DepthMap contains the Z information in the laser ...
Profile getProfile(size_t profileIndex) const
Gets a profile in the batch by inputting the index of the profile.
Describes the types of errors.
Represents a point in ProfileBatch::TexturedPointCloud with the coordinate (x, y, z,...
float z
Z channel, default unit: mm, invalid data: nan.
float x
X channel, default unit: mm, invalid data: nan.
unsigned char intensity
intensity channel.
float y
Y channel, default unit: mm, invalid data: nan.
Describes a single profile.
const unsigned char * intensity
Pointer to the intensity values of the profile.
unsigned int encoder
Corresponding encoder value of the profile.
unsigned int profileIndex
Index of the profile.