1 #ifndef LIBLAS_CHIPPER_H 2 #define LIBLAS_CHIPPER_H 6 #include <liblas/detail/opt_allocator.hpp> 30 bool operator < (
const PtRef& pt)
const 31 {
return m_pos < pt.
m_pos; }
33 typedef std::vector<PtRef, detail::opt_allocator<PtRef> >
PtRefVec;
48 PtRefVec::size_type
size()
const 49 {
return m_vec_p->size(); }
51 { m_vec_p->reserve(n); }
53 { m_vec_p->resize(n); }
55 { m_vec_p->push_back(ref); }
57 {
return m_vec_p->begin(); }
58 PtRefVec::iterator
end()
59 {
return m_vec_p->end(); }
61 {
return (*m_vec_p)[pos]; }
66 else if (m_dir ==
DIR_Y)
71 void SortByOIndex(uint32_t left, uint32_t center,
92 std::vector<uint32_t> GetIDs()
const;
103 Options() : m_threshold( 1000 ), m_use_sort( false ),
124 m_options.m_threshold = max_partition_size;
129 {
return m_blocks.size(); }
131 {
return m_blocks[i]; }
136 void Partition(uint32_t size);
139 uint32_t left, uint32_t right);
141 uint32_t left, uint32_t center, uint32_t right);
143 uint32_t left, uint32_t right);
145 uint32_t pleft, uint32_t pcenter);
146 void Emit(
RefList& wide, uint32_t widemin, uint32_t widemax,
147 RefList& narrow, uint32_t narrowmin, uint32_t narrowmax);
150 std::vector<Block> m_blocks;
151 std::vector<uint32_t> m_partitions;
154 boost::shared_ptr<detail::opt_allocator<PtRef> > m_allocator;
~RefList()
Definition: chipper.hpp:43
std::string m_map_file
Definition: chipper.hpp:114
Definition: chipper.hpp:35
#define NULL
Definition: las_config.h:63
#define LAS_DLL
Definition: export.hpp:58
RefList(Direction dir=DIR_NONE)
Definition: chipper.hpp:41
Definition: chipper.hpp:20
PtRef & operator[](uint32_t pos)
Definition: chipper.hpp:60
void SetAllocator(detail::opt_allocator< PtRef > *alloc_p)
Definition: chipper.hpp:73
PtRefVec::size_type size() const
Definition: chipper.hpp:48
Chipper(Reader *reader, uint32_t max_partition_size)
Definition: chipper.hpp:121
void resize(PtRefVec::size_type n)
Definition: chipper.hpp:52
PtRefVec * m_vec_p
Definition: chipper.hpp:38
void push_back(const PtRef &ref)
Definition: chipper.hpp:54
Definition: chipper.hpp:100
Direction
Definition: chipper.hpp:16
bool m_use_maps
Definition: chipper.hpp:112
std::vector< PtRef, detail::opt_allocator< PtRef > > PtRefVec
Definition: chipper.hpp:33
Options()
Definition: chipper.hpp:103
void reserve(PtRefVec::size_type n)
Definition: chipper.hpp:50
uint32_t m_ptindex
Definition: chipper.hpp:27
PtRefVec::iterator begin()
Definition: chipper.hpp:56
Defines public interface to LAS reader implementation.
Definition: reader.hpp:66
void SetBounds(liblas::Bounds< double > const &bounds)
Definition: chipper.hpp:95
std::string Dir()
Definition: chipper.hpp:62
Namespace grouping all elements of libLAS public interface.
Definition: bounds.hpp:60
Definition: chipper.hpp:81
const Block & GetBlock(std::vector< Block >::size_type i)
Definition: chipper.hpp:130
uint32_t m_oindex
Definition: chipper.hpp:28
Definition: chipper.hpp:18
double m_pos
Definition: chipper.hpp:26
Definition: chipper.hpp:23
std::vector< Block >::size_type GetBlockCount()
Definition: chipper.hpp:128
PtRefVec::iterator end()
Definition: chipper.hpp:58
Definition: chipper.hpp:19
class LAS_DLL Chipper
Definition: chipper.hpp:79
Definition: chipper.hpp:117
uint32_t m_threshold
Definition: chipper.hpp:108
bool m_use_sort
Definition: chipper.hpp:110
Bounds< double > const & GetBounds() const
Definition: chipper.hpp:93
Direction m_dir
Definition: chipper.hpp:39