Loading...
Searching...
No Matches
predicate.h
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2011, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Willow Garage, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/
#pragma once
//#if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC
//#undef __MMX__
#include <pcl/cuda/point_cloud.h>
#include <pcl/cuda/point_types.h>
//#else
//#endif
namespace pcl
{
namespace cuda
{
template <class T>
struct isNotZero
{
__inline__ __host__ __device__ bool
operator()(T x) { return (x != 0); }
};
struct isInlier
{
__inline__ __host__ __device__ bool
operator()(int x) { return (x != -1); }
};
struct isNotInlier
{
__inline__ __host__ __device__ bool
operator()(int x) { return (x == -1); }
};
struct SetColor
{
SetColor (const OpenNIRGB& color) : color_(color) {}
__inline__ __host__ __device__ void
operator()(PointXYZRGB& point) { point.rgb.r = color_.r; point.rgb.g = color_.g; point.rgb.b = color_.b;}
OpenNIRGB color_;
};
struct ChangeColor
{
ChangeColor (const OpenNIRGB& color) : color_(color) {}
__inline__ __host__ __device__ PointXYZRGB&
operator()(PointXYZRGB& point)
{
point.rgb.r = color_.r; point.rgb.g = color_.g; point.rgb.b = color_.b;
return point;
}
OpenNIRGB color_;
};
} // namespace
} // namespace
pcl
Definition convolution.h:46
pcl::cuda::ChangeColor
Definition predicate.h:80
pcl::cuda::ChangeColor::ChangeColor
ChangeColor(const OpenNIRGB &color)
Definition predicate.h:81
pcl::cuda::ChangeColor::color_
OpenNIRGB color_
Definition predicate.h:88
pcl::cuda::ChangeColor::operator()
__inline__ __host__ __device__ PointXYZRGB & operator()(PointXYZRGB &point)
Definition predicate.h:83
pcl::cuda::OpenNIRGB
Simple structure holding RGB data.
Definition point_cloud.h:56
pcl::cuda::OpenNIRGB::b
unsigned char b
Definition point_cloud.h:57
pcl::cuda::OpenNIRGB::r
unsigned char r
Definition point_cloud.h:57
pcl::cuda::OpenNIRGB::g
unsigned char g
Definition point_cloud.h:57
pcl::cuda::PointXYZRGB
Default point xyz-rgb structure.
Definition point_types.h:49
pcl::cuda::PointXYZRGB::rgb
RGB rgb
Definition point_types.h:65
pcl::cuda::SetColor
Definition predicate.h:72
pcl::cuda::SetColor::color_
OpenNIRGB color_
Definition predicate.h:76
pcl::cuda::SetColor::operator()
__inline__ __host__ __device__ void operator()(PointXYZRGB &point)
Definition predicate.h:75
pcl::cuda::SetColor::SetColor
SetColor(const OpenNIRGB &color)
Definition predicate.h:73
pcl::cuda::isInlier
Check if a certain tuple is a point inlier.
Definition predicate.h:60
pcl::cuda::isInlier::operator()
__inline__ __host__ __device__ bool operator()(int x)
Definition predicate.h:62
pcl::cuda::isNotInlier
Definition predicate.h:66
pcl::cuda::isNotInlier::operator()
__inline__ __host__ __device__ bool operator()(int x)
Definition predicate.h:68
pcl::cuda::isNotZero
Definition predicate.h:54
pcl::cuda::isNotZero::operator()
__inline__ __host__ __device__ bool operator()(T x)
Definition predicate.h:56
pcl::cuda::RGB::b
char b
Definition point_type_rgb.h:58
pcl::cuda::RGB::g
char g
Definition point_type_rgb.h:57
pcl::cuda::RGB::r
char r
Definition point_type_rgb.h:56