Quantcast

Get the address of PointIndices and use it in PointIndices::Ptr

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Get the address of PointIndices and use it in PointIndices::Ptr

josuerocha
Good afternoon. How can I get the address of a PointIndices object into a PointIndices::Ptr?

I tried this with no success:

pcl::PointIndices indices;
pcl::PointIndices::Ptr indices_ptr (&indices);

The code compiles but it outputs an execution error.

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get the address of PointIndices and use it in PointIndices::Ptr

josuerocha
I solved it using:

pcl::PointIndices indices;
pcl::PointIndices::Ptr indices_ptr (new pcl::PointIndices(indices));

Are there better ways to do it?
Loading...