PointCloud.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T),
5  * Karlsruhe Institute of Technology (KIT), all rights reserved.
6  *
7  * ArmarX is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * ArmarX is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * @author Fabian Peller-Konrad (fabian dot peller-konrad at kit dot edu)
20  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21  * GNU General Public License
22  */
23 
24 // Header
25 #include "PointCloud.h"
26 
27 namespace armarx::aron::type
28 {
29  const std::map<pointcloud::VoxelType, std::string> PointCloud::Voxeltype2String{
30  {pointcloud::VoxelType::POINT_XYZ, "POINT_XYZ"},
31  {pointcloud::VoxelType::POINT_XYZI, "POINT_XYZI"},
32  {pointcloud::VoxelType::POINT_XYZL, "POINT_XYZL"},
33  {pointcloud::VoxelType::POINT_XYZRGB, "POINT_XYZRGB"},
34  {pointcloud::VoxelType::POINT_XYZRGBL, "POINT_XYZRGBL"},
35  {pointcloud::VoxelType::POINT_XYZRGBA, "POINT_XYZRGBA"},
36  {pointcloud::VoxelType::POINT_XYZHSV, "POINT_XYZHSV"}};
37 
38  const std::map<std::string, pointcloud::VoxelType> PointCloud::String2Voxeltype =
39  conversion::util::InvertMap(Voxeltype2String);
40 
41  // constructors
43  detail::NDArrayVariant<type::dto::PointCloud, PointCloud>(type::Descriptor::POINTCLOUD,
44  path)
45  {
46  }
47 
49  detail::NDArrayVariant<type::dto::PointCloud, PointCloud>(o,
50  type::Descriptor::POINTCLOUD,
51  path)
52  {
53  }
54 
57  {
58  return this->aron;
59  }
60 
61  type::pointcloud::VoxelType
63  {
64  return this->aron->voxelType;
65  }
66 
67  void
68  PointCloud::setVoxelType(type::pointcloud::VoxelType u)
69  {
70  this->aron->voxelType = u;
71  }
72 
73  // virtual implementations
74  std::string
76  {
77  return "PointCloud";
78  }
79 
80  std::string
82  {
83  return "armarx::aron::type::PointCloud<" + Voxeltype2String.at(this->aron->voxelType) + ">";
84  }
85 } // namespace armarx::aron::type
PointCloud.h
armarx::aron::type::PointCloud
The PointCloud class.
Definition: PointCloud.h:39
armarx::aron::type::PointCloud::String2Voxeltype
static const std::map< std::string, pointcloud::VoxelType > String2Voxeltype
Definition: PointCloud.h:58
detail
Definition: OpenCVUtil.cpp:127
armarx::aron::type::PointCloud::PointCloud
PointCloud(const Path &path=Path())
Definition: PointCloud.cpp:42
armarx::aron::type::PointCloud::getShortName
std::string getShortName() const override
get a short name of this specific type
Definition: PointCloud.cpp:75
armarx::aron::type::PointCloud::getFullName
std::string getFullName() const override
get the full name of this specific type
Definition: PointCloud.cpp:81
armarx::aron::type::PointCloudPtr
std::shared_ptr< class PointCloud > PointCloudPtr
Definition: forward_declarations.h:23
armarx::aron::Path
The Path class.
Definition: Path.h:36
armarx::aron::conversion::util::InvertMap
std::map< T2, T1 > InvertMap(const std::map< T1, T2 > &m)
Definition: Descriptor.h:42
armarx::aron::type::detail::SpecializedVariantBase< type::dto::PointCloud, PointCloud >::aron
type::dto::PointCloud ::PointerType aron
Definition: SpecializedVariant.h:137
armarx::aron::type
A convenience header to include all aron files (full include, not forward declared)
Definition: aron_conversions.cpp:9
visionx::PointCloud
pcl::PointCloud< Point > PointCloud
Definition: RCPointCloudProvider.cpp:54
armarx::aron::type::PointCloud::Voxeltype2String
static const std::map< pointcloud::VoxelType, std::string > Voxeltype2String
Definition: PointCloud.h:57
armarx::aron::type::PointCloud::toPointCloudDTO
type::dto::PointCloudPtr toPointCloudDTO() const
Definition: PointCloud.cpp:56
armarx::aron::type::Descriptor::POINTCLOUD
@ POINTCLOUD
armarx::aron::type::Descriptor
Descriptor
Definition: Descriptor.h:76
armarx::aron::type::PointCloud::getVoxelType
type::pointcloud::VoxelType getVoxelType() const
Definition: PointCloud.cpp:62
armarx::aron::type::PointCloud::setVoxelType
void setVoxelType(type::pointcloud::VoxelType)
Definition: PointCloud.cpp:68