itom 2.2.1
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2016, Institut fuer Technische Optik (ITO), 00005 Universitaet Stuttgart, Germany 00006 00007 This file is part of itom and its software development toolkit (SDK). 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 In addition, as a special exception, the Institut fuer Technische 00015 Optik (ITO) gives you certain additional rights. 00016 These rights are described in the ITO LGPL Exception version 1.0, 00017 which can be found in the file LGPL_EXCEPTION.txt in this package. 00018 00019 itom is distributed in the hope that it will be useful, but 00020 WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00022 General Public Licence for more details. 00023 00024 You should have received a copy of the GNU Library General Public License 00025 along with itom. If not, see <http://www.gnu.org/licenses/>. 00026 *********************************************************************** */ 00027 00028 #ifndef PCLFUNCTIONS_H 00029 #define PCLFUNCTIONS_H 00030 00031 #include "pclDefines.h" 00032 #include "pclStructures.h" 00033 00034 #include "../common/sharedStructures.h" 00035 00036 namespace ito 00037 { 00038 00039 class DataObject; //forward declaration 00040 00041 namespace pclHelper 00042 { 00043 void POINTCLOUD_EXPORT PointXYZRGBtoXYZRGBA (const pcl::PointXYZRGB& in, pcl::PointXYZRGBA& out); 00044 void POINTCLOUD_EXPORT PointXYZRGBAtoXYZRGB (const pcl::PointXYZRGBA& in, pcl::PointXYZRGB& out); 00045 void POINTCLOUD_EXPORT PointCloudXYZRGBtoXYZRGBA(const pcl::PointCloud<pcl::PointXYZRGB>& in, pcl::PointCloud<pcl::PointXYZRGBA>& out); 00046 00047 #if PCL_VERSION_COMPARE(>=,1,7,0) 00048 ito::RetVal POINTCLOUD_EXPORT pointCloud2ToPCLPointCloud(const pcl::PCLPointCloud2 &msg, PCLPointCloud *pc); 00049 ito::RetVal POINTCLOUD_EXPORT pclPointCloudToPointCloud2(const PCLPointCloud &pc, pcl::PCLPointCloud2 &msg); 00050 ito::tPCLPointType POINTCLOUD_EXPORT guessPointType(const pcl::PCLPointCloud2 &msg); 00051 #else 00052 ito::RetVal POINTCLOUD_EXPORT pointCloud2ToPCLPointCloud(const sensor_msgs::PointCloud2 &msg, PCLPointCloud *pc); 00053 ito::RetVal POINTCLOUD_EXPORT pclPointCloudToPointCloud2(const PCLPointCloud &pc, sensor_msgs::PointCloud2 &msg); 00054 ito::tPCLPointType POINTCLOUD_EXPORT guessPointType(const sensor_msgs::PointCloud2 &msg); 00055 #endif 00056 00057 ito::RetVal POINTCLOUD_EXPORT normalsAtCogFromPolygonMesh(const PCLPolygonMesh &mesh, PCLPointCloud &out, const std::vector<int> &indices = std::vector<int>()); 00058 00059 ito::RetVal POINTCLOUD_EXPORT pointCloudFromXYZ(const DataObject* mapX, const DataObject* mapY, const DataObject* mapZ, PCLPointCloud &out, bool deleteNaNorInf = false); 00060 ito::RetVal POINTCLOUD_EXPORT pointCloudFromXYZI(const DataObject* mapX, const DataObject* mapY, const DataObject* mapZ, const DataObject* mapI, PCLPointCloud &out, bool deleteNaNorInf = false); 00061 ito::RetVal POINTCLOUD_EXPORT pointCloudFromXYZRGBA(const DataObject* mapX, const DataObject* mapY, const DataObject* mapZ, const DataObject* mapColor, PCLPointCloud &out, bool deleteNaNorInf = false); 00062 ito::RetVal POINTCLOUD_EXPORT pointCloudFromDisparity(const DataObject* mapDisp, PCLPointCloud &out, bool deleteNaNorInf = false); 00063 ito::RetVal POINTCLOUD_EXPORT pointCloudFromDisparityI(const DataObject* mapDisp, const DataObject *mapI, PCLPointCloud &out, bool deleteNaNorInf = false); 00064 ito::RetVal POINTCLOUD_EXPORT pointCloudFromDisparityRGBA(const DataObject* mapDisp, const DataObject *mapColor, PCLPointCloud &out, bool deleteNaNorInf = false); 00065 00066 ito::RetVal POINTCLOUD_EXPORT pointCloudToDObj(const PCLPointCloud *pc, DataObject &out); 00067 00068 ito::RetVal POINTCLOUD_EXPORT dataObj4x4ToEigenAffine3f(const DataObject *in, Eigen::Affine3f &out); 00069 ito::RetVal POINTCLOUD_EXPORT eigenAffine3fToDataObj4x4(const Eigen::Affine3f *in, DataObject &out); 00070 00071 } //end namespace pclHelper 00072 00073 } //end namespace ito 00074 00075 #endif