Point Cloud Library (PCL)  1.9.1-dev
octree_abstract_node_container.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2010-2012, Willow Garage, Inc.
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of Willow Garage, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  * $Id: octree_abstract_node_container.h 6802M 2012-08-25 00:11:05Z (local) $
37  */
38 
39 #pragma once
40 
41 #include <mutex>
42 #include <string>
43 #include <vector>
44 
45 #include <pcl/outofcore/boost.h>
46 
47 namespace pcl
48 {
49  namespace outofcore
50  {
51  template<typename PointT>
53  {
54 
55  public:
56  using AlignedPointTVector = std::vector<PointT, Eigen::aligned_allocator<PointT> >;
57 
59  : container_ ()
60  {}
61 
62  OutofcoreAbstractNodeContainer (const boost::filesystem::path&) {}
63 
64  virtual
66 
67  virtual void
68  insertRange (const PointT* start, const std::uint64_t count)=0;
69 
70  virtual void
71  insertRange (const PointT* const* start, const std::uint64_t count)=0;
72 
73  virtual void
74  readRange (const std::uint64_t start, const std::uint64_t count, AlignedPointTVector& v)=0;
75 
76  virtual void
77  readRangeSubSample (const std::uint64_t start, const std::uint64_t count, const double percent, AlignedPointTVector& v) =0;
78 
79  virtual bool
80  empty () const=0;
81 
82  virtual std::uint64_t
83  size () const =0;
84 
85  virtual void
86  clear ()=0;
87 
88  virtual void
89  convertToXYZ (const boost::filesystem::path& path)=0;
90 
91  virtual PointT
92  operator[] (std::uint64_t idx) const=0;
93 
94  protected:
96 
98 
99  static std::mutex rng_mutex_;
100  };
101  }//namespace outofcore
102 }//namespace pcl
virtual void readRange(const std::uint64_t start, const std::uint64_t count, AlignedPointTVector &v)=0
virtual void convertToXYZ(const boost::filesystem::path &path)=0
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
virtual std::uint64_t size() const =0
virtual void readRangeSubSample(const std::uint64_t start, const std::uint64_t count, const double percent, AlignedPointTVector &v)=0
virtual PointT operator[](std::uint64_t idx) const =0
A point structure representing Euclidean xyz coordinates, and the RGB color.
std::vector< PointT, Eigen::aligned_allocator< PointT > > AlignedPointTVector
virtual void insertRange(const PointT *start, const std::uint64_t count)=0