diff --git a/apps/src/openni_organized_edge_detection.cpp b/apps/src/openni_organized_edge_detection.cpp index 635228a1bc1..d7caa8c20ed 100644 --- a/apps/src/openni_organized_edge_detection.cpp +++ b/apps/src/openni_organized_edge_detection.cpp @@ -203,7 +203,7 @@ class OpenNIOrganizedEdgeDetection // Make gray point cloud for (size_t idx = 0; idx < cloud_.points.size (); idx++) { - uint8_t gray = uint8_t((cloud_.points[idx].r + cloud_.points[idx].g + cloud_.points[idx].b)/3); + pcl::uint8_t gray = pcl::uint8_t((cloud_.points[idx].r + cloud_.points[idx].g + cloud_.points[idx].b)/3); cloud_.points[idx].r = cloud_.points[idx].g = cloud_.points[idx].b = gray; } diff --git a/apps/src/openni_tracking.cpp b/apps/src/openni_tracking.cpp index 49491bbc76b..4fd0d13839b 100644 --- a/apps/src/openni_tracking.cpp +++ b/apps/src/openni_tracking.cpp @@ -503,7 +503,7 @@ class OpenNISegmentTracking result.points.push_back(point); } - result.width = static_cast (result.points.size ()); + result.width = static_cast (result.points.size ()); result.height = 1; result.is_dense = true; } @@ -519,7 +519,7 @@ class OpenNISegmentTracking PointType point = cloud->points[segmented_indices.indices[i]]; result.points.push_back (point); } - result.width = uint32_t (result.points.size ()); + result.width = pcl::uint32_t (result.points.size ()); result.height = 1; result.is_dense = true; } diff --git a/apps/src/stereo_ground_segmentation.cpp b/apps/src/stereo_ground_segmentation.cpp index 30ce9e9a77b..8423900678c 100755 --- a/apps/src/stereo_ground_segmentation.cpp +++ b/apps/src/stereo_ground_segmentation.cpp @@ -277,7 +277,7 @@ class HRCSSegmentation cloud->points[region_indices[i].indices[j]].y, cloud->points[region_indices[i].indices[j]].z); ground_cloud->points.push_back (ground_pt); - ground_image->points[region_indices[i].indices[j]].g = static_cast ((cloud->points[region_indices[i].indices[j]].g + 255) / 2); + ground_image->points[region_indices[i].indices[j]].g = static_cast ((cloud->points[region_indices[i].indices[j]].g + 255) / 2); label_image->points[region_indices[i].indices[j]].r = 0; label_image->points[region_indices[i].indices[j]].g = 255; label_image->points[region_indices[i].indices[j]].b = 0; @@ -367,8 +367,8 @@ class HRCSSegmentation cloud->points[region_indices[i].indices[j]].y, cloud->points[region_indices[i].indices[j]].z); ground_cloud->points.push_back (ground_pt); - ground_image->points[region_indices[i].indices[j]].r = static_cast ((cloud->points[region_indices[i].indices[j]].r + 255) / 2); - ground_image->points[region_indices[i].indices[j]].g = static_cast ((cloud->points[region_indices[i].indices[j]].g + 255) / 2); + ground_image->points[region_indices[i].indices[j]].r = static_cast ((cloud->points[region_indices[i].indices[j]].r + 255) / 2); + ground_image->points[region_indices[i].indices[j]].g = static_cast ((cloud->points[region_indices[i].indices[j]].g + 255) / 2); label_image->points[region_indices[i].indices[j]].r = 128; label_image->points[region_indices[i].indices[j]].g = 128; label_image->points[region_indices[i].indices[j]].b = 0; @@ -455,7 +455,7 @@ class HRCSSegmentation { if (!pcl::isFinite (cloud->points[i])) { - ground_image->points[i].b = static_cast((cloud->points[i].b + 255) / 2); + ground_image->points[i].b = static_cast((cloud->points[i].b + 255) / 2); label_image->points[i].r = 0; label_image->points[i].g = 0; label_image->points[i].b = 255; diff --git a/common/include/pcl/common/impl/random.hpp b/common/include/pcl/common/impl/random.hpp index e05de8dc2a3..9a99e7c437e 100644 --- a/common/include/pcl/common/impl/random.hpp +++ b/common/include/pcl/common/impl/random.hpp @@ -41,10 +41,11 @@ #define PCL_COMMON_RANDOM_HPP_ #include +#include ///////////////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::common::UniformGenerator::UniformGenerator(T min, T max, uint32_t seed) +pcl::common::UniformGenerator::UniformGenerator(T min, T max, pcl::uint32_t seed) : distribution_ (min, max) , generator_ (rng_, distribution_) { @@ -67,7 +68,7 @@ pcl::common::UniformGenerator::UniformGenerator(const Parameters& parameters) ///////////////////////////////////////////////////////////////////////////////////////////////////////// template void -pcl::common::UniformGenerator::setSeed (uint32_t seed) +pcl::common::UniformGenerator::setSeed (pcl::uint32_t seed) { if (seed != -1) { @@ -78,7 +79,7 @@ pcl::common::UniformGenerator::setSeed (uint32_t seed) ///////////////////////////////////////////////////////////////////////////////////////////////////////// template void -pcl::common::UniformGenerator::setParameters (T min, T max, uint32_t seed) +pcl::common::UniformGenerator::setParameters (T min, T max, pcl::uint32_t seed) { parameters_.min = min; parameters_.max = max; @@ -117,7 +118,7 @@ pcl::common::UniformGenerator::setParameters (const Parameters& parameters) ///////////////////////////////////////////////////////////////////////////////////////////////////////// template -pcl::common::NormalGenerator::NormalGenerator(T mean, T sigma, uint32_t seed) +pcl::common::NormalGenerator::NormalGenerator(T mean, T sigma, pcl::uint32_t seed) : distribution_ (mean, sigma) , generator_ (rng_, distribution_) { @@ -140,7 +141,7 @@ pcl::common::NormalGenerator::NormalGenerator(const Parameters& parameters) ///////////////////////////////////////////////////////////////////////////////////////////////////////// template void -pcl::common::NormalGenerator::setSeed (uint32_t seed) +pcl::common::NormalGenerator::setSeed (pcl::uint32_t seed) { if (seed != -1) { @@ -151,7 +152,7 @@ pcl::common::NormalGenerator::setSeed (uint32_t seed) ///////////////////////////////////////////////////////////////////////////////////////////////////////// template void -pcl::common::NormalGenerator::setParameters (T mean, T sigma, uint32_t seed) +pcl::common::NormalGenerator::setParameters (T mean, T sigma, pcl::uint32_t seed) { parameters_.mean = mean; parameters_.sigma = sigma; diff --git a/common/include/pcl/common/random.h b/common/include/pcl/common/random.h index ed08008a859..696018d1529 100644 --- a/common/include/pcl/common/random.h +++ b/common/include/pcl/common/random.h @@ -49,6 +49,7 @@ #include #include #include +#include namespace pcl { @@ -87,7 +88,7 @@ namespace pcl public: struct Parameters { - Parameters (T _min = 0, T _max = 1, uint32_t _seed = 1) + Parameters (T _min = 0, T _max = 1, pcl::uint32_t _seed = 1) : min (_min) , max (_max) , seed (_seed) @@ -95,7 +96,7 @@ namespace pcl T min; T max; - uint32_t seed; + pcl::uint32_t seed; }; /** Constructor @@ -103,7 +104,7 @@ namespace pcl * \param max: included higher bound * \param seed: seeding value */ - UniformGenerator(T min = 0, T max = 1, uint32_t seed = -1); + UniformGenerator(T min = 0, T max = 1, pcl::uint32_t seed = -1); /** Constructor * \param parameters uniform distribution parameters and generator seed @@ -114,7 +115,7 @@ namespace pcl * \param[in] seed new generator seed value */ void - setSeed (uint32_t seed); + setSeed (pcl::uint32_t seed); /** Set the uniform number generator parameters * \param[in] min minimum allowed value @@ -122,7 +123,7 @@ namespace pcl * \param[in] seed random number generator seed (applied if != -1) */ void - setParameters (T min, T max, uint32_t seed = -1); + setParameters (T min, T max, pcl::uint32_t seed = -1); /** Set generator parameters * \param parameters uniform distribution parameters and generator seed @@ -162,7 +163,7 @@ namespace pcl public: struct Parameters { - Parameters (T _mean = 0, T _sigma = 1, uint32_t _seed = 1) + Parameters (T _mean = 0, T _sigma = 1, pcl::uint32_t _seed = 1) : mean (_mean) , sigma (_sigma) , seed (_seed) @@ -170,7 +171,7 @@ namespace pcl T mean; T sigma; - uint32_t seed; + pcl::uint32_t seed; }; /** Constructor @@ -178,7 +179,7 @@ namespace pcl * \param[in] sigma normal variation * \param[in] seed seeding value */ - NormalGenerator(T mean = 0, T sigma = 1, uint32_t seed = -1); + NormalGenerator(T mean = 0, T sigma = 1, pcl::uint32_t seed = -1); /** Constructor * \param parameters normal distribution parameters and seed @@ -189,7 +190,7 @@ namespace pcl * \param[in] seed new seed value */ void - setSeed (uint32_t seed); + setSeed (pcl::uint32_t seed); /** Set the normal number generator parameters * \param[in] mean mean of the normal distribution @@ -197,7 +198,7 @@ namespace pcl * \param[in] seed random number generator seed (applied if != -1) */ void - setParameters (T mean, T sigma, uint32_t seed = -1); + setParameters (T mean, T sigma, pcl::uint32_t seed = -1); /** Set generator parameters * \param parameters normal distribution parameters and seed diff --git a/io/tools/hdl_grabber_example.cpp b/io/tools/hdl_grabber_example.cpp index b8cde5676e1..5b2f55b064b 100644 --- a/io/tools/hdl_grabber_example.cpp +++ b/io/tools/hdl_grabber_example.cpp @@ -49,14 +49,14 @@ class SimpleHDLGrabber static double last = pcl::getTime(); if (sweep->header.seq == 0) { - uint64_t stamp; + pcl::uint64_t stamp; #ifdef USE_ROS stamp = sweep->header.stamp.toNSec () / 1000; #else //USE_ROS stamp = sweep->header.stamp; #endif //USE_ROS time_t systemTime = static_cast(((stamp & 0xffffffff00000000l) >> 32) & 0x00000000ffffffff); - uint32_t usec = static_cast(stamp & 0x00000000ffffffff); + pcl::uint32_t usec = static_cast(stamp & 0x00000000ffffffff); std::cout << std::hex << stamp << " " << ctime(&systemTime) << " usec: " << usec << std::endl; } diff --git a/tools/mesh_sampling.cpp b/tools/mesh_sampling.cpp index 73bfd713ae3..d25760e55c9 100644 --- a/tools/mesh_sampling.cpp +++ b/tools/mesh_sampling.cpp @@ -118,7 +118,7 @@ uniform_sampling (vtkSmartPointer polydata, size_t n_samples, pcl:: } cloud_out.points.resize (n_samples); - cloud_out.width = static_cast (n_samples); + cloud_out.width = static_cast (n_samples); cloud_out.height = 1; for (i = 0; i < n_samples; i++) diff --git a/visualization/tools/image_grabber_viewer.cpp b/visualization/tools/image_grabber_viewer.cpp index 32708566302..32dd1e8e62e 100644 --- a/visualization/tools/image_grabber_viewer.cpp +++ b/visualization/tools/image_grabber_viewer.cpp @@ -95,7 +95,7 @@ struct EventHelper void cloud_cb (const pcl::PointCloud::ConstPtr & cloud) { - uint64_t timestamp; + pcl::uint64_t timestamp; #ifdef USE_ROS timestamp = cloud->header.stamp.toNSec() / 1000; //Microseconds #else