38 #ifndef PCL_CUDA_POINT_CLOUD_H_
39 #define PCL_CUDA_POINT_CLOUD_H_
41 #include <pcl/cuda/point_types.h>
42 #include <pcl/cuda/thrust.h>
43 #include <boost/shared_ptr.hpp>
58 unsigned char r,
g,
b;
68 typedef typename thrust::host_vector<T>
type;
97 typedef typename thrust::device_vector<T>
type;
132 template <
template <
typename>
class Storage>
150 template <
typename OtherStorage>
165 at (
int u,
int v)
const
170 return (
PointXYZRGB (std::numeric_limits<float>::quiet_NaN (),
171 std::numeric_limits<float>::quiet_NaN (),
172 std::numeric_limits<float>::quiet_NaN (),
189 typename Storage<PointXYZRGB>::type
points;
191 typedef typename Storage<PointXYZRGB>::type::iterator
iterator;
201 typedef boost::shared_ptr<PointCloudAOS<Storage> >
Ptr;
202 typedef boost::shared_ptr<const PointCloudAOS<Storage> >
ConstPtr;
208 template <
template <
typename>
class Storage>
228 template <
typename OtherStorage>
272 typename Storage<int>::type
rgb;
282 typedef boost::shared_ptr<PointCloudSOA<Storage> >
Ptr;
283 typedef boost::shared_ptr<const PointCloudSOA<Storage> >
ConstPtr;
289 typedef thrust::tuple<float_iterator, float_iterator, float_iterator>
iterator_tuple;
295 return (thrust::make_zip_iterator (thrust::make_tuple (points_x.begin (),
297 points_z.begin ())));
303 return (thrust::make_zip_iterator (thrust::make_tuple (points_x.end (),
309 template <
template <
typename>
class Storage,
typename T>
315 template <
typename T>
318 typedef thrust::detail::normal_iterator<thrust::device_ptr<T> >
type;
321 template <
typename T>
324 typedef thrust::detail::normal_iterator<T*>
type;
327 template <
template <
typename>
class Storage,
typename T>
333 template <
typename T>
336 typedef thrust::device_ptr<T>
type;
337 template <
typename U>
338 static thrust::device_ptr<U>
cast (type ptr)
340 return thrust::device_ptr<U> ((U*)ptr.get());
342 template <
typename U>
343 static thrust::device_ptr<U>
cast (T* ptr)
345 return thrust::device_ptr<U> ((U*)ptr);
349 template <
typename T>
353 template <
typename U>
359 template <
template <
typename>
class Storage,
typename T>
364 template <
typename T>
367 static thrust::device_ptr<T>
alloc (
int size)
369 return thrust::device_malloc<T> (size);
373 template <
typename T>
378 return (T*) malloc (size);
386 #endif //#ifndef PCL_CUDA_POINT_CLOUD_H_
Storage< PointXYZRGB >::type::iterator iterator
bool is_dense
True if no points are invalid (e.g., have NaN or Inf values).
unsigned int width
The point cloud width (if organized as an image-structure).
Storage< float >::type::iterator float_iterator
misnamed class holding a 3x3 matrix
Storage< float >::type points_y
std::size_t size() const
Return the size of the internal vectors.
PointCloudAOS & operator=(const PointCloudAOS &rhs)
This file defines compatibility wrappers for low level I/O functions.
PointCloudSOA & operator<<(const OtherStorage &rhs)
static thrust::device_ptr< U > cast(T *ptr)
Storage< PointXYZRGB >::type points
The point data.
thrust::detail::normal_iterator< thrust::device_ptr< T > > type
PointCloudAOS represents an AOS (Array of Structs) PointCloud implementation for CUDA processing...
thrust::device_vector< T > type
unsigned int height
The point cloud height (if organized as an image-structure).
boost::shared_ptr< PointCloudSOA< Storage > > Ptr
thrust::tuple< float, float, float > tuple_type
PointCloudSOA & operator=(const PointCloudSOA &rhs)
static T * alloc(int size)
static U * cast(type ptr)
PointCloudSOA represents a SOA (Struct of Arrays) PointCloud implementation for CUDA processing...
thrust::tuple< float_iterator, float_iterator, float_iterator > iterator_tuple
PointCloudAOS & operator<<(const OtherStorage &rhs)
Storage< float >::type points_x
The point data.
PointXYZRGB at(int u, int v) const
boost::shared_ptr< const PointCloudSOA< Storage > > ConstPtr
thrust::host_vector< T > type
static thrust::device_ptr< U > cast(type ptr)
void resize(size_t newsize)
Resize the internal point data vectors.
unsigned int height
The point cloud height (if organized as an image-structure).
bool is_dense
True if no points are invalid (e.g., have NaN or Inf values).
PointXYZRGB & operator()(int u, int v)
boost::shared_ptr< PointCloudAOS< Storage > > Ptr
Storage< float >::type points_z
unsigned int width
The point cloud width (if organized as an image-structure).
boost::shared_ptr< const PointCloudAOS< Storage > > ConstPtr
Default point xyz-rgb structure.
thrust::zip_iterator< iterator_tuple > zip_iterator
thrust::device_ptr< T > type
thrust::detail::normal_iterator< T * > type
bool sane() const
Check if the internal pooint data vectors are valid.
static thrust::device_ptr< T > alloc(int size)
Simple structure holding RGB data.