Mech-Eye API Reference 2.1.4-alpha
API reference documentation for Mech-Eye 3D Laser Profiler
All Classes Functions Variables Enumerations Enumerator Pages
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};
21};
22
27{
28public:
33
37 MMIND_API_EXPORT ProfileBatch(size_t width);
38
42 MMIND_API_EXPORT ~ProfileBatch() = default;
43
47 MMIND_API_EXPORT size_t width() const;
48
52 MMIND_API_EXPORT size_t height() const;
53
57 MMIND_API_EXPORT bool isEmpty() const;
58
62 MMIND_API_EXPORT void reserve(size_t height);
63
67 MMIND_API_EXPORT void append(const ProfileBatch& batch);
68
72 MMIND_API_EXPORT void clear();
73
77 MMIND_API_EXPORT Profile getProfile(size_t profileIndex) const;
78
82 MMIND_API_EXPORT ProfileIndexArray getProfileIndexArray() const;
83
87 MMIND_API_EXPORT EncoderArray getEncoderArray() const;
88
92 MMIND_API_EXPORT IntensityImage getIntensityImage() const;
93
97 MMIND_API_EXPORT DepthMap getDepthMap() const;
101 MMIND_API_EXPORT ErrorStatus getErrorStatus() const;
102
103private:
104 std::shared_ptr<ProfileBatchImpl> _impl;
105 friend class ProfilerImpl;
106};
107} // namespace eye
108} // namespace mmind
Represents the data structure of the profile data.
Definition BatchArray.h:15
Represents a batch of profiles.
Definition ProfileData.h:27
MMIND_API_EXPORT DepthMap getDepthMap() const
Gets the depth map data in the batch.
MMIND_API_EXPORT ErrorStatus getErrorStatus() const
Gets the error code and description of the function.
MMIND_API_EXPORT void clear()
Clears the data in the ProfileBatch object.
MMIND_API_EXPORT size_t height() const
Returns the height of the ProfileBatch object (number of profiles in the batch).
MMIND_API_EXPORT ProfileIndexArray getProfileIndexArray() const
Gets an array of indices of all profiles in the batch.
MMIND_API_EXPORT ~ProfileBatch()=default
Default destructor.
MMIND_API_EXPORT IntensityImage getIntensityImage() const
Gets the intensity image data in the batch.
MMIND_API_EXPORT void append(const ProfileBatch &batch)
Appends the data of one ProfileBatch object to another.
MMIND_API_EXPORT ProfileBatch(size_t width)
Constructor with parameter.
MMIND_API_EXPORT size_t width() const
Returns the width of the ProfileBatch object (number of data points per profile).
MMIND_API_EXPORT EncoderArray getEncoderArray() const
Gets an array of encoder values of all profiles in the batch.
MMIND_API_EXPORT bool isEmpty() const
Checks if the ProfileBatch object has no elements.
MMIND_API_EXPORT Profile getProfile(size_t profileIndex) const
Gets a profile in the batch by inputting the index of the profile.
MMIND_API_EXPORT void reserve(size_t height)
Reserves the input height for the ProfileBatch object.
The types of errors.
Definition ErrorStatus.h:11
Represents 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
Pointer to the depth values of the profile.
Definition ProfileData.h:20
unsigned int profileIndex
Index of the profile.
Definition ProfileData.h:17