IndicesPtr from PointIndices

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

IndicesPtr from PointIndices

james
Administrator
Hi,

In order to perform VFH estimation on a set of different clusters separately, I need to use either of the following:
setIndices (const IndicesPtr &indices)
setIndices (const IndicesConstPtr &indices)
setIndices (const PointIndicesConstPtr &indices)

My clusters are currently stored as:
std::vector<pcl::PointIndices> cluster_indices

I cannot see to get the conversion to work correctly. Can anyone help?

Thanks,
James
Reply | Threaded
Open this post in threaded view
|

Re: IndicesPtr from PointIndices

Ryan Mickler
Hi James,

I too have found several issues with this kind of operation. The only way I could find to get around it easily is to do the following.

PointIndicesPtr pi_ptr(new PointIndices);
pi_ptr->indices = cluster_indices[i].indices;
//now can use pi_ptr

Im interested to see if there is a better way to wrap an object in a boost::shared_ptr without having to copy.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of james
Sent: Tuesday, 17 July 2012 12:24 PM
To: [hidden email]
Subject: [PCL-users] IndicesPtr from PointIndices

Hi,

In order to perform VFH estimation on a set of different clusters separately, I need to use either of the following:
setIndices (const IndicesPtr &indices)
setIndices (const IndicesConstPtr &indices) setIndices (const PointIndicesConstPtr &indices)

My clusters are currently stored as:
std::vector<pcl::PointIndices> cluster_indices

I cannot see to get the conversion to work correctly. Can anyone help?

Thanks,
James

--
View this message in context: http://www.pcl-users.org/IndicesPtr-from-PointIndices-tp4020356.html
Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: IndicesPtr from PointIndices

james
Administrator
Thanks Ryan, my code is compiling.

Regards,
James