42#include <pcl/ml/kmeans.h>
51template <
typename Po
intT>
55template <
typename Po
intT>
59template <
typename Po
intT>
63 if (!initCompute() || (input_ != 0 && input_->points.empty()) ||
64 (indices_ != 0 && indices_->empty())) {
70 std::vector<pcl::PCLPointField> fields;
84 PCL_ERROR(
"Failed to find match for field 'x y z'\n");
88 PCL_INFO(
"Use X Y Z as input data\n");
101 std::cout <<
"x index: " <<
x_index << std::endl;
104 memcpy(&x, &(*input_)[0] + fields[
x_index].offset,
sizeof(
float));
106 std::cout <<
"xxx: " << x << std::endl;
163#define PCL_INSTANTIATE_Kmeans(T) template class PCL_EXPORTS pcl::Kmeans<T>;
Iterator class for point clouds with or without given indices.
ConstCloudIterator(const PointCloud< PointT > &cloud)
~Kmeans()
This destructor destroys.
Kmeans(unsigned int num_points, unsigned int num_dimensions)
Empty constructor.