| 44 | #include <vector> |
| 45 | |
| 46 | int |
| 47 | main (int, char ** argv) |
| 48 | { |
| 49 | pcl::PointCloud<pcl::PointXYZ> xyz; |
| 50 | pcl::io::loadPCDFile(argv[1], xyz); |
| 51 | |
| 52 | pcl::visualization::ImageViewer depth_image_viewer_; |
| 53 | float* img = new float[xyz.width * xyz.height]; |
| 54 | |
| 55 | for (int i = 0; i < static_cast<int> (xyz.size ()); ++i) |
| 56 | img[i] = xyz[i].z; |
| 57 | |
| 58 | depth_image_viewer_.showFloatImage (img, |
| 59 | xyz.width, xyz.height, |
| 60 | std::numeric_limits<float>::min (), |
| 61 | // Scale so that the colors look brighter on screen |
| 62 | std::numeric_limits<float>::max () / 10, |
| 63 | true); |
| 64 | depth_image_viewer_.spin (); |
| 65 | return (0); |
| 66 | } |
nothing calls this directly
no test coverage detected