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
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();
99 
100  // iterate intervals of current cell (or over merged intervals)
102 
108 
109 private:
110  void* cells;
119 };
120 
121 #endif
LASinterval::last_cell
LASintervalStartCell * last_cell
Definition: lasinterval.hpp:115
LASinterval::clear_merge_cell_set
void clear_merge_cell_set()
Definition: lasinterval.cpp:468
LASinterval::number_intervals
U32 number_intervals
Definition: lasinterval.hpp:113
LASinterval::current_cell
LASintervalCell * current_cell
Definition: lasinterval.hpp:116
LASinterval::add
BOOL add(const U32 p_index, const I32 c_index)
Definition: lasinterval.cpp:130
LASinterval::get_cells
void get_cells()
Definition: lasinterval.cpp:299
LASinterval::index
I32 index
Definition: lasinterval.hpp:103
I32
int I32
Definition: mydefs.hpp:35
LASintervalStartCell::add
BOOL add(const U32 p_index, const U32 threshold=1000)
Definition: lasinterval.cpp:97
LASintervalCell
Definition: lasinterval.hpp:39
LASintervalStartCell::total
U32 total
Definition: lasinterval.hpp:54
LASinterval::start
U32 start
Definition: lasinterval.hpp:104
LASinterval::merge_intervals
void merge_intervals(U32 maximum)
Definition: lasinterval.cpp:194
LASinterval::get_number_intervals
U32 get_number_intervals() const
Definition: lasinterval.cpp:160
ByteStreamOut
Definition: bytestreamout.hpp:36
LASinterval::merged_cells_temporary
BOOL merged_cells_temporary
Definition: lasinterval.hpp:118
LASintervalStartCell::last
LASintervalCell * last
Definition: lasinterval.hpp:55
LASinterval::threshold
U32 threshold
Definition: lasinterval.hpp:112
mydefs.hpp
LASinterval::get_merged_cell
BOOL get_merged_cell()
Definition: lasinterval.cpp:476
LASinterval::end
U32 end
Definition: lasinterval.hpp:105
ByteStreamIn
Definition: bytestreamin.hpp:36
LASinterval::has_intervals
BOOL has_intervals()
Definition: lasinterval.cpp:488
LASinterval::full
U32 full
Definition: lasinterval.hpp:106
LASinterval::LASinterval
LASinterval(const U32 threshold=1000)
Definition: lasinterval.cpp:500
LASinterval::read
BOOL read(ByteStreamIn *stream)
Definition: lasinterval.cpp:519
LASinterval::~LASinterval
~LASinterval()
Definition: lasinterval.cpp:513
LASintervalStartCell::LASintervalStartCell
LASintervalStartCell()
Definition: lasinterval.cpp:83
LASinterval::last_index
I32 last_index
Definition: lasinterval.hpp:114
BOOL
int BOOL
Definition: mydefs.hpp:57
LASinterval::merged_cells
LASintervalStartCell * merged_cells
Definition: lasinterval.hpp:117
FALSE
#define FALSE
Definition: mydefs.hpp:133
LASinterval::cells_to_merge
void * cells_to_merge
Definition: lasinterval.hpp:111
LASintervalStartCell::full
U32 full
Definition: lasinterval.hpp:53
LASinterval::has_cells
BOOL has_cells()
Definition: lasinterval.cpp:305
LASinterval::get_cell
BOOL get_cell(const I32 c_index)
Definition: lasinterval.cpp:331
LASinterval::total
U32 total
Definition: lasinterval.hpp:107
U32
unsigned int U32
Definition: mydefs.hpp:39
LASintervalStartCell
Definition: lasinterval.hpp:50
LASintervalCell::start
U32 start
Definition: lasinterval.hpp:42
LASinterval::cells
void * cells
Definition: lasinterval.hpp:110
LASinterval::write
BOOL write(ByteStreamOut *stream) const
Definition: lasinterval.cpp:603
LASinterval::add_current_cell_to_merge_cell_set
BOOL add_current_cell_to_merge_cell_set()
Definition: lasinterval.cpp:346
LASinterval::merge_cells
BOOL merge_cells(const U32 num_indices, const I32 *indices, const I32 new_index)
Definition: lasinterval.cpp:166
LASinterval::add_cell_to_merge_cell_set
BOOL add_cell_to_merge_cell_set(const I32 c_index, const BOOL erase=FALSE)
Definition: lasinterval.cpp:360
LASintervalCell::next
LASintervalCell * next
Definition: lasinterval.hpp:44
LASinterval::get_number_cells
U32 get_number_cells() const
Definition: lasinterval.cpp:154
LASintervalCell::LASintervalCell
LASintervalCell()
Definition: lasinterval.cpp:62
LASinterval
Definition: lasinterval.hpp:61
LASintervalCell::end
U32 end
Definition: lasinterval.hpp:43
LASinterval::merge
BOOL merge(const BOOL erase=FALSE)
Definition: lasinterval.cpp:376


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 Wed Mar 2 2022 00:37:23