ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
LasTiler.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // ##########################################################################
11 // # #
12 // # CloudViewer PLUGIN: LAS-IO Plugin #
13 // # #
14 // # This program is free software; you can redistribute it and/or modify #
15 // # it under the terms of the GNU General Public License as published by #
16 // # the Free Software Foundation; version 2 of the License. #
17 // # #
18 // # This program is distributed in the hope that it will be useful, #
19 // # but WITHOUT ANY WARRANTY; without even the implied warranty of #
20 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
21 // # GNU General Public License for more details. #
22 // # #
23 // # COPYRIGHT: Thomas Montaigu #
24 // # #
25 // ##########################################################################
26 
27 #include <FileIOFilter.h>
28 #include <QString>
29 #include <laszip/laszip_api.h>
30 
32 {
33  XY,
34  XZ,
35  YZ,
36 };
37 
38 struct LasTilingOptions final
39 {
40  QString outputDir;
42  unsigned numTiles0;
43  unsigned numTiles1;
44 
45  inline size_t index0() const
46  {
47  switch (dims)
48  {
50  Q_FALLTHROUGH();
52  return 0;
54  return 1;
55  }
56  return 0;
57  }
58 
59  inline size_t index1() const
60  {
61  switch (dims)
62  {
64  return 1;
66  Q_FALLTHROUGH();
68  return 2;
69  }
70  return 1;
71  }
72 };
73 
77 CC_FILE_ERROR TileLasReader(laszip_POINTER laszipReader, const QString& originName, const LasTilingOptions& options);
CC_FILE_ERROR
Typical I/O filter errors.
Definition: FileIOFilter.h:20
CC_FILE_ERROR TileLasReader(laszip_POINTER laszipReader, const QString &originName, const LasTilingOptions &options)
Definition: LasTiler.cpp:14
LasTilingDimensions
Definition: LasTiler.h:32
size_t index0() const
Definition: LasTiler.h:45
size_t index1() const
Definition: LasTiler.h:59
unsigned numTiles0
Definition: LasTiler.h:42
unsigned numTiles1
Definition: LasTiler.h:43
QString outputDir
Definition: LasTiler.h:40
LasTilingDimensions dims
Definition: LasTiler.h:41