11 #include <QFileDialog>
13 #include <QMessageBox>
20 : QDialog(parent),
Ui::OpenLASFileDialog(), m_autoSkip(false) {
25 connect(applyAllButton, &QAbstractButton::clicked,
this,
27 connect(browseToolButton, &QAbstractButton::clicked,
this,
29 connect(tileGroupBox, &QGroupBox::toggled, applyAllButton,
30 &QWidget::setDisabled);
33 applyAllButton->setEnabled(!tileGroupBox->isChecked());
35 if (tileGroupBox->isChecked()) {
36 tabWidget->setCurrentIndex(2);
48 QString outputPath = QFileDialog::getExistingDirectory(
49 this,
"Output path", outputPathLineEdit->text());
50 if (outputPath.isEmpty()) {
55 outputPathLineEdit->setText(outputPath);
60 for (
const std::string& dimension : dimensions) {
61 if (QString(dimension.c_str()).toUpper() ==
76 classifCheckBox->setEnabled(hasClassif);
77 decomposeClassifGroupBox->setEnabled(hasClassif);
81 returnNumberCheckBox->setEnabled(
83 numberOfReturnsCheckBox->setEnabled(
85 scanDirFlagCheckBox->setEnabled(
87 edgeOfFlightCheckBox->setEnabled(
89 scanAngleRankCheckBox->setEnabled(
92 pointSourceIDCheckBox->setEnabled(
108 return intensityCheckBox->isEnabled() &&
109 intensityCheckBox->isChecked();
111 return returnNumberCheckBox->isEnabled() &&
112 returnNumberCheckBox->isChecked();
114 return numberOfReturnsCheckBox->isEnabled() &&
115 numberOfReturnsCheckBox->isChecked();
117 return scanDirFlagCheckBox->isEnabled() &&
118 scanDirFlagCheckBox->isChecked();
120 return edgeOfFlightCheckBox->isEnabled() &&
121 edgeOfFlightCheckBox->isChecked();
123 return classifCheckBox->isEnabled() &&
124 classifCheckBox->isChecked() &&
125 !decomposeClassifGroupBox->isChecked();
127 return scanAngleRankCheckBox->isEnabled() &&
128 scanAngleRankCheckBox->isChecked();
130 return userDataCheckBox->isEnabled() &&
131 userDataCheckBox->isChecked();
133 return pointSourceIDCheckBox->isEnabled() &&
134 pointSourceIDCheckBox->isChecked();
136 return redCheckBox->isEnabled() && redCheckBox->isChecked();
138 return greenCheckBox->isEnabled() && greenCheckBox->isChecked();
140 return blueCheckBox->isEnabled() && blueCheckBox->isChecked();
142 return timeCheckBox->isEnabled() && timeCheckBox->isChecked();
144 return extraFieldGroupBox->isEnabled() &&
145 extraFieldGroupBox->isChecked();
147 return classifCheckBox->isEnabled() &&
148 classifCheckBox->isChecked() &&
149 decomposeClassifGroupBox->isChecked() &&
150 classifValueCheckBox->isChecked();
152 return classifCheckBox->isEnabled() &&
153 classifCheckBox->isChecked() &&
154 decomposeClassifGroupBox->isChecked() &&
155 classifSyntheticCheckBox->isChecked();
157 return classifCheckBox->isEnabled() &&
158 classifCheckBox->isChecked() &&
159 decomposeClassifGroupBox->isChecked() &&
160 classifKeypointCheckBox->isChecked();
162 return classifCheckBox->isEnabled() &&
163 classifCheckBox->isChecked() &&
164 decomposeClassifGroupBox->isChecked() &&
165 classifWithheldCheckBox->isChecked();
167 return classifCheckBox->isEnabled() &&
168 classifCheckBox->isChecked() &&
169 decomposeClassifGroupBox->isChecked() &&
170 classifOverlapCheckBox->isChecked();
181 evlrListWidget->clear();
182 extraFieldGroupBox->setEnabled(
false);
183 extraFieldGroupBox->setChecked(
false);
191 outputPathLineEdit->setText(QFileInfo(
filename).absolutePath());
194 pointCountLineEdit->setText(
198 bbTextEdit->setText(QString(
"X = [%1 ; %2]\nY = [%3 ; %4]\nZ = [%5 ; %6]")
199 .arg(bbMin.
x, 0,
'f')
200 .arg(bbMax.
x, 0,
'f')
201 .arg(bbMin.
y, 0,
'f')
202 .arg(bbMax.
y, 0,
'f')
203 .arg(bbMin.
z, 0,
'f')
204 .arg(bbMax.
z, 0,
'f'));
208 QListWidgetItem* item =
new QListWidgetItem(description);
209 evlrListWidget->addItem(item);
211 item->setSelected(
true);
213 extraFieldGroupBox->setEnabled(
true);
214 extraFieldGroupBox->setChecked(
true);
218 if (!extraFieldGroupBox->isChecked())
return false;
220 QListWidgetItem* item = evlrListWidget->item(
static_cast<int>(index));
221 return item && item->isSelected();
225 return force8bitRgbCheckBox->isChecked();
229 if (!timeShiftDoubleSpinBox->isEnabled()) {
233 timeShift = timeShiftDoubleSpinBox->value();
const char LAS_FIELD_NAMES[][28]
bool FieldIsPresent(const std::vector< std::string > &dimensions, LAS_FIELDS field)
bool doLoad(LAS_FIELDS field) const
Whether to load a given field.
void resetApplyAll()
Resets the "apply all" flag (if set)
void addEVLR(QString description)
Adds an 'extra bytes' record entry.
bool doLoadEVLR(size_t index) const
Returns whether an EVLR is selected for laoding or not.
bool getTimeShift(double &timeShift) const
Returns the timeshift (if any)
LASOpenDlg(QWidget *parent=nullptr)
Default constructor.
void setInfos(QString filename, unsigned pointCount, const CCVector3d &bbMin, const CCVector3d &bbMax)
Sets the information about the file.
void setDimensions(const std::vector< std::string > &dimensions)
Sets available dimensions.
bool forced8bitRgbMode() const
Whether 8-bit RGB mode is forced or not.
void clearEVLRs()
Clears the 'extra bytes' record.
std::string toString(T x)