|
4 | 4 | * |
5 | 5 | */ |
6 | 6 |
|
7 | | -#define _CRT_SECURE_NO_WARNINGS |
8 | | - |
9 | 7 | #ifndef OCTREE_GENERATOR_H |
10 | 8 | #define OCTREE_GENERATOR_H |
11 | | - |
12 | | -//#include <pcl/point_cloud.h> |
13 | | -#include <pcl/octree/octree.h> |
14 | 9 | // #include <pcl/octree/octree_impl.h> |
15 | 10 |
|
16 | 11 | #include <pcl/common/centroid.h> |
17 | | -#include <pcl/common/concatenate.h> |
18 | | -#include <pcl/common/copy_point.h> |
19 | | -#include <pcl/common/io.h> |
20 | | -#include <pcl/pcl_macros.h> |
21 | | -#include <pcl/point_types.h> |
22 | | - |
23 | | -#include <cstdio> |
24 | | -#include <cstdlib> |
25 | | -#include <fstream> |
26 | | -#include <iostream> |
27 | | -#include <locale> // std::locale, std::isdigit |
28 | | -#include <pcl/impl/point_types.hpp> |
29 | | -#include <string> |
| 12 | +#include <pcl/octree/octree.h> |
| 13 | +#include <pcl/octree/octree_search.h> |
| 14 | +#include <pcl/point_cloud.h> |
| 15 | + |
| 16 | +#include <Eigen/Core> |
30 | 17 | #include <vector> |
31 | 18 |
|
32 | 19 | #include "HTRBasicDataStructures.h" |
@@ -93,28 +80,12 @@ class OctreeGenerator { |
93 | 80 | void calculateCloudCentroid(); |
94 | 81 | }; |
95 | 82 |
|
96 | | -/// Initializes pcl's cloud data structure from a vector of any type containing x, y, and z member |
97 | | -/// variables. |
| 83 | +/// Initializes pcl's cloud data structure from a vector of any type containing x, y, and z member variables. |
98 | 84 | ///@param[in] points The input data vector. |
99 | 85 | template <typename T> |
100 | 86 | void OctreeGenerator::initCloudFromVector(const std::vector<T> &points, const pcl::PointCloud<pcl::PointXYZRGB>::Ptr &input_cloud) { |
101 | 87 | // Note: Width and Height are only used to store the cloud as an image. |
102 | 88 | // Source width and height can be used instead of a linear representation. |
103 | | - // pcl::copyPointCloud<pcl::PointXYZRGB, pcl::PointXYZRGB>(*input_cloud, *cloud); |
104 | | - // pcl::PointCloud<pcl::PointXYZRGB>::Ptr new_cloud(new pcl::PointCloud<pcl::PointXYZRGB>()); |
105 | | - // pcl::copyPointCloud<pcl::mod_pointXYZ>(*input_cloud, cloud); |
106 | | - /* |
107 | | - for (const pcl::mod_pointXYZ &point : input_cloud) { |
108 | | - point. |
109 | | - cloud->points.push_back(point); |
110 | | - } |
111 | | -*/ |
112 | | - // cloud_xyzrgb.reset(new pcl::PointCloud<pcl::PointXYZRGB>()); |
113 | | - // pcl::copyPointCloud(*input_cloud, *cloud_xyzrgb); |
114 | | - |
115 | | - // cloud_xyzrgb->width = input_cloud->points.size(); |
116 | | - // cloud_xyzrgb->height = 1; |
117 | | - |
118 | 89 | cloud->width = input_cloud->points.size(); |
119 | 90 | cloud->height = 1; |
120 | 91 |
|
|
0 commit comments