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

Transition to standard smart pointers, part 8 #3142

Merged
merged 5 commits into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion io/src/davidsdk_grabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ pcl::DavidSDKGrabber::processGrabbing ()
{
pcl::PolygonMesh::Ptr mesh;
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud;
boost::shared_ptr<pcl::PCLImage> image;
pcl::PCLImage::Ptr image;

fps_mutex_.lock ();
frequency_.event ();
Expand Down
30 changes: 15 additions & 15 deletions io/src/oni_grabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ ONIGrabber::getFramesPerSecond () const

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void
ONIGrabber::imageCallback(boost::shared_ptr<openni_wrapper::Image> image, void*)
ONIGrabber::imageCallback(openni_wrapper::Image::Ptr image, void*)
{
if (num_slots<sig_cb_openni_point_cloud_rgb> () > 0 ||
num_slots<sig_cb_openni_point_cloud_rgba> () > 0 ||
Expand All @@ -265,7 +265,7 @@ ONIGrabber::imageCallback(boost::shared_ptr<openni_wrapper::Image> image, void*)

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void
ONIGrabber::depthCallback(boost::shared_ptr<openni_wrapper::DepthImage> depth_image, void*)
ONIGrabber::depthCallback(openni_wrapper::DepthImage::Ptr depth_image, void*)
{
if (num_slots<sig_cb_openni_point_cloud_rgb> () > 0 ||
num_slots<sig_cb_openni_point_cloud_rgba> () > 0 ||
Expand All @@ -287,7 +287,7 @@ ONIGrabber::depthCallback(boost::shared_ptr<openni_wrapper::DepthImage> depth_im

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void
ONIGrabber::irCallback(boost::shared_ptr<openni_wrapper::IRImage> ir_image, void*)
ONIGrabber::irCallback(openni_wrapper::IRImage::Ptr ir_image, void*)
{
if (num_slots<sig_cb_openni_point_cloud_i > () > 0 ||
num_slots<sig_cb_openni_ir_depth_image > () > 0)
Expand All @@ -301,7 +301,7 @@ ONIGrabber::irCallback(boost::shared_ptr<openni_wrapper::IRImage> ir_image, void

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void
ONIGrabber::imageDepthImageCallback(const boost::shared_ptr<openni_wrapper::Image> &image, const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image)
ONIGrabber::imageDepthImageCallback(const openni_wrapper::Image::Ptr &image, const openni_wrapper::DepthImage::Ptr &depth_image)
{
// check if we have color point cloud slots
if (point_cloud_rgb_signal_->num_slots () > 0)
Expand All @@ -322,7 +322,7 @@ ONIGrabber::imageDepthImageCallback(const boost::shared_ptr<openni_wrapper::Imag

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void
ONIGrabber::irDepthImageCallback(const boost::shared_ptr<openni_wrapper::IRImage> &ir_image, const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image)
ONIGrabber::irDepthImageCallback(const openni_wrapper::IRImage::Ptr &ir_image, const openni_wrapper::DepthImage::Ptr &depth_image)
{
// check if we have color point cloud slots
if (point_cloud_i_signal_->num_slots() > 0)
Expand All @@ -337,7 +337,7 @@ ONIGrabber::irDepthImageCallback(const boost::shared_ptr<openni_wrapper::IRImage

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
pcl::PointCloud<pcl::PointXYZ>::Ptr
ONIGrabber::convertToXYZPointCloud(const boost::shared_ptr<openni_wrapper::DepthImage>& depth_image) const
ONIGrabber::convertToXYZPointCloud(const openni_wrapper::DepthImage::Ptr& depth_image) const
{
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud <pcl::PointXYZ>);

Expand Down Expand Up @@ -401,14 +401,14 @@ ONIGrabber::convertToXYZPointCloud(const boost::shared_ptr<openni_wrapper::Depth

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
pcl::PointCloud<pcl::PointXYZRGB>::Ptr ONIGrabber::convertToXYZRGBPointCloud (
const boost::shared_ptr<openni_wrapper::Image> &image,
const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image) const
const openni_wrapper::Image::Ptr &image,
const openni_wrapper::DepthImage::Ptr &depth_image) const
{
static unsigned rgb_array_size = 0;
static boost::shared_array<unsigned char> rgb_array((unsigned char*)nullptr);
static unsigned char* rgb_buffer = nullptr;

boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> > cloud(new pcl::PointCloud<pcl::PointXYZRGB> ());
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGB>);

cloud->header.frame_id = rgb_frame_id_;
cloud->height = depth_height_;
Expand Down Expand Up @@ -485,14 +485,14 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr ONIGrabber::convertToXYZRGBPointCloud (

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr ONIGrabber::convertToXYZRGBAPointCloud (
const boost::shared_ptr<openni_wrapper::Image> &image,
const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image) const
const openni_wrapper::Image::Ptr &image,
const openni_wrapper::DepthImage::Ptr &depth_image) const
{
static unsigned rgb_array_size = 0;
static boost::shared_array<unsigned char> rgb_array((unsigned char*)nullptr);
static unsigned char* rgb_buffer = nullptr;

boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> > cloud (new pcl::PointCloud<pcl::PointXYZRGBA> ());
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZRGBA>);

cloud->header.frame_id = rgb_frame_id_;
cloud->height = depth_height_;
Expand Down Expand Up @@ -568,10 +568,10 @@ pcl::PointCloud<pcl::PointXYZRGBA>::Ptr ONIGrabber::convertToXYZRGBAPointCloud (
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
pcl::PointCloud<pcl::PointXYZI>::Ptr ONIGrabber::convertToXYZIPointCloud(const boost::shared_ptr<openni_wrapper::IRImage> &ir_image,
const boost::shared_ptr<openni_wrapper::DepthImage> &depth_image) const
pcl::PointCloud<pcl::PointXYZI>::Ptr ONIGrabber::convertToXYZIPointCloud(const openni_wrapper::IRImage::Ptr &ir_image,
const openni_wrapper::DepthImage::Ptr &depth_image) const
{
boost::shared_ptr<pcl::PointCloud<pcl::PointXYZI> > cloud(new pcl::PointCloud<pcl::PointXYZI > ());
pcl::PointCloud<pcl::PointXYZI>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZI>);

cloud->header.frame_id = rgb_frame_id_;
cloud->height = depth_height_;
Expand Down
Loading