Mech-Eye API 2.5.0
API reference documentation for Mech-Eye 3D Laser Profiler
|
Represents a batch of profiles, which can be obtained by calling Profiler::retrieveBatchData(). It contains four elements of profile index, encoder value, intensity image, and depth map. More...
#include <ProfileData.h>
Public Types | |
enum class | BatchFlag { Success , Incomplete = 0x1 } |
Describes the status of the ProfileBatch object. More... | |
using | ProfileIndexArray = BatchArray< unsigned int > |
using | EncoderArray = BatchArray< unsigned int > |
using | IntensityImage = BatchArray< unsigned char > |
using | DepthMap = BatchArray< float > |
using | UntexturedPointCloud = BatchArray< PointXYZ > |
using | PointCloud = UntexturedPointCloud |
using | TexturedPointCloud = BatchArray< PointXYZI > |
Public Member Functions | |
ProfileBatch (size_t width) | |
Constructor. | |
~ProfileBatch ()=default | |
Default destructor. | |
size_t | width () const |
Returns the width of the ProfileBatch object (the number of data points per profile). | |
size_t | height () const |
Returns the height of the ProfileBatch object (the number of profiles in the batch). | |
size_t | validHeight () const |
Returns the valid height of the ProfileBatch object (the number of profiles with valid intensity and depth data in the batch). | |
bool | isEmpty () const |
Checks if the ProfileBatch object has no elements. | |
void | reserve (size_t height) |
Reserves the input height for the ProfileBatch object. | |
bool | append (const ProfileBatch &batch) |
Appends the data of one ProfileBatch object to another. | |
void | clear () |
Clears the data in the ProfileBatch object. | |
Profile | getProfile (size_t profileIndex) const |
Gets a profile in the batch by inputting the index of the profile. | |
ProfileIndexArray | getProfileIndexArray () const |
Gets an array of indices of all profiles in the batch. Each profile data corresponds to an index. | |
EncoderArray | getEncoderArray () const |
Gets an array of encoder values of all profiles in the batch. Each profile data corresponds to an encoder value. | |
IntensityImage | getIntensityImage () const |
Gets the intensity image data in the batch. The invalid data of intensity image is 0. | |
DepthMap | getDepthMap () const |
Gets the depth map data in the batch. Each point in DepthMap contains the Z information in the laser profiler coordinate system. The depth data unit is mm, and invalid data is nan. | |
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, Y, and Z information in the laser profiler coordinate system. The space of the X coordinate data is determined by the xResolution argument. The X coordinate data is determined by the column index. The space of the Y coordinate data is determined by yResolution argument. The Y coordinate data is determined by the encoder values if the useEncoderValues argument is set to true and row index otherwise. The depth data unit is mm, and invalid data is nan. | |
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, Y, Z, and Intensity information in the laser profiler coordinate system. The space of the X coordinate data is determined by the xResolution argument. The X coordinate data is determined by the column index. The space of the Y coordinate data is determined by yResolution argument. The Y coordinate data is determined by the encoder values if the useEncoderValues argument is set to true and row index otherwise. The depth data unit is mm, and invalid data is nan. | |
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, Y, and Z information in the laser profiler coordinate system. The space of the X coordinate data is determined by the xResolution argument. The X coordinate data is determined by the column index. The space of the Y coordinate data is determined by yResolution argument. The Y coordinate data is determined by the encoder values if the useEncoderValues argument is set to true and row index otherwise. The depth data unit is mm, and invalid data is nan. | |
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, Y, Z, and Intensity information in the laser profiler coordinate system. The space of the X coordinate data is determined by the xResolution argument. The X coordinate data is determined by the column index. The space of the Y coordinate data is determined by yResolution argument. The Y coordinate data is determined by the encoder values if the useEncoderValues argument is set to true and row index otherwise. The depth data unit is mm, and invalid data is nan. | |
ErrorStatus | getErrorStatus () const |
Gets the error code and description of the function. | |
int | getFlag () const |
Gets the flags of the ProfileBatch object. See BatchFlag for details. | |
bool | checkFlag (BatchFlag flag) const |
Checks if the BatchFlag value of the ProfileBatch object matches the input value. | |
Static Public Member Functions | |
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, Y, and Z information in the laser profiler coordinate system. The depth data unit is mm, and invalid data is nan. | |
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, Y, Z, and Intensity information in the laser profiler coordinate system. The depth data unit is mm, and invalid data is nan. | |
Friends | |
class | ProfilerImpl |
class | VirtualProfilerImpl |
Represents a batch of profiles, which can be obtained by calling Profiler::retrieveBatchData(). It contains four elements of profile index, encoder value, intensity image, and depth map.
Definition at line 41 of file ProfileData.h.
using mmind::eye::ProfileBatch::DepthMap = BatchArray<float> |
Definition at line 57 of file ProfileData.h.
using mmind::eye::ProfileBatch::EncoderArray = BatchArray<unsigned int> |
Definition at line 55 of file ProfileData.h.
using mmind::eye::ProfileBatch::IntensityImage = BatchArray<unsigned char> |
Definition at line 56 of file ProfileData.h.
Definition at line 59 of file ProfileData.h.
using mmind::eye::ProfileBatch::ProfileIndexArray = BatchArray<unsigned int> |
Definition at line 54 of file ProfileData.h.
Definition at line 60 of file ProfileData.h.
Definition at line 58 of file ProfileData.h.
|
strong |
Describes the status of the ProfileBatch object.
Enumerator | |
---|---|
Success | All profiles in the ProfileBatch object contain valid intensity and depth data. |
Incomplete | Some profiles in the ProfileBatch object do not contain valid intensity and depth data. |
Definition at line 47 of file ProfileData.h.
TexturedPointCloud mmind::eye::ProfileBatch::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, Y, Z, and Intensity information in the laser profiler coordinate system. The space of the X coordinate data is determined by the xResolution argument. The X coordinate data is determined by the column index. The space of the Y coordinate data is determined by yResolution argument. The Y coordinate data is determined by the encoder values if the useEncoderValues argument is set to true and row index otherwise. The depth data unit is mm, and invalid data is nan.
[in] | xResolution | determines the space of the X coordinate data. |
[in] | yResolution | determines the space of the Y coordinate data. |
[in] | useEncoderValues | determines whether to use the encoder values or row index as the data source for Y coordinate data. |
[in] | triggerInterval | trigger interval of the encoder values. |
[in] | coordinateUnit | the coordinate unit of the point cloud. |
UntexturedPointCloud mmind::eye::ProfileBatch::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, Y, and Z information in the laser profiler coordinate system. The space of the X coordinate data is determined by the xResolution argument. The X coordinate data is determined by the column index. The space of the Y coordinate data is determined by yResolution argument. The Y coordinate data is determined by the encoder values if the useEncoderValues argument is set to true and row index otherwise. The depth data unit is mm, and invalid data is nan.
[in] | xResolution | determines the space of the X coordinate data. |
[in] | yResolution | determines the space of the Y coordinate data. |
[in] | useEncoderValues | determines whether to use the encoder values or row index as the data source for Y coordinate data. |
[in] | triggerInterval | trigger interval of the encoder values. |
[in] | coordinateUnit | the coordinate unit of the point cloud. |
|
static |
Saves the textured point cloud data in the batch. Each point in TexturedPointCloud contains the X, Y, Z, and Intensity information in the laser profiler coordinate system. The depth data unit is mm, and invalid data is nan.
[in] | pointCloud | The point cloud to be saved. See TexturedPointCloud for details. |
[in] | fileFormat | The format of the point cloud file. Possible values include PLY, PCD, and CSV. See FileFormat for details. |
[in] | fileName | The filename of the point cloud file. |
[in] | isOrganized | Whether the point cloud is organized. An organized point cloud saves all points in order, with invalid data as nan, and an unorganized point cloud saves only valid points. |
[in] | coordinateUnit | the coordinate unit of the point cloud. |
ErrorStatus mmind::eye::ProfileBatch::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, Y, Z, and Intensity information in the laser profiler coordinate system. The space of the X coordinate data is determined by the xResolution argument. The X coordinate data is determined by the column index. The space of the Y coordinate data is determined by yResolution argument. The Y coordinate data is determined by the encoder values if the useEncoderValues argument is set to true and row index otherwise. The depth data unit is mm, and invalid data is nan.
[in] | xResolution | determines the space of the X coordinate data. |
[in] | yResolution | determines the space of the Y coordinate data. |
[in] | useEncoderValues | determines whether to use the encoder values or row index as the data source for Y coordinate data. |
[in] | triggerInterval | trigger interval of the encoder values. |
[in] | fileFormat | The format of the point cloud file. Possible values include PLY, PCD, and CSV. See FileFormat for details. |
[in] | fileName | The filename of the point cloud file. |
[in] | coordinateUnit | the coordinate unit of the point cloud. |
[in] | isOrganized | Whether the point cloud is organized. An organized point cloud saves all points in order, with invalid data as nan, and an unorganized point cloud saves only valid points. |
|
static |
Saves the untextured point cloud data in the batch. Each point in UntexturedPointCloud contains the X, Y, and Z information in the laser profiler coordinate system. The depth data unit is mm, and invalid data is nan.
[in] | pointCloud | The point cloud to be saved. See UntexturedPointCloud for details. |
[in] | fileFormat | The format of the point cloud file. Possible values include PLY, PCD, and CSV. See FileFormat for details. |
[in] | fileName | The filename of the point cloud file. |
[in] | isOrganized | Whether the point cloud is organized. An organized point cloud saves all points in order, with invalid data as nan, and an unorganized point cloud saves only valid points. |
[in] | coordinateUnit | the coordinate unit of the point cloud. |
ErrorStatus mmind::eye::ProfileBatch::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, Y, and Z information in the laser profiler coordinate system. The space of the X coordinate data is determined by the xResolution argument. The X coordinate data is determined by the column index. The space of the Y coordinate data is determined by yResolution argument. The Y coordinate data is determined by the encoder values if the useEncoderValues argument is set to true and row index otherwise. The depth data unit is mm, and invalid data is nan.
[in] | xResolution | determines the space of the X coordinate data. |
[in] | yResolution | determines the space of the Y coordinate data. |
[in] | useEncoderValues | determines whether to use the encoder values or row index as the data source for Y coordinate data. |
[in] | triggerInterval | trigger interval of the encoder values. |
[in] | fileFormat | The format of the point cloud file. Possible values include PLY, PCD, and CSV. See FileFormat for details. |
[in] | fileName | The filename of the point cloud file. |
[in] | coordinateUnit | the coordinate unit of the point cloud. |
[in] | isOrganized | Whether the point cloud is organized. An organized point cloud saves all points in order, with invalid data as nan, and an unorganized point cloud saves only valid points. |
|
friend |
Definition at line 303 of file ProfileData.h.
|
friend |
Definition at line 304 of file ProfileData.h.