Mech-Eye API 2.3.3
API reference documentation for Mech-Eye 3D Laser Profiler
Loading...
Searching...
No Matches
ProfileData.h
1#pragma once
2#include "api_global.h"
3#include "BatchArray.h"
4#include "CommonTypes.h"
5#include "ErrorStatus.h"
6
7namespace mmind {
8namespace eye {
9
10class ProfileBatchImpl;
11
15struct Profile
16{
17 unsigned int profileIndex{0};
18 unsigned int encoder{0};
19 const unsigned char* intensity{nullptr};
20 const float* depth{nullptr};
22};
23
29class MMIND_API_EXPORT ProfileBatch
30{
31public:
36
40 ProfileBatch(size_t width);
41
45 ~ProfileBatch() = default;
46
50 size_t width() const;
51
55 size_t height() const;
56
60 bool isEmpty() const;
61
65 void reserve(size_t height);
66
70 bool append(const ProfileBatch& batch);
71
75 void clear();
76
80 Profile getProfile(size_t profileIndex) const;
81
87
93
98
109
110private:
111 std::shared_ptr<ProfileBatchImpl> _impl;
112 friend class ProfilerImpl;
113 friend class VirtualProfilerImpl;
114};
115} // namespace eye
116} // namespace mmind
Represents the data struct of the profile data.
Definition BatchArray.h:15
Represents a batch of profiles, which can be obtained by calling Profiler::retrieveBatchData()....
Definition ProfileData.h:30
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.
void reserve(size_t height)
Reserves the input height for the ProfileBatch object.
void clear()
Clears the data in the ProfileBatch object.
~ProfileBatch()=default
Default destructor.
ProfileBatch(size_t width)
Constructor.
ProfileIndexArray getProfileIndexArray() const
Gets an array of indices of all profiles in the batch. Each profile data corresponds to an index.
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).
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.
Definition ErrorStatus.h:12
Describes a single profile.
Definition ProfileData.h:16
const unsigned char * intensity
Pointer to the intensity values of the profile.
Definition ProfileData.h:19
unsigned int encoder
Corresponding encoder value of the profile.
Definition ProfileData.h:18
const float * depth
Definition ProfileData.h:20
unsigned int profileIndex
Index of the profile.
Definition ProfileData.h:17