Go to the documentation of this file.
18 #include <type_traits>
28 template<
typename PointCloudS,
29 typename PointCloudT >
41 template<
typename PointCloudS,
42 typename PointCloudT >
71 template<
typename PointCloudS,
74 typename GeometryTraitsS,
75 typename GeometryTraitsT >
82 const GeometryTraitsS >_s,
83 const GeometryTraitsT &)
86 typedef typename GeometryTraitsT::Scalar TScalar;
90 typedef typename TColorMap::value_type TColor;
101 auto s_point_pm =
get(boost::vertex_point, pc_s);
102 auto t_point_pm =
get(boost::vertex_point, pc_t);
105 if(use_vertex_normal)
118 params.m_v2v->clear();
121 auto iterator_pair =
vertices(pc_s);
122 auto s_vi = iterator_pair.first;
123 auto s_vi_end = iterator_pair.second;
124 for(; s_vi != s_vi_end; ++s_vi)
130 auto s_point =
get(s_point_pm, *s_vi);
131 auto x = gt_s.get_x(s_point);
132 auto y = gt_s.get_y(s_point);
133 auto z = gt_s.get_z(s_point);
134 put(t_point_pm, v, TPoint(
static_cast< TScalar
>(x),
135 static_cast< TScalar
>(y),
136 static_cast< TScalar
>(z)));
139 if(use_vertex_normal)
144 auto normal =
get(source_pm, *s_vi);
145 put(target_pm, v, TVector(
static_cast< TScalar
>(normal[0]),
146 static_cast< TScalar
>(normal[1]),
147 static_cast< TScalar
>(normal[2])));
155 auto color =
get(source_pm, *s_vi);
158 typedef typename std::remove_reference< decltype(t_color[0]) >::type
163 TColor(FEVV::Math::convert_color_value< TColorValueType >(color[0]),
164 FEVV::Math::convert_color_value< TColorValueType >(color[1]),
165 FEVV::Math::convert_color_value< TColorValueType >(color[2])));
170 (*params.m_v2v)[*s_vi] = v;
175 std::cout <<
"copy_point_cloud(): input point_cloud has "
178 std::cout <<
"copy_point_cloud(): input point_cloud has property maps: [";
180 std::cout <<
" " << name;
181 std::cout <<
" ]" << std::endl;
183 std::cout <<
"copy_point_cloud(): output point_cloud has "
186 std::cout <<
"copy_point_cloud(): output point_cloud has property maps: [";
188 std::cout <<
" " << name;
189 std::cout <<
" ]" << std::endl;
204 template<
typename PointCloudS,
205 typename PointCloudT,
217 GeometryTraitsS gt_s(pc_s);
218 GeometryTraitsT gt_t(pc_t);
std::pair< typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_iterator, typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_iterator > vertices(const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the iterator range of the vertices of the mesh.
void put_property_map(PropertyT p, const MeshT &, PMapsContainer &pmaps, const typename PMap_traits< PropertyT, MeshT >::pmap_type &pmap)
PMap_traits< PropertyT, MeshT >::pmap_type get_property_map(PropertyT p, const MeshT &, const PMapsContainer &pmaps)
bool has_map(const PMapsContainer &pmaps, const std::string &map_name)
(refer to Property Maps API)
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
std::map< std::string, boost::any > PMapsContainer
PCVertexToVertexMap< PointCloudS, PointCloudT > V2VMap
FEVV::PCLPointCloudPointMap::value_type get(const FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key)
Specialization of get(point_map, key) for PCLPointCloud.
Interfaces for plugins These interfaces will be used for different plugins.
CopyPCParameters & v2v(V2VMap *_v2v)
void copy_point_cloud(const PointCloudS &pc_s, const PMapsContainer &pmaps_s, PointCloudT &pc_t, PMapsContainer &pmaps_t, const Parameters ¶ms, const GeometryTraitsS >_s, const GeometryTraitsT &)
Copy a source point cloud into a target point cloud. Copy standard properties too.
std::vector< std::string > list_property_maps(const PMapsContainer &pmaps)
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor add_vertex(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_property_type vp, FEVV::DataStructures::AIF::AIFMesh &sm)
boost::graph_traits< MeshT >::vertex_descriptor vertex_descriptor
std::map< typename boost::graph_traits< PointCloudS >::vertex_descriptor, typename boost::graph_traits< PointCloudT >::vertex_descriptor > PCVertexToVertexMap
void put(FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key, const FEVV::PCLPointCloudPointMap::value_type &value)
Specialization of put(point_map, key, value) for PCLPointCloud.
Parameters contains the compression parameters except the stopping criteria.
boost::graph_traits< MeshT >::vertices_size_type size_of_vertices(const MeshT &g)
Real current number of vertices of the mesh. Generic version.
PMap_traits< PropertyT, MeshT >::pmap_type make_property_map(PropertyT, const MeshT &m)