ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
LasExtraScalarFieldCard.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 "LasExtraScalarField.h"
28 #include "ui_extra_scarlar_field_card.h"
29 
30 class LasExtraScalarFieldCard : public QWidget
31  , public Ui::ExtraScalarFieldCard
32 {
33  Q_OBJECT
34 
35  public:
36  explicit LasExtraScalarFieldCard(QWidget* parent = nullptr);
37 
38  void fillFrom(const LasExtraScalarField& field);
39 
40  void reset();
41 
43 
44  bool fillField(LasExtraScalarField& field, const ccPointCloud& pointCloud) const;
45 
46  private:
49  struct ScalarFieldUserInputs
50  {
51  QComboBox* scalarFieldComboBox{nullptr};
52  QDoubleSpinBox* scaleSpinBox{nullptr};
53  QDoubleSpinBox* offsetSpinBox{nullptr};
54  };
55 
56  void onNumberOfElementsSelected(unsigned numberOfElements);
57  void onRadioButton1Selected(bool);
58  void onRadioButton2Selected(bool);
59  void onRadioButton3Selected(bool);
60 
61  void onToggleAdvancedOptionsClicked();
62 
63  private:
64  ScalarFieldUserInputs m_scalarFieldsUserInputs[LasExtraScalarField::MAX_DIM_SIZE];
65 };
void fillFrom(const LasExtraScalarField &field)
LasExtraScalarField::DataType dataType() const
bool fillField(LasExtraScalarField &field, const ccPointCloud &pointCloud) const
LasExtraScalarFieldCard(QWidget *parent=nullptr)
This serves the same purpose as LasScalarField but for extra bytes.
static constexpr unsigned MAX_DIM_SIZE
DataType
Data types available LAS Extra Field.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)