lasfilter.hpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: lasfilter.hpp
5 
6  CONTENTS:
7 
8  Filters LIDAR points based on certain criteria being true (or not).
9 
10  PROGRAMMERS:
11 
12  martin.isenburg@gmail.com
13 
14  COPYRIGHT:
15 
16  (c) 2007-2011, 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  25 December 2010 -- created after swinging in Mara's hammock for hours
28 
29 ===============================================================================
30 */
31 #ifndef LAS_FILTER_HPP
32 #define LAS_FILTER_HPP
33 
34 #include "lasdefinitions.hpp"
35 
37 {
38 public:
39  virtual const char * name() const = 0;
40  virtual int get_command(char* string) const = 0;
41  virtual BOOL filter(const LASpoint* point) = 0;
42  virtual void reset(){};
43  virtual ~LAScriterion(){};
44 };
45 
46 class LASfilter
47 {
48 public:
49 
50  void usage() const;
51  void clean();
52  BOOL parse(int argc, char* argv[]);
53  int unparse(char* string) const;
54  inline BOOL active() const { return (num_criteria != 0); };
55  void addClipCircle(F64 x, F64 y, F64 radius);
56  void addScanDirectionChangeOnly();
57 
58  BOOL filter(const LASpoint* point);
59  void reset();
60 
61  LASfilter();
62  ~LASfilter();
63 
64 private:
65 
66  void add_criterion(LAScriterion* criterion);
70  int* counters;
71 };
72 
73 #endif
int BOOL
Definition: mydefs.hpp:57
int * counters
Definition: lasfilter.hpp:70
unsigned int U32
Definition: mydefs.hpp:39
virtual ~LAScriterion()
Definition: lasfilter.hpp:43
virtual BOOL filter(const LASpoint *point)=0
virtual const char * name() const =0
U32 num_criteria
Definition: lasfilter.hpp:67
U32 alloc_criteria
Definition: lasfilter.hpp:68
BOOL active() const
Definition: lasfilter.hpp:54
virtual int get_command(char *string) const =0
virtual void reset()
Definition: lasfilter.hpp:42
double F64
Definition: mydefs.hpp:52
char ** argv
LAScriterion ** criteria
Definition: lasfilter.hpp:69


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