ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
LASOpenDlg.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 // Local
11 #include "LASFields.h"
12 
13 // GUIs generated by Qt Designer
14 #include <ui_openLASFileDlg.h>
15 
16 // system
17 #include <string.h>
18 
19 #include <vector>
20 
21 // cloudViewer
22 #include <CVGeom.h>
23 
25 class LASOpenDlg : public QDialog, public Ui::OpenLASFileDialog {
26  Q_OBJECT
27 
28 public:
30  explicit LASOpenDlg(QWidget* parent = nullptr);
31 
33  void setDimensions(const std::vector<std::string>& dimensions);
34 
36  bool doLoad(LAS_FIELDS field) const;
37 
39  void clearEVLRs();
40 
42  void setInfos(QString filename,
43  unsigned pointCount,
44  const CCVector3d& bbMin,
45  const CCVector3d& bbMax);
46 
48  void addEVLR(QString description);
49 
51  bool doLoadEVLR(size_t index) const;
52 
54  inline bool autoSkipMode() const { return m_autoSkip; }
55 
57  bool forced8bitRgbMode() const;
58 
60  void resetApplyAll();
61 
63  bool getTimeShift(double& timeShift) const;
64 
65 protected:
66  void onApplyAll();
67  void onBrowse();
68 
69 protected:
70  bool m_autoSkip;
71 };
std::string filename
LAS_FIELDS
Definition: LASFields.h:35
Dialog to choose the LAS fields to load.
Definition: LASOpenDlg.h:25
bool doLoad(LAS_FIELDS field) const
Whether to load a given field.
Definition: LASOpenDlg.cpp:101
void onApplyAll()
Definition: LASOpenDlg.cpp:42
void resetApplyAll()
Resets the "apply all" flag (if set)
Definition: LASOpenDlg.cpp:40
void onBrowse()
Definition: LASOpenDlg.cpp:47
void addEVLR(QString description)
Adds an 'extra bytes' record entry.
Definition: LASOpenDlg.cpp:207
bool m_autoSkip
Definition: LASOpenDlg.h:70
bool doLoadEVLR(size_t index) const
Returns whether an EVLR is selected for laoding or not.
Definition: LASOpenDlg.cpp:217
bool getTimeShift(double &timeShift) const
Returns the timeshift (if any)
Definition: LASOpenDlg.cpp:228
LASOpenDlg(QWidget *parent=nullptr)
Default constructor.
Definition: LASOpenDlg.cpp:19
void setInfos(QString filename, unsigned pointCount, const CCVector3d &bbMin, const CCVector3d &bbMax)
Sets the information about the file.
Definition: LASOpenDlg.cpp:186
void setDimensions(const std::vector< std::string > &dimensions)
Sets available dimensions.
Definition: LASOpenDlg.cpp:69
bool forced8bitRgbMode() const
Whether 8-bit RGB mode is forced or not.
Definition: LASOpenDlg.cpp:224
bool autoSkipMode() const
Auto-skip mode (to use the same parameters for ALL files afterwards)
Definition: LASOpenDlg.h:54
void clearEVLRs()
Clears the 'extra bytes' record.
Definition: LASOpenDlg.cpp:180