diff --git a/Application/Client/LidarViewMainWindow.ui b/Application/Client/LidarViewMainWindow.ui
index 3d521208c40a546e9de2767eeb85590c952837c5..86a8404521ec5bdaa1c26efece25eae6ad111dd0 100644
--- a/Application/Client/LidarViewMainWindow.ui
+++ b/Application/Client/LidarViewMainWindow.ui
@@ -84,7 +84,6 @@
-
@@ -153,7 +152,6 @@
-
@@ -692,15 +690,6 @@
Geolocation in absolute coordinates
-
-
-
- :/lvResources/Icons/crop.png:/lvResources/Icons/crop.png
-
-
- Crop Returns...
-
-
true
diff --git a/Application/Qt/ApplicationComponents/lqPythonQtLidarView.h b/Application/Qt/ApplicationComponents/lqPythonQtLidarView.h
index 2881d2010dbd328325508a8adffd79f75ef6d031..108c2c0e1d9373348733c1d45045c7a12ff4e823 100644
--- a/Application/Qt/ApplicationComponents/lqPythonQtLidarView.h
+++ b/Application/Qt/ApplicationComponents/lqPythonQtLidarView.h
@@ -35,7 +35,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include
#include
-#include "lqCropReturnsDialog.h"
#include "lqLidarViewManager.h"
#include "lvApplicationComponentsModule.h"
@@ -50,20 +49,12 @@ public:
: QObject(parent)
{
this->registerClassForPythonQt(&lqLidarViewManager::staticMetaObject);
-
- this->registerClassForPythonQt(&lqCropReturnsDialog::staticMetaObject);
}
inline void registerClassForPythonQt(const QMetaObject* metaobject)
{
PythonQt::self()->registerClass(metaobject, "paraview");
}
-
-public Q_SLOTS:
- lqCropReturnsDialog* new_lqCropReturnsDialog(QWidget* arg0)
- {
- return new lqCropReturnsDialog(arg0);
- }
};
#endif // lqPythonQtLidarView_h
diff --git a/Application/Qt/Components/CMakeLists.txt b/Application/Qt/Components/CMakeLists.txt
index 8c0f80af4b9254c20d19ca3b77f9e455ae461153..8cf331e5c63ee178863d0a32af8911885d42453a 100644
--- a/Application/Qt/Components/CMakeLists.txt
+++ b/Application/Qt/Components/CMakeLists.txt
@@ -1,7 +1,6 @@
set(classes
lqAboutDialog
lqCalibrationDialog
- lqCropReturnsDialog
)
set(headers
@@ -11,7 +10,6 @@ set(headers
set(ui_files
Resources/UI/lqAboutDialog.ui
Resources/UI/lqCalibrationDialog.ui
- Resources/UI/lqCropReturnsDialog.ui
)
set(resource_files
diff --git a/Application/Qt/Components/Resources/UI/lqCropReturnsDialog.ui b/Application/Qt/Components/Resources/UI/lqCropReturnsDialog.ui
deleted file mode 100644
index d25cd1bb91de8b12be16500d1241ae9ba1b345fd..0000000000000000000000000000000000000000
--- a/Application/Qt/Components/Resources/UI/lqCropReturnsDialog.ui
+++ /dev/null
@@ -1,239 +0,0 @@
-
-
- lqCropReturnsDialog
-
-
-
- 0
- 0
- 632
- 349
-
-
-
- Crop Returns
-
-
- -
-
-
- Enable Cropping of Returns
-
-
- true
-
-
- false
-
-
-
- QFormLayout::AllNonFixedFieldsGrow
-
-
-
-
-
- Keep only the points that lay inside the volume defined below.
-
-
-
- -
-
-
- Coordinates mode selection:
-
-
-
-
-
-
- spherical
-
-
-
- -
-
-
- cartesian
-
-
-
-
-
-
- -
-
-
-
-
-
- X
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- -300.000000000000000
-
-
- 300.000000000000000
-
-
-
- -
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- -300.000000000000000
-
-
- 300.000000000000000
-
-
-
-
-
- -
-
-
-
-
-
- Y
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- -300.000000000000000
-
-
- 300.000000000000000
-
-
-
- -
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- -300.000000000000000
-
-
- 300.000000000000000
-
-
-
-
-
- -
-
-
-
-
-
- Z
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- -300.000000000000000
-
-
- 300.000000000000000
-
-
-
- -
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- -300.000000000000000
-
-
- 300.000000000000000
-
-
-
-
-
- -
-
-
- Inverse Cropping : Keep only the points that lay outside the volume defined above.
-
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QDialogButtonBox::NoButton
-
-
-
-
-
-
-
-
- buttonBox
- accepted()
- lqCropReturnsDialog
- accept()
-
-
- 248
- 254
-
-
- 157
- 274
-
-
-
-
- buttonBox
- rejected()
- lqCropReturnsDialog
- reject()
-
-
- 316
- 260
-
-
- 286
- 274
-
-
-
-
-
diff --git a/Application/Qt/Components/lqCropReturnsDialog.cxx b/Application/Qt/Components/lqCropReturnsDialog.cxx
deleted file mode 100644
index fe7ec17299e360fa30cf66c00985b3c57022bf8a..0000000000000000000000000000000000000000
--- a/Application/Qt/Components/lqCropReturnsDialog.cxx
+++ /dev/null
@@ -1,467 +0,0 @@
-// Copyright 2014 Velodyne Acoustics, Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-#include "lqCropReturnsDialog.h"
-
-#include "ui_lqCropReturnsDialog.h"
-
-#include //vtkNotUsed
-
-#include
-#include
-
-#include
-#include
-#include
-
-#include
-
-//-----------------------------------------------------------------------------
-class lqCropReturnsDialog::pqInternal : public Ui::lqCropReturnsDialog
-{
-public:
- pqInternal(QDialog* external)
- : Settings(pqApplicationCore::instance()->settings())
- {
- this->External = external;
- this->setupUi(external);
-
- this->CancelButton = new QPushButton("Cancel");
- this->CancelButton->setIcon(external->style()->standardIcon(QStyle::SP_DialogCancelButton));
-
- this->ApplyButton = new QPushButton("Apply");
- this->ApplyButton->setIcon(external->style()->standardIcon(QStyle::SP_DialogOkButton));
- this->ApplyButton->setAutoDefault(true);
- this->ApplyButton->setDefault(true);
-
- this->ApplyAndSaveButton = new QPushButton("Apply and save for future sessions");
- this->ApplyAndSaveButton->setIcon(external->style()->standardIcon(QStyle::SP_DialogSaveButton));
-
- this->buttonBox->addButton(this->CancelButton, QDialogButtonBox::ActionRole);
- this->buttonBox->addButton(this->ApplyButton, QDialogButtonBox::ActionRole);
- this->buttonBox->addButton(this->ApplyAndSaveButton, QDialogButtonBox::ActionRole);
- }
-
- void saveSettings();
- void restoreSettings();
- void SetSphericalSettings();
- void SetCartesianSettings();
- void ActivateSpinBox();
- void DesactivateSpinBox();
- void GetCropRegion(double output[6]);
- void updateRangeValues();
-
- QDialog* External;
-
- QPushButton* CancelButton;
- QPushButton* ApplyButton;
- QPushButton* ApplyAndSaveButton;
-
- double xRange[2];
- double yRange[2];
- double zRange[2];
-
- pqSettings* const Settings;
-};
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::pqInternal::saveSettings()
-{
- this->Settings->setValue(
- "LidarPlugin/CropReturnsDialog/EnableCropping", this->CropGroupBox->isChecked());
-
- this->Settings->setValue(
- "LidarPlugin/CropReturnsDialog/CropOutside", this->CropOutsideCheckBox->isChecked());
-
- this->Settings->setValue(
- "LidarPlugin/CropReturnsDialog/cartesianRadioButton", this->cartesianRadioButton->isChecked());
- this->Settings->setValue(
- "LidarPlugin/CropReturnsDialog/sphericalRadioButton", this->sphericalRadioButton->isChecked());
-
- this->Settings->setValue("LidarPlugin/CropReturnsDialog/FirstCornerX", xRange[0]);
- this->Settings->setValue("LidarPlugin/CropReturnsDialog/FirstCornerY", yRange[0]);
- this->Settings->setValue("LidarPlugin/CropReturnsDialog/FirstCornerZ", zRange[0]);
- this->Settings->setValue("LidarPlugin/CropReturnsDialog/SecondCornerX", xRange[1]);
- this->Settings->setValue("LidarPlugin/CropReturnsDialog/SecondCornerY", yRange[1]);
- this->Settings->setValue("LidarPlugin/CropReturnsDialog/SecondCornerZ", zRange[1]);
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::pqInternal::restoreSettings()
-{
- this->sphericalRadioButton->setChecked(
- this->Settings->value("LidarPlugin/CropReturnsDialog/sphericalRadioButton", true).toBool());
- this->cartesianRadioButton->setChecked(
- this->Settings->value("LidarPlugin/CropReturnsDialog/cartesianRadioButton", false).toBool());
-
- if (this->cartesianRadioButton->isChecked())
- {
- this->SetCartesianSettings();
- }
-
- if (this->sphericalRadioButton->isChecked())
- {
- this->SetSphericalSettings();
- }
-
- this->CropGroupBox->setChecked(
- this->Settings->value("LidarPlugin/CropReturnsDialog/EnableCropping", false).toBool());
-
- this->CropOutsideCheckBox->setChecked(
- this->Settings->value("LidarPlugin/CropReturnsDialog/CropOutside", true).toBool());
-
- this->X1SpinBox->setValue(
- this->Settings->value("LidarPlugin/CropReturnsDialog/FirstCornerX", this->X1SpinBox->value())
- .toDouble());
- this->Y1SpinBox->setValue(
- this->Settings->value("LidarPlugin/CropReturnsDialog/FirstCornerY", this->Y1SpinBox->value())
- .toDouble());
- this->Z1SpinBox->setValue(
- this->Settings->value("LidarPlugin/CropReturnsDialog/FirstCornerZ", this->Z1SpinBox->value())
- .toDouble());
- this->X2SpinBox->setValue(
- this->Settings->value("LidarPlugin/CropReturnsDialog/SecondCornerX", this->X2SpinBox->value())
- .toDouble());
- this->Y2SpinBox->setValue(
- this->Settings->value("LidarPlugin/CropReturnsDialog/SecondCornerY", this->Y2SpinBox->value())
- .toDouble());
- this->Z2SpinBox->setValue(
- this->Settings->value("LidarPlugin/CropReturnsDialog/SecondCornerZ", this->Z2SpinBox->value())
- .toDouble());
-
- xRange[0] = this->X1SpinBox->value();
- xRange[1] = this->X2SpinBox->value();
- yRange[0] = this->Y1SpinBox->value();
- yRange[1] = this->Y2SpinBox->value();
- zRange[0] = this->Z1SpinBox->value();
- zRange[1] = this->Z2SpinBox->value();
-
- this->X1SpinBox->setValue(xRange[0]);
- this->X2SpinBox->setValue(xRange[1]);
- this->Y1SpinBox->setValue(yRange[0]);
- this->Y2SpinBox->setValue(yRange[1]);
- this->Z1SpinBox->setValue(zRange[0]);
- this->Z2SpinBox->setValue(zRange[1]);
-}
-
-//-----------------------------------------------------------------------------
-lqCropReturnsDialog::lqCropReturnsDialog(QWidget* p)
- : QDialog(p)
- , Internal(new pqInternal(this))
-{
- connect(
- this->Internal->X1SpinBox, SIGNAL(valueChanged(double)), this, SLOT(onSpinBoxChanged(double)));
- connect(
- this->Internal->X2SpinBox, SIGNAL(valueChanged(double)), this, SLOT(onSpinBoxChanged(double)));
- connect(
- this->Internal->Y1SpinBox, SIGNAL(valueChanged(double)), this, SLOT(onSpinBoxChanged(double)));
- connect(
- this->Internal->Y2SpinBox, SIGNAL(valueChanged(double)), this, SLOT(onSpinBoxChanged(double)));
- connect(
- this->Internal->Z1SpinBox, SIGNAL(valueChanged(double)), this, SLOT(onSpinBoxChanged(double)));
- connect(
- this->Internal->Z2SpinBox, SIGNAL(valueChanged(double)), this, SLOT(onSpinBoxChanged(double)));
- connect(
- this->Internal->cartesianRadioButton, SIGNAL(clicked()), this, SLOT(onCartesianToggled()));
- connect(
- this->Internal->sphericalRadioButton, SIGNAL(clicked()), this, SLOT(onSphericalToggled()));
- connect(this->Internal->CropGroupBox, SIGNAL(clicked()), this, SLOT(onCropGroupBoxToggled()));
-
- connect(this->Internal->CancelButton, SIGNAL(clicked()), this, SLOT(reject()));
- connect(this->Internal->ApplyButton, SIGNAL(clicked()), this, SLOT(apply()));
- connect(this->Internal->ApplyAndSaveButton, SIGNAL(clicked()), this, SLOT(applyAndSave()));
-
- this->Internal->restoreSettings();
-}
-
-//-----------------------------------------------------------------------------
-lqCropReturnsDialog::~lqCropReturnsDialog() {}
-
-//-----------------------------------------------------------------------------
-bool lqCropReturnsDialog::croppingEnabled() const
-{
- return this->Internal->CropGroupBox->isChecked();
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::setCroppingEnabled(bool checked)
-{
- this->Internal->CropGroupBox->setChecked(checked);
-}
-
-//-----------------------------------------------------------------------------
-bool lqCropReturnsDialog::cropOutside() const
-{
- return this->Internal->CropOutsideCheckBox->isChecked();
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::setCropOutside(bool checked)
-{
- this->Internal->CropOutsideCheckBox->setChecked(checked);
-}
-
-//-----------------------------------------------------------------------------
-QVector3D lqCropReturnsDialog::firstCorner() const
-{
- double cropRegion[6];
- this->Internal->GetCropRegion(cropRegion);
-
- if (this->Internal->sphericalRadioButton->isChecked())
- {
- return QVector3D(cropRegion[0], cropRegion[2], qMin(cropRegion[4], cropRegion[5]));
- }
- else
- {
- return QVector3D(qMin(cropRegion[0], cropRegion[1]),
- qMin(cropRegion[2], cropRegion[3]),
- qMin(cropRegion[4], cropRegion[5]));
- }
-}
-
-//-----------------------------------------------------------------------------
-QVector3D lqCropReturnsDialog::secondCorner() const
-{
- double cropRegion[6];
- this->Internal->GetCropRegion(cropRegion);
-
- if (this->Internal->sphericalRadioButton->isChecked())
- {
- return QVector3D(cropRegion[1], cropRegion[3], qMax(cropRegion[4], cropRegion[5]));
- }
- else
- {
- return QVector3D(qMax(cropRegion[0], cropRegion[1]),
- qMax(cropRegion[2], cropRegion[3]),
- qMax(cropRegion[4], cropRegion[5]));
- }
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::setFirstCorner(QVector3D corner)
-{
- pqInternal* const d = this->Internal.data();
- d->X1SpinBox->setValue(corner.x());
- d->Y1SpinBox->setValue(corner.y());
- d->Z1SpinBox->setValue(corner.z());
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::setSecondCorner(QVector3D corner)
-{
- pqInternal* const d = this->Internal.data();
- d->X2SpinBox->setValue(corner.x());
- d->Y2SpinBox->setValue(corner.y());
- d->Z2SpinBox->setValue(corner.z());
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::apply()
-{
- QDialog::accept();
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::applyAndSave()
-{
- this->Internal->saveSettings();
- QDialog::accept();
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::onCartesianToggled()
-{
- this->Internal->SetCartesianSettings();
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::onSphericalToggled()
-{
- this->Internal->SetSphericalSettings();
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::pqInternal::SetSphericalSettings()
-{
- this->ActivateSpinBox();
- // change the labels
- // list of unicode symbol : http://sites.psu.edu/symbolcodes/languages/ancient/greek/greekchart/
- this->XLabel->setText("Rotational angle");
- this->YLabel->setText("Vertical angle");
- this->ZLabel->setText("Distance");
-
- // Here we take the spherical coordinates used in mathematics (and not physic)
- // (r,theta,phi)
- double minR = 0, maxR = 300;
- double minTheta = -360, maxTheta = 360; // Rotational Angle
- double minPhi = -90, maxPhi = 90; // Vertical Angle
- // theta is between [minTheta,maxTheta] - Rotational Angle
- this->X1SpinBox->setMinimum(minTheta);
- this->X2SpinBox->setMinimum(minTheta);
- this->X1SpinBox->setMaximum(maxTheta);
- this->X2SpinBox->setMaximum(maxTheta);
- this->X1SpinBox->setValue(0);
- this->X2SpinBox->setValue(360.0);
- // phi is between [minPhi,maxPhi] - Vertical Angle
- this->Y1SpinBox->setMinimum(minPhi);
- this->Y2SpinBox->setMinimum(minPhi);
- this->Y1SpinBox->setMaximum(maxPhi);
- this->Y2SpinBox->setMaximum(maxPhi);
- this->Y1SpinBox->setValue(-90.0);
- this->Y2SpinBox->setValue(90.0);
- // R is positive
- this->Z1SpinBox->setMinimum(minR);
- this->Z2SpinBox->setMinimum(minR);
- this->Z1SpinBox->setMaximum(maxR);
- this->Z2SpinBox->setMaximum(maxR);
- this->Z1SpinBox->setValue(0.0);
- this->Z2SpinBox->setValue(10.0);
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::pqInternal::SetCartesianSettings()
-{
- double maxV = 300;
- double minV = -maxV;
- this->ActivateSpinBox();
- // change the labels
- this->XLabel->setText("X");
- this->YLabel->setText("Y");
- this->ZLabel->setText("Z");
- // change the bounds
- // X [-10000,10000]
- this->X1SpinBox->setMinimum(minV);
- this->X2SpinBox->setMinimum(minV);
- this->X1SpinBox->setMaximum(maxV);
- this->X2SpinBox->setMaximum(maxV);
- this->X1SpinBox->setValue(-5.0);
- this->X2SpinBox->setValue(5.0);
- // Y [-10000,10000]
- this->Y1SpinBox->setMinimum(minV);
- this->Y2SpinBox->setMinimum(minV);
- this->Y1SpinBox->setMaximum(maxV);
- this->Y2SpinBox->setMaximum(maxV);
- this->Y1SpinBox->setValue(-5.0);
- this->Y2SpinBox->setValue(5.0);
- // Z [-10000,10000]
- this->Z1SpinBox->setMinimum(minV);
- this->Z2SpinBox->setMinimum(minV);
- this->Z1SpinBox->setMaximum(maxV);
- this->Z2SpinBox->setMaximum(maxV);
- this->Z1SpinBox->setValue(-5.0);
- this->Z2SpinBox->setValue(5.0);
-}
-
-//-----------------------------------------------------------------------------
-int lqCropReturnsDialog::GetCropMode() const
-{
- if (!this->Internal->CropGroupBox->isChecked())
- {
- return 0; // i.e. None
- }
- else if (this->Internal->cartesianRadioButton->isChecked())
- {
- return 1;
- }
- else if (this->Internal->sphericalRadioButton->isChecked())
- {
- return 2;
- }
- else
- {
- return 0;
- }
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::pqInternal::ActivateSpinBox()
-{
- this->XLabel->setDisabled(false);
- this->YLabel->setDisabled(false);
- this->ZLabel->setDisabled(false);
-
- this->X1SpinBox->setDisabled(false);
- this->X2SpinBox->setDisabled(false);
-
- this->Y1SpinBox->setDisabled(false);
- this->Y2SpinBox->setDisabled(false);
-
- this->Z1SpinBox->setDisabled(false);
- this->Z2SpinBox->setDisabled(false);
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::pqInternal::GetCropRegion(double output[6])
-{
- output[0] = this->X1SpinBox->value();
- output[1] = this->X2SpinBox->value();
-
- output[2] = this->Y1SpinBox->value();
- output[3] = this->Y2SpinBox->value();
-
- output[4] = this->Z1SpinBox->value();
- output[5] = this->Z2SpinBox->value();
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::pqInternal::DesactivateSpinBox()
-{
- this->XLabel->setDisabled(true);
- this->YLabel->setDisabled(true);
- this->ZLabel->setDisabled(true);
-
- this->X1SpinBox->setDisabled(true);
- this->X2SpinBox->setDisabled(true);
-
- this->Y1SpinBox->setDisabled(true);
- this->Y2SpinBox->setDisabled(true);
-
- this->Z1SpinBox->setDisabled(true);
- this->Z2SpinBox->setDisabled(true);
-}
-
-void lqCropReturnsDialog::pqInternal::updateRangeValues()
-{
- this->xRange[0] = this->X1SpinBox->value();
- this->xRange[1] = this->X2SpinBox->value();
- this->yRange[0] = this->Y1SpinBox->value();
- this->yRange[1] = this->Y2SpinBox->value();
- this->zRange[0] = this->Z1SpinBox->value();
- this->zRange[1] = this->Z2SpinBox->value();
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::onSpinBoxChanged(double vtkNotUsed(value))
-{
- this->Internal->updateRangeValues();
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::onCropGroupBoxToggled()
-{
- this->Internal->X1SpinBox->setDisabled(!this->Internal->CropGroupBox->isChecked());
- this->Internal->X2SpinBox->setDisabled(!this->Internal->CropGroupBox->isChecked());
- this->Internal->Y1SpinBox->setDisabled(!this->Internal->CropGroupBox->isChecked());
- this->Internal->Y2SpinBox->setDisabled(!this->Internal->CropGroupBox->isChecked());
- this->Internal->Z1SpinBox->setDisabled(!this->Internal->CropGroupBox->isChecked());
- this->Internal->Z2SpinBox->setDisabled(!this->Internal->CropGroupBox->isChecked());
- this->Internal->cartesianRadioButton->setDisabled(!this->Internal->CropGroupBox->isChecked());
- this->Internal->sphericalRadioButton->setDisabled(!this->Internal->CropGroupBox->isChecked());
- this->Internal->CropOutsideCheckBox->setDisabled(!this->Internal->CropGroupBox->isChecked());
-}
-
-//-----------------------------------------------------------------------------
-void lqCropReturnsDialog::UpdateDialogWithCurrentSetting()
-{
- this->onCropGroupBoxToggled();
-}
diff --git a/Application/Qt/Components/lqCropReturnsDialog.h b/Application/Qt/Components/lqCropReturnsDialog.h
deleted file mode 100644
index ac75dbed0a6814f0d0ac63b39e74cfae267c5ed9..0000000000000000000000000000000000000000
--- a/Application/Qt/Components/lqCropReturnsDialog.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 Velodyne Acoustics, Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-#ifndef lqCropReturnsDialog_h
-#define lqCropReturnsDialog_h
-
-#include "lvComponentsModule.h"
-
-#include
-#include
-
-class LVCOMPONENTS_EXPORT lqCropReturnsDialog : public QDialog
-{
- Q_OBJECT
- Q_PROPERTY(bool croppingEnabled READ croppingEnabled WRITE setCroppingEnabled)
- Q_PROPERTY(bool cropOutside READ cropOutside WRITE setCropOutside)
- Q_PROPERTY(QVector3D firstCorner READ firstCorner WRITE setFirstCorner)
- Q_PROPERTY(QVector3D secondCorner READ secondCorner WRITE setSecondCorner)
-
-public:
- lqCropReturnsDialog(QWidget* p = 0);
- virtual ~lqCropReturnsDialog();
-
- bool croppingEnabled() const;
- bool cropOutside() const;
-
- void setCroppingEnabled(bool);
- void setCropOutside(bool);
-
- QVector3D firstCorner() const;
- QVector3D secondCorner() const;
-
- void setFirstCorner(QVector3D);
- void setSecondCorner(QVector3D);
-
- Q_INVOKABLE void UpdateDialogWithCurrentSetting();
-
- Q_INVOKABLE int GetCropMode() const;
-
-public Q_SLOTS:
- virtual void apply();
- virtual void applyAndSave();
- void onCartesianToggled();
- void onSphericalToggled();
- void onCropGroupBoxToggled();
- void onSpinBoxChanged(double value);
-
-private:
- class pqInternal;
- QScopedPointer Internal;
-
- Q_DISABLE_COPY(lqCropReturnsDialog)
-};
-
-#endif
diff --git a/Application/Wrapping/Python/applogic.py b/Application/Wrapping/Python/applogic.py
index 1c9386cc0545737f98be044e2ced9733d447833e..4613b5f6fbc69d077cc9487e110d689bc01870ee 100644
--- a/Application/Wrapping/Python/applogic.py
+++ b/Application/Wrapping/Python/applogic.py
@@ -25,8 +25,6 @@ import lidarview.gridAdjustmentDialog
import lidarview.planefit as planefit
import lidarview.simple as lvsmp
-from PythonQt.paraview import lqCropReturnsDialog
-
# import the vtk wrapping of the Lidar Plugin
# this enable to get the specific vtkObject behind a proxy via GetClientSideObject()
# without this plugin, GetClientSideObject(), would return the first mother class known by paraview
@@ -72,8 +70,6 @@ def UpdateApplogicCommon(lidar):
# WIP ACTUALLY THINK ABOUT always enabled ok, just apply settings on current lidar actually needed
# Overall on what buttons are on-off when there is data or not
- onCropReturns(False) # Dont show the dialog just restore settings
-
# Reset Scene Time # WIP TIME CONTROLLER API ?
smp.GetActiveView().ViewTime = 0.0
@@ -130,8 +126,7 @@ def onClose():
# Generic Helpers
def _setSaveActionsEnabled(enabled):
- for action in ('Close', 'CropReturns'):
- app.actions['action'+action].setEnabled(enabled)
+ app.actions['actionClose'].setEnabled(enabled)
getMainWindow().findChild('QMenu', 'menuSaveAs').enabled = enabled
@@ -168,59 +163,6 @@ def getPosOrSource(index = -1):
def getLidar(index = -1): # WIP TODO
return getReader(index) or getSensor(index)
-def getLidarPacketInterpreter(): # WIP Used in places where explicit lidar / current lidar is mixed
- lidar = getLidar()
- if lidar:
- return lidar.Interpreter
- return None
-
-def getPosition():
- return getattr(app, 'position', None)
-
-def onCropReturns(show = True):
- dialog = lqCropReturnsDialog(getMainWindow())
-
- cropEnabled = False
- cropOutside = False
- firstCorner = QtGui.QVector3D()
- secondCorner = QtGui.QVector3D()
-
- lidarInterpreter = getLidarPacketInterpreter()
-
- # Retrieve current values to fill the UI
- if lidarInterpreter:
- cropEnabled = lidarInterpreter.CropMode != 'None'
- cropOutside = lidarInterpreter.CropOutside
- firstCorner = QtGui.QVector3D(lidarInterpreter.CropRegion[0], lidarInterpreter.CropRegion[2], lidarInterpreter.CropRegion[4])
- secondCorner = QtGui.QVector3D(lidarInterpreter.CropRegion[1], lidarInterpreter.CropRegion[3], lidarInterpreter.CropRegion[5])
-
- #show the dialog box
- if show:
- dialog.cropOutside = cropOutside
- dialog.firstCorner = firstCorner
- dialog.secondCorner = secondCorner
- dialog.croppingEnabled = cropEnabled
- # Enforce the call to dialog.croppingEnabled."onChanged" even if dialog.croppingEnabled == cropEnabled
- dialog.croppingEnabled = not dialog.croppingEnabled
- dialog.croppingEnabled = not dialog.croppingEnabled
-
- # update the dialog configuration
- dialog.UpdateDialogWithCurrentSetting()
-
- if not dialog.exec_():
- return
-
- if lidarInterpreter:
- lidarInterpreter.CropOutside = dialog.cropOutside
- dialogCropMode = ['None', 'Cartesian', 'Spherical']
- lidarInterpreter.CropMode = dialogCropMode[dialog.GetCropMode()]
- p1 = dialog.firstCorner
- p2 = dialog.secondCorner
- lidarInterpreter.CropRegion = [p1.x(), p2.x(), p1.y(), p2.y(), p1.z(), p2.z()]
- if show:
- smp.Render()
-
-
def getSpreadSheetViewProxy(): #WIP this is probably unreliable
return smp.servermanager.ProxyManager().GetProxy("views", "main spreadsheet view")
@@ -432,7 +374,6 @@ def setupActions():
app.actions['actionPlaneFit'].connect('triggered()', planeFit)
app.actions['actionClose'].connect('triggered()', onClose)
app.actions['actionGrid_Properties'].connect('triggered()', onGridProperties)
- app.actions['actionCropReturns'].connect('triggered()', onCropReturns)
app.actions['actionShowPosition'].connect('triggered()', ShowPosition)
# Restore action states from settings
diff --git a/LVCore b/LVCore
index 292c7f6ca10d1f09182a4165cded1276fc574bad..c775e8171bb32dc8510c23c6cb98d0e1b53d87b3 160000
--- a/LVCore
+++ b/LVCore
@@ -1 +1 @@
-Subproject commit 292c7f6ca10d1f09182a4165cded1276fc574bad
+Subproject commit c775e8171bb32dc8510c23c6cb98d0e1b53d87b3
diff --git a/Plugins/VelodynePlugin b/Plugins/VelodynePlugin
index b396af9e91d337d7b36666442a56e738f5162f59..dcc99c95c30a36e522e8301dc1dc0a8b988f23bc 160000
--- a/Plugins/VelodynePlugin
+++ b/Plugins/VelodynePlugin
@@ -1 +1 @@
-Subproject commit b396af9e91d337d7b36666442a56e738f5162f59
+Subproject commit dcc99c95c30a36e522e8301dc1dc0a8b988f23bc