Place PCLVisualizer on the bottom of another

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Place PCLVisualizer on the bottom of another

ravijoshi
I have two PCLVisualizer windows with a title. I want to place the second
PCLVisualizer on the bottom of first PCLVisualizer. Below is the code
snippet-

pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_1(new
pcl::PointCloud<pcl::PointXYZRGB>);
pcl::io::loadPCDFile<pcl::PointXYZRGB>(pcd_1, *cloud_1);

pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_2(new
pcl::PointCloud<pcl::PointXYZRGB>);
pcl::io::loadPCDFile<pcl::PointXYZRGB>(pcd_2, *cloud_2);

pcl::visualization::PCLVisualizer viewer_1("Cloud 1");
viewer_1.addPointCloud(cloud_1, "cloud_1");
viewer_1.initCameraParameters();
viewer_1.setCameraParameters(camera);

pcl::visualization::PCLVisualizer viewer_2("Cloud 2");
viewer_2.addPointCloud(cloud_2, "cloud_2");
viewer_2.initCameraParameters();
viewer_2.setCameraParameters(camera);

int window_width = camera.window_size[0];
int window_height = camera.window_size[1];
viewer_2.setPosition(0, window_height);

The above code snippet stacks them but the second PCLVisualizer is
overlapping with first PCLVisualizer little bit. In other words, the second
PCLVisualizer is hiding the bottom of first PCLVisualizer.

I suspect that I need to add the height of title bar in the window_height
parameter. Any suggestions, please?

-
Thanks
Ravi



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users