lasinterval.hpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: lasinterval.hpp
5 
6  CONTENTS:
7 
8  Reads LIDAR .
9 
10  PROGRAMMERS:
11 
12  martin.isenburg@gmail.com
13 
14  COPYRIGHT:
15 
16  (c) 2009-11, Martin Isenburg, LASSO - tools to catch reality
17 
18  This is free software; you can redistribute and/or modify it under the
19  terms of the GNU Lesser General Licence as published by the Free Software
20  Foundation. See the COPYING file for more information.
21 
22  This software is distributed WITHOUT ANY WARRANTY and without even the
23  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 
25  CHANGE HISTORY:
26 
27  29 April 2011 -- created after cable outage during the royal wedding (-:
28 
29 ===============================================================================
30 */
31 #ifndef LAS_INTERVAL_HPP
32 #define LAS_INTERVAL_HPP
33 
34 #include "mydefs.hpp"
35 
36 class ByteStreamIn;
37 class ByteStreamOut;
38 
40 {
41 public:
46  LASintervalCell(const U32 p_index);
47  LASintervalCell(const LASintervalCell* cell);
48 };
49 
51 {
52 public:
57  LASintervalStartCell(const U32 p_index);
58  BOOL add(const U32 p_index, const U32 threshold=1000);
59 };
60 
62 {
63 public:
64  LASinterval(const U32 threshold=1000);
65  ~LASinterval();
66 
67  // add points and create cells with intervals
68  BOOL add(const U32 p_index, const I32 c_index);
69 
70  // get total number of cells
71  U32 get_number_cells() const;
72 
73  // get total number of intervals
74  U32 get_number_intervals() const;
75 
76  // merge cells (and their intervals) into one cell
77  BOOL merge_cells(const U32 num_indices, const I32* indices, const I32 new_index);
78 
79  // merge adjacent intervals with small gaps in cells to reduce total interval number to maximum
80  void merge_intervals(U32 maximum);
81 
82  // read from file or write to file
83  BOOL read(ByteStreamIn* stream);
84  BOOL write(ByteStreamOut* stream) const;
85 
86  // get one cell after the other
87  void get_cells();
88  BOOL has_cells();
89 
90  // get a particular cell
91  BOOL get_cell(const I32 c_index);
92 
93  // add cell's intervals to those that will be merged
94  BOOL add_current_cell_to_merge_cell_set();
95  BOOL add_cell_to_merge_cell_set(const I32 c_index, const BOOL erase=FALSE);
96  BOOL merge(const BOOL erase=FALSE);
97  void clear_merge_cell_set();
98  BOOL get_merged_cell();
99 
100  // iterate intervals of current cell (or over merged intervals)
101  BOOL has_intervals();
102 
108 
109 private:
110  void* cells;
119 };
120 
121 #endif
int BOOL
Definition: mydefs.hpp:57
#define FALSE
Definition: mydefs.hpp:133
LASintervalCell * next
Definition: lasinterval.hpp:44
LASintervalStartCell * last_cell
unsigned int U32
Definition: mydefs.hpp:39
LASintervalStartCell * merged_cells
void * cells_to_merge
BOOL merged_cells_temporary
int I32
Definition: mydefs.hpp:35
LASintervalCell * last
Definition: lasinterval.hpp:55
U32 number_intervals
LASintervalCell * current_cell


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:07