0

I am using CGAL for point cloud processing, and generating mesh out of it using Scale-Space reconstruction.

I recently require to save color and normal information. So, I used boost::tuple(Point_3, Vector_3, CGAL::Color) for filters: simplification, outlier removal and normal estimations/orientation. Now triangulating the cloud using Scale-Space reconstruction is only accepting vector of points, not the tuple I have created.

typedef CGAL::Scale_space_surface_reconstruction_3< Kernel > Reconstruction;
Reconstruction reconstruct;
reconstruct.insert( points.begin(), points.end());
//Error if points is defined as vector<PointNormalColorTuple>
//Works if points are vector<Point_3>
//There is no parameter in insert and reconstruct_surface, where I can define property map:
//CGAL::Nth_of_tuple_property_map<0,PointNormalColorTuple>()

I cannot copy data in a new vector<Point_3> as color information will be lost. Any suggestions would be helpful.

Syed
  • 550
  • 1
  • 7
  • 22
  • It is indeed not possible. I suggest you submit a [feature request](https://github.com/CGAL/cgal/issues). – sloriot Jun 14 '16 at 08:04
  • Thanks @sloriot for the clarification. – Syed Jun 14 '16 at 08:14
  • Actually I think that the order of the points is preserved. That is the indices in the reconstruction should be the one of your input points. – sloriot Jun 14 '16 at 12:07
  • That's correct. I can obtain points from input cloud using indices in the reconstruction, but reconstruction need to be done only on vector points. – Syed Jun 15 '16 at 04:03
  • Use a [`transform_iterator`](http://www.boost.org/doc/libs/1_53_0/libs/iterator/doc/transform_iterator.html). – sloriot Jun 15 '16 at 07:18

0 Answers0