51 : QDialog(parent, Qt::Tool),
Ui::RegistrationDialog() {
52 assert(data && model);
58 QDoubleValidator *rmsValidator =
59 new QDoubleValidator(rmsDifferenceLineEdit);
60 rmsValidator->setNotation(QDoubleValidator::ScientificNotation);
62 rmsDifferenceLineEdit->setValidator(rmsValidator);
69 int idealThreadCount = QThread::idealThreadCount();
70 maxThreadCountSpinBox->setRange(1, idealThreadCount);
71 maxThreadCountSpinBox->setSuffix(QString(
" / %1").arg(idealThreadCount));
85 errorCriterion->setChecked(
true);
87 iterationsCriterion->setChecked(
true);
100 connect(swapButton, &QAbstractButton::clicked,
this,
140 return checkBoxUseDataSFAsWeights->isEnabled() &&
141 checkBoxUseDataSFAsWeights->isChecked();
145 return checkBoxUseModelSFAsWeights->isEnabled() &&
146 checkBoxUseModelSFAsWeights->isChecked();
150 return useC2MSignedDistancesCheckBox->isEnabled() &&
151 useC2MSignedDistancesCheckBox->isChecked();
156 if (normalsComboBox->isEnabled()) {
158 normalsComboBox->currentIndex());
165 return adjustScaleCheckBox->isChecked();
169 return pointsRemoval->isChecked();
173 return randomSamplingLimitSpinBox->value();
177 return static_cast<unsigned>(
std::max(1, maxIterationCount->value()));
181 return static_cast<unsigned>(
std::max(10, overlapSpinBox->value()));
185 return maxThreadCountSpinBox->value();
192 double val = rmsDifferenceLineEdit->text().toDouble(&ok);
196 val = std::numeric_limits<double>::quiet_NaN();
203 if (std::isnan(value)) {
207 rmsDifferenceLineEdit->setText(QString::number(value,
'E', 1));
212 if (errorCriterion->isChecked())
220 switch (rotComboBox->currentIndex()) {
235 if (!TxCheckBox->isChecked())
237 if (!TyCheckBox->isChecked())
239 if (!TzCheckBox->isChecked())
256 checkBoxUseDataSFAsWeights->setEnabled(
258 checkBoxUseModelSFAsWeights->setEnabled(
263 useC2MSignedDistancesCheckBox->setEnabled(
266 normalsComboBox->setEnabled(
virtual void setTempColor(const ecvColor::Rgb &col, bool autoActivate=true)
Sets current temporary (unique)
virtual bool hasDisplayedScalarField() const
Returns whether an active scalar field is available or not.
virtual void setVisible(bool state)
Sets entity visibility.
virtual bool hasNormals() const
Returns whether normals are enabled or not.
virtual void enableTempColor(bool state)
Set temporary color activation state.
Hierarchical CLOUDVIEWER Object.
virtual QString getName() const
Returns object name.
bool isKindOf(CV_CLASS_ENUM type) const
static void SetButtonColor(QAbstractButton *button, const QColor &col)
Sets a button background color.
void saveParameters() const
Saves parameters for next call.
bool useC2MSignedDistances() const
Whether to use signed distances when the reference is a mesh.
bool useModelSFAsWeights() const
Whether to use model displayed SF as weights.
unsigned getFinalOverlap() const
Returns the approximated final overlap.
bool adjustScale() const
Returns whether to adjust the scale during optimization.
unsigned randomSamplingLimit() const
Returns the limit above which clouds should be randomly resampled.
virtual ~ccRegistrationDlg()
Default destructor.
unsigned getMaxIterationCount() const
Returns max number of iterations.
bool useDataSFAsWeights() const
Whether to use data displayed SF as weights.
ccHObject * modelEntity
'Model' entity
static double GetAbsoluteMinRMSDecrease()
ccHObject * getModelEntity()
Returns 'model' entity.
ccHObject * getDataEntity()
Returns 'data' entity.
double getMinRMSDecrease() const
Returns minimum RMS decrease between two consecutive iterations.
cloudViewer::ICPRegistrationTools::NORMALS_MATCHING normalsMatchingOption() const
Method to take normals into account.
int getMaxThreadCount() const
Returns the maximum number of threads.
ccRegistrationDlg(ccHObject *data, ccHObject *model, QWidget *parent=nullptr)
Default constructor.
void setMinRMSDecrease(double value)
Sets the minimum RMS decrease between two consecutive iterations.
bool removeFarthestPoints() const
Returns whether farthest points should be ignored at each iteration.
ccHObject * dataEntity
'Data' entity
ConvergenceMethod getConvergenceMethod() const
Returns convergence method.
int getTransformationFilters() const
Returns active transformation filters.
static int s_rotComboIndex
static int s_maxIterationCount
static bool s_useDataSFAsWeights
static int s_finalOverlap
static int s_normalsMatchingOption
static int s_maxThreadCount
static bool s_adjustScale
static bool s_useModelSFAsWeights
static bool s_useErrorDifferenceCriterion
static bool s_useC2MSignedDistances
static unsigned s_randomSamplingLimit
static bool s_transCheckboxes[3]
static double s_rmsDifference
static bool s_pointsRemoval
constexpr Rgb red(MAX, 0, 0)
constexpr Rgb yellow(MAX, MAX, 0)
void swap(cloudViewer::core::SmallVectorImpl< T > &LHS, cloudViewer::core::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.