#include <cloud_mask.h>
◆ CloudMask()
| apollo::perception::lidar::CloudMask::CloudMask |
( |
| ) |
|
|
default |
◆ ~CloudMask()
| apollo::perception::lidar::CloudMask::~CloudMask |
( |
| ) |
|
|
default |
◆ AddIndices() [1/2]
| void apollo::perception::lidar::CloudMask::AddIndices |
( |
const base::PointIndices & |
indices, |
|
|
int |
value = 1 |
|
) |
| |
在文件 cloud_mask.cc 第 66 行定义.
66 {
68}
void AddIndices(const base::PointIndices &indices, int value=1)
◆ AddIndices() [2/2]
template<typename IntegerType >
| void apollo::perception::lidar::CloudMask::AddIndices |
( |
const std::vector< IntegerType > & |
indices, |
|
|
int |
value = 1 |
|
) |
| |
在文件 cloud_mask.h 第 142 行定义.
142 {
143 for (auto& id : indices) {
144 mask_[id] = value;
145 }
146}
◆ AddIndicesOfIndices()
在文件 cloud_mask.cc 第 70 行定义.
72 {
73 for (auto& id : indices_of_indices.indices) {
74 mask_[indices.indices[id]] = value;
75 }
76}
◆ clear()
| void apollo::perception::lidar::CloudMask::clear |
( |
| ) |
|
|
inline |
◆ Fill()
| void apollo::perception::lidar::CloudMask::Fill |
( |
int |
value | ) |
|
|
inline |
在文件 cloud_mask.h 第 40 行定义.
40{ std::fill(mask_.begin(), mask_.end(), value); }
◆ Flip()
| void apollo::perception::lidar::CloudMask::Flip |
( |
| ) |
|
在文件 cloud_mask.cc 第 60 行定义.
60 {
61 for (auto& i : mask_) {
62 i = i > 0 ? 0 : 1;
63 }
64}
◆ GetValidCloud()
在文件 cloud_mask.cc 第 35 行定义.
36 {
37 if (target_cloud == nullptr) {
38 return;
39 }
40 indices_.clear();
41 indices_.reserve(mask_.size());
42 for (size_t i = 0; i < mask_.size(); ++i) {
43 if (mask_[i] > 0) {
44 indices_.push_back(static_cast<int>(i));
45 }
46 }
47 target_cloud->CopyPointCloud(source_cloud, indices_);
48}
◆ GetValidIndices() [1/2]
| std::vector< int > apollo::perception::lidar::CloudMask::GetValidIndices |
( |
| ) |
|
◆ GetValidIndices() [2/2]
| void apollo::perception::lidar::CloudMask::GetValidIndices |
( |
base::PointIndices * |
indices | ) |
|
在文件 cloud_mask.cc 第 50 行定义.
50 {
51 indices->indices.clear();
52 indices->indices.reserve(mask_.size());
53 for (size_t i = 0; i < mask_.size(); ++i) {
54 if (mask_[i] > 0) {
55 indices->indices.push_back(static_cast<int>(i));
56 }
57 }
58}
◆ GetValidMask()
| void apollo::perception::lidar::CloudMask::GetValidMask |
( |
CloudMask * |
rhs | ) |
const |
在文件 cloud_mask.cc 第 90 行定义.
90 {
91 if (rhs == nullptr) {
92 return;
93 }
94 rhs->clear();
95 for (const auto& i : mask_) {
96 if (i > 0) {
97 rhs->mask_.push_back(i);
98 }
99 }
100}
◆ mask()
| const std::vector< int > & apollo::perception::lidar::CloudMask::mask |
( |
| ) |
const |
|
inline |
◆ operator[]() [1/2]
| int & apollo::perception::lidar::CloudMask::operator[] |
( |
int |
id | ) |
|
|
inline |
◆ operator[]() [2/2]
| const int & apollo::perception::lidar::CloudMask::operator[] |
( |
int |
id | ) |
const |
|
inline |
◆ RemoveIndices() [1/2]
| void apollo::perception::lidar::CloudMask::RemoveIndices |
( |
const base::PointIndices & |
indices | ) |
|
在文件 cloud_mask.cc 第 78 行定义.
78 {
80}
void RemoveIndices(const base::PointIndices &indices)
◆ RemoveIndices() [2/2]
template<typename IntegerType >
| void apollo::perception::lidar::CloudMask::RemoveIndices |
( |
const std::vector< IntegerType > & |
indices | ) |
|
在文件 cloud_mask.h 第 149 行定义.
149 {
150 for (auto& id : indices) {
151 mask_[id] = 0;
152 }
153}
◆ RemoveIndicesOfIndices()
在文件 cloud_mask.cc 第 82 行定义.
84 {
85 for (auto& id : indices_of_indices.indices) {
86 mask_[indices.indices[id]] = 0;
87 }
88}
◆ ResetValue()
| void apollo::perception::lidar::CloudMask::ResetValue |
( |
int |
source_value, |
|
|
int |
target_value |
|
) |
| |
在文件 cloud_mask.cc 第 102 行定义.
102 {
103 for (auto& i : mask_) {
104 if (i == source_value) {
105 i = target_value;
106 }
107 }
108}
◆ Set()
| void apollo::perception::lidar::CloudMask::Set |
( |
size_t |
size, |
|
|
int |
init_value |
|
) |
| |
|
inline |
◆ size()
| size_t apollo::perception::lidar::CloudMask::size |
( |
| ) |
const |
|
inline |
◆ ValidIndicesCount() [1/2]
| size_t apollo::perception::lidar::CloudMask::ValidIndicesCount |
( |
| ) |
const |
在文件 cloud_mask.cc 第 25 行定义.
25 {
26 size_t count = 0;
27 for (auto& i : mask_) {
28 if (i > 0) {
29 ++count;
30 }
31 }
32 return count;
33}
◆ ValidIndicesCount() [2/2]
template<typename IntegerType >
| size_t apollo::perception::lidar::CloudMask::ValidIndicesCount |
( |
const std::vector< IntegerType > & |
indices | ) |
const |
在文件 cloud_mask.h 第 156 行定义.
157 {
158 size_t count = 0;
159 for (const auto& id : indices) {
160 if (mask_[id]) {
161 ++count;
162 }
163 }
164 return count;
165}
该类的文档由以下文件生成: