From 4a5e0018cf37a371d3bc5fab5f70b8ce76ff1827 Mon Sep 17 00:00:00 2001 From: rlagneau Date: Tue, 23 Apr 2024 16:15:45 +0200 Subject: [PATCH] [CLEAN] Removed useless check of PCL version --- .../device/framegrabber/saveRealSenseData.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/example/device/framegrabber/saveRealSenseData.cpp b/example/device/framegrabber/saveRealSenseData.cpp index d09fc87f26..5db5e390fa 100644 --- a/example/device/framegrabber/saveRealSenseData.cpp +++ b/example/device/framegrabber/saveRealSenseData.cpp @@ -51,11 +51,7 @@ #if defined(VISP_HAVE_PCL) #include #if defined(VISP_HAVE_PCL_COMMON) -#if PCL_VERSION_COMPARE(>=,1,14,1) -#include -#else #include -#endif #include #endif #if defined(VISP_HAVE_PCL_IO) @@ -417,7 +413,7 @@ class vpStorageWorker vpIoTools::writeBinaryValueLE(file_pointcloud, pt.y); vpIoTools::writeBinaryValueLE(file_pointcloud, pt.z); } - } + } #else uint32_t width = m_size_width; uint32_t height = m_size_height; @@ -440,8 +436,8 @@ class vpStorageWorker } } #endif + } } - } else { #if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_IO) pcl::io::savePCDFileBinary(filename_point_cloud, *pointCloud); @@ -449,7 +445,7 @@ class vpStorageWorker throw(vpIoException(vpIoException::fatalError, "Cannot save as pcd files without PCL io module")); #endif } - } + } if (m_save_infrared) { ss.str(""); @@ -461,13 +457,13 @@ class vpStorageWorker } m_cpt++; + } } } - } catch (const vpFrameQueue::vpCancelled_t &) { std::cout << "Receive cancel vpFrameQueue." << std::endl; } -} + } private: vpFrameQueue &m_queue; @@ -627,12 +623,12 @@ int main(int argc, const char *argv[]) vpHomogeneousMatrix depth_M_color; if (!use_aligned_stream) { depth_M_color = realsense.getTransformation(rs::stream::color, rs::stream::depth); - } + } #endif std::ofstream file(std::string(output_directory + "/depth_M_color.txt")); depth_M_color.save(file); file.close(); -} + } vpFrameQueue save_queue; vpStorageWorker storage(std::ref(save_queue), std::cref(output_directory), save_color, save_depth, save_pointcloud,