ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Set operations on pcl indices

asked 2014-06-18 15:31:54 -0500

I'm not sure if PCL specific questions are welcome here but:

I'm looking at doing standard set operations on indices of PCL point clouds. I can certainly implement such a thing myself, but would prefer to do it some standard/canonical way. Unfortunately after a bit of searching I'm seeing no evidence that such functionality exists natively.

Can someone verify one way or another: Is there a cannoical way to do set operations on PCL point cloud indices?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-06-19 22:58:23 -0500

fergs gravatar image

Would pcl::PointIndices class be what you are looking for? Throughout a lot of PCL code, they use these indices to select which point in a cloud to perform a particular operation on. Most of the core filters have a "SetInputCloud" and "SetIndices" functions and then a "filter" or "segment" or "extract" or whatnot function that acts on that subset of the cloud (if no indices are set, it is assumed to use the entire cloud).

edit flag offensive delete link more


I ended up creating a collection of functions for std::sort and std::set_union/difference etc reaching into the guts of `PointIndices` But, I'm surprised the functionality doesn't exist as reaching into the guts of a custom data type and performing such operations is a development no-no/code-smell.

Asomerville gravatar image Asomerville  ( 2014-06-24 10:19:50 -0500 )edit

Question Tools

1 follower


Asked: 2014-06-18 15:31:54 -0500

Seen: 683 times

Last updated: Jun 19 '14