lasreader_bin.hpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: lasreader_bin.hpp
5 
6  CONTENTS:
7 
8  Reads LIDAR from Terrascan's BIN format via on-the-fly conversion as LAS.
9 
10  Format description: http://www.terrasolid.fi/system/files/tscan.pdf
11 
12  PROGRAMMERS:
13 
14  martin.isenburg@gmail.com
15 
16  COPYRIGHT:
17 
18  (c) 2007-2011, Martin Isenburg, LASSO - tools to catch reality
19 
20  This is free software; you can redistribute and/or modify it under the
21  terms of the GNU Lesser General Licence as published by the Free Software
22  Foundation. See the COPYING file for more information.
23 
24  This software is distributed WITHOUT ANY WARRANTY and without even the
25  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26 
27  CHANGE HISTORY:
28 
29  4 September 2011 -- created on Labor Day Sunday far from beloved mountains
30 
31 ===============================================================================
32 */
33 #ifndef LAS_READER_BIN_HPP
34 #define LAS_READER_BIN_HPP
35 
36 #include "lasreader.hpp"
37 
38 #include <stdio.h>
39 
40 class LASreaderBIN : public LASreader
41 {
42 public:
43 
44  BOOL open(const char* file_name);
45 
46  I32 get_format() const { return LAS_TOOLS_FORMAT_BIN; };
47 
48  BOOL seek(const I64 p_index);
49 
50  ByteStreamIn* get_stream() const;
51  void close(BOOL close_stream=TRUE);
52  BOOL reopen(const char* file_name);
53 
54  LASreaderBIN();
55  virtual ~LASreaderBIN();
56 
57 protected:
58  virtual BOOL open(ByteStreamIn* stream);
60 
61 private:
62  FILE* file;
65 };
66 
67 class LASreaderBINrescale : public virtual LASreaderBIN
68 {
69 public:
70  virtual BOOL open(ByteStreamIn* stream);
71  LASreaderBINrescale(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor);
72 
73 protected:
75 };
76 
77 class LASreaderBINreoffset : public virtual LASreaderBIN
78 {
79 public:
80  virtual BOOL open(ByteStreamIn* stream);
81  LASreaderBINreoffset(F64 x_offset, F64 y_offset, F64 z_offset);
82 protected:
83  F64 offset[3];
84 };
85 
87 {
88 public:
90  LASreaderBINrescalereoffset(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor, F64 x_offset, F64 y_offset, F64 z_offset);
91 };
92 
93 #endif
LASreaderBINrescale
Definition: lasreader_bin.hpp:67
LASreaderBINreoffset::open
virtual BOOL open(ByteStreamIn *stream)
Definition: lasreader_bin.cpp:433
LASreaderBINreoffset::offset
F64 offset[3]
Definition: lasreader_bin.hpp:83
LASreaderBIN::open
BOOL open(const char *file_name)
Definition: lasreader_bin.cpp:81
LASreaderBIN::stream
ByteStreamIn * stream
Definition: lasreader_bin.hpp:63
LASreaderBIN::reopen
BOOL reopen(const char *file_name)
lasreader.hpp
I64
long long I64
Definition: mydefs.hpp:48
F64
double F64
Definition: mydefs.hpp:52
LASreaderBIN::close
void close(BOOL close_stream=TRUE)
Definition: lasreader_bin.cpp:372
LASreaderBIN::~LASreaderBIN
virtual ~LASreaderBIN()
Definition: lasreader_bin.cpp:395
I32
int I32
Definition: mydefs.hpp:35
TRUE
#define TRUE
Definition: mydefs.hpp:137
LASreaderBINrescalereoffset::LASreaderBINrescalereoffset
LASreaderBINrescalereoffset(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor, F64 x_offset, F64 y_offset, F64 z_offset)
Definition: lasreader_bin.cpp:452
LASreaderBIN
Definition: lasreader_bin.hpp:40
LASreaderBINrescale::scale_factor
F64 scale_factor[3]
Definition: lasreader_bin.hpp:74
LASreaderBINrescalereoffset::open
BOOL open(ByteStreamIn *stream)
Definition: lasreader_bin.cpp:456
LAS_TOOLS_FORMAT_BIN
#define LAS_TOOLS_FORMAT_BIN
Definition: lasdefinitions.hpp:60
LASreader
Definition: lasreader.hpp:49
LASreaderBIN::get_stream
ByteStreamIn * get_stream() const
Definition: lasreader_bin.cpp:367
LASreaderBIN::file
FILE * file
Definition: lasreader_bin.hpp:62
ByteStreamIn
Definition: bytestreamin.hpp:36
LASreaderBIN::seek
BOOL seek(const I64 p_index)
Definition: lasreader_bin.cpp:249
LASreaderBIN::read_point_default
BOOL read_point_default()
Definition: lasreader_bin.cpp:268
BOOL
int BOOL
Definition: mydefs.hpp:57
LASreaderBINreoffset
Definition: lasreader_bin.hpp:77
LASreaderBINreoffset::LASreaderBINreoffset
LASreaderBINreoffset(F64 x_offset, F64 y_offset, F64 z_offset)
Definition: lasreader_bin.cpp:426
LASreaderBIN::version
I32 version
Definition: lasreader_bin.hpp:64
LASreaderBINrescale::open
virtual BOOL open(ByteStreamIn *stream)
Definition: lasreader_bin.cpp:407
LASreaderBIN::get_format
I32 get_format() const
Definition: lasreader_bin.hpp:46
LASreaderBIN::LASreaderBIN
LASreaderBIN()
Definition: lasreader_bin.cpp:389
LASreaderBINrescale::LASreaderBINrescale
LASreaderBINrescale(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor)
Definition: lasreader_bin.cpp:400
LASreaderBINrescalereoffset
Definition: lasreader_bin.hpp:86


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