@@ -149,13 +149,13 @@ void ExportCloudsDialog::updateMLSGrpVisibility()
149149}
150150void ExportCloudsDialog::updateTexturingAvailability ()
151151{
152- updateTexturingAvailability (_ui->checkBox_binary ->isVisible ());
152+ updateTexturingAvailability (_ui->checkBox_binary ->isEnabled ());
153153}
154154void ExportCloudsDialog::updateTexturingAvailability (bool isExporting)
155155{
156156 _ui->checkBox_textureMapping ->setEnabled (!_ui->checkBox_assemble ->isChecked () || isExporting);
157157 _ui->label_textureMapping ->setEnabled (_ui->checkBox_textureMapping ->isEnabled ());
158- _ui->doubleSpinBox_meshDecimationFactor ->setEnabled (!_ui->checkBox_textureMapping ->isEnabled () || !_ui->checkBox_textureMapping ->isChecked ());
158+ _ui->doubleSpinBox_meshDecimationFactor ->setEnabled (!_ui->checkBox_textureMapping ->isEnabled () || !_ui->checkBox_textureMapping ->isChecked () || _ui-> comboBox_pipeline -> currentIndex () == 1 );
159159 _ui->label_meshDecimation ->setEnabled (_ui->doubleSpinBox_meshDecimationFactor ->isEnabled ());
160160}
161161
@@ -299,6 +299,7 @@ void ExportCloudsDialog::loadSettings(QSettings & settings, const QString & grou
299299
300300void ExportCloudsDialog::restoreDefaults ()
301301{
302+ _ui->comboBox_pipeline ->setCurrentIndex (0 );
302303 _ui->checkBox_binary ->setChecked (true );
303304 _ui->spinBox_normalKSearch ->setValue (10 );
304305
@@ -382,6 +383,7 @@ void ExportCloudsDialog::setSaveButton()
382383 _ui->buttonBox ->button (QDialogButtonBox::Ok)->setVisible (false );
383384 _ui->buttonBox ->button (QDialogButtonBox::Save)->setVisible (true );
384385 _ui->checkBox_binary ->setVisible (true );
386+ _ui->checkBox_binary ->setEnabled (true );
385387 _ui->label_binaryFile ->setVisible (true );
386388 _ui->checkBox_mesh_quad ->setVisible (false );
387389 _ui->checkBox_mesh_quad ->setEnabled (false );
@@ -394,6 +396,7 @@ void ExportCloudsDialog::setOkButton()
394396 _ui->buttonBox ->button (QDialogButtonBox::Ok)->setVisible (true );
395397 _ui->buttonBox ->button (QDialogButtonBox::Save)->setVisible (false );
396398 _ui->checkBox_binary ->setVisible (false );
399+ _ui->checkBox_binary ->setEnabled (false );
397400 _ui->label_binaryFile ->setVisible (false );
398401 _ui->checkBox_mesh_quad ->setVisible (true );
399402 _ui->checkBox_mesh_quad ->setEnabled (true );
@@ -1250,6 +1253,7 @@ bool ExportCloudsDialog::getExportedClouds(
12501253 textureMesh->tex_coordinates .resize (1 );
12511254 if (!_ui->checkBox_mesh_quad ->isEnabled ()) // disabled -> we are exporting to file
12521255 {
1256+ UDEBUG (" " );
12531257 // When saving to file, tex_coordinates should be linked to polygon vertices, not points
12541258 int polygonSize = textureMesh->tex_polygons [0 ][0 ].vertices .size ();
12551259 textureMesh->tex_coordinates [0 ].resize (polygonSize*textureMesh->tex_polygons [0 ].size ());
@@ -1270,6 +1274,7 @@ bool ExportCloudsDialog::getExportedClouds(
12701274 }
12711275 else
12721276 {
1277+ UDEBUG (" " );
12731278 int nPoints = textureMesh->cloud .data .size ()/textureMesh->cloud .point_step ;
12741279 textureMesh->tex_coordinates [0 ].resize (nPoints);
12751280 for (int i=0 ; i<nPoints; ++i)
@@ -1318,12 +1323,14 @@ bool ExportCloudsDialog::getExportedClouds(
13181323 cameraPoses,
13191324 cameraModels,
13201325 images,
1321- dir.filePath (" tmp_textures" ).toStdString ());
1326+ dir.filePath (" tmp_textures" ).toStdString (),
1327+ _ui->spinBox_normalKSearch ->value ());
13221328
1323- if (!_ui->checkBox_binary ->isVisible () && // not visible -> we are not exporting to file
1329+ if (!_ui->checkBox_binary ->isEnabled () && // not enabled -> we are not exporting to file
13241330 textureMesh->tex_coordinates .size () &&
13251331 textureMesh->tex_coordinates [0 ].size ()) // assume first is the texture, second is occluded texture
13261332 {
1333+ UDEBUG (" " );
13271334 // When not saving to file, tex_coordinates should be linked to points, not polygon vertices
13281335 int nPoints = textureMesh->cloud .data .size ()/textureMesh->cloud .point_step ;
13291336#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
@@ -1368,6 +1375,7 @@ bool ExportCloudsDialog::getExportedClouds(
13681375
13691376 if (textureMeshes.size () > 1 && _ui->checkBox_assemble ->isChecked ())
13701377 {
1378+ UDEBUG (" Concatenate texture meshes" );
13711379 _progressDialog->appendText (tr (" Assembling %1 meshes..." ).arg (textureMeshes.size ()));
13721380 QApplication::processEvents ();
13731381 uSleep (100 );
@@ -1379,7 +1387,7 @@ bool ExportCloudsDialog::getExportedClouds(
13791387 }
13801388
13811389 }
1382-
1390+ UDEBUG ( " " );
13831391 return true ;
13841392 }
13851393 return false ;
0 commit comments