Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added method to get point indices from convex_hull #1213

Merged
merged 1 commit into from
Apr 25, 2015

Conversation

SvenAlbrecht
Copy link
Contributor

  • Added method 'getHullPointIndices ()' to retrieve the indices of the
    input point cloud that form its convex hull. In some cases it is
    more convenient to work with convex hull in form of the points from
    the input point cloud (for example when it is organized) than with a
    new point cloud containing only the geometric information, but not
    the organization.

@@ -166,6 +166,14 @@ namespace pcl
return (dimension_);
}

/** \brief Retriev the indices of the input point cloud that for the convex hull.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retrieve
cloud that for the

@taketwo
Copy link
Member

taketwo commented Apr 22, 2015

👍 for the idea. Perhaps we could add the same method to concave hull?

@SvenAlbrecht
Copy link
Contributor Author

Added the method for concave hull in the last commit

@taketwo
Copy link
Member

taketwo commented Apr 23, 2015

Thanks!

Is there any specific reason why you use a combination of clear() + insert() in the getter functions instead of a mere assignment operator hull_point_indices.indices = hull_indices_?

@SvenAlbrecht
Copy link
Contributor Author

I think it becomes slightly more clear that with calling clear () the returned pcl::PointIndices could in fact be empty (for example if the getter is called before the reconstruction takes place). If you believe it becomes more clear what's going on by using the assignment operator, I don't have any issue using that instead.

@taketwo
Copy link
Member

taketwo commented Apr 23, 2015

No, just wondering. You are the author, let's keep your preferred version. Could you please squash the commits into a single one? Then I'll merge.

@v4hn
Copy link
Contributor

v4hn commented Apr 23, 2015

@SvenAlbrecht: The way you copy the PointIndices structure ignores the PCLHeader that is (/should be) included. So please add the header of the input cloud there before returning the indices.

@SvenAlbrecht
Copy link
Contributor Author

@v4hn Good point - I honestly didn't think of that. Fix will come soon.
edit: To address the issue pointed out by v4hn it made more sense to switch the from std:vector<int> for the storage of the indices directly to pcl::PointIndices. Have done this and now also employed assignment operator to copy index information.

- Added method 'getHullPointIndices ()' in 'pcl::ConvexHull' and
  'pcl::ConcaveHull' to retrieve the indices of the input cloud that
  compose the hull. This might be helpful if the input point cloud is
  organized the hull needs to be retrieved while retaining the
  underlying organization of the point cloud data.
- Point indices are stored via new member of type pcl::PointIndices
@v4hn
Copy link
Contributor

v4hn commented Apr 24, 2015

looks good now, @SvenAlbrecht thanks!
@taketwo: Please go ahead and merge 👍

taketwo added a commit that referenced this pull request Apr 25, 2015
Added method to get point indices from convex_hull
@taketwo taketwo merged commit 0dfe212 into PointCloudLibrary:master Apr 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants