mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-18 02:24:38 +00:00
qualitymapperdialog.cpp \ util.cpp:
- updated updateXQualityLabel and relative2QualityValf methods - added call to updateXQualityLabel at xSpinbox value change
This commit is contained in:
parent
57192facc9
commit
29a27053cd
@ -1094,6 +1094,8 @@ void QualityMapperDialog::on_xSpinBox_valueChanged(double newX)
|
||||
this->manageBorderTfHandles(_currentTfHandle);
|
||||
//restoring the correct order for TfHandles (they're drawn in the same order as they're stored)
|
||||
this->updateTfHandlesOrder(_currentTfHandle->getChannel());
|
||||
//updating x-quality Label
|
||||
this->updateXQualityLabel(_currentTfHandle->getRelativeX());
|
||||
//refresh of TF
|
||||
this->drawTransferFunction();
|
||||
}
|
||||
@ -1255,7 +1257,7 @@ void QualityMapperDialog::on_TF_view_doubleClicked(QPointF pos)
|
||||
|
||||
void QualityMapperDialog::updateXQualityLabel(float xPos)
|
||||
{
|
||||
float exp = log10(0.5f) / log10((float)_equalizerMidHandlePercentilePosition);
|
||||
float exp = log10((float)_equalizerMidHandlePercentilePosition) / log10(0.5f);
|
||||
_currentTfHandleQualityValue.setNum(relative2QualityValf(xPos, ui.minSpinBox->value(), ui.maxSpinBox->value(), exp));
|
||||
ui.xQualityLabel->setText(_currentTfHandleQualityValue);
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ int absolute2RelativeVali(float absolute_val, float max_val)
|
||||
float relative2QualityValf(float relative_val, float min_q, float max_q, float exp)
|
||||
{
|
||||
assert( (relative_val>=-1.0f) && (relative_val<=2.0f) );
|
||||
assert( (exp>=0) && (exp<=1) );
|
||||
// assert( (exp>=0) && (exp<=1) );
|
||||
assert(min_q<=max_q);
|
||||
relative_val = pow( relative_val, exp );
|
||||
return ( relative_val * (max_q - min_q) ) + min_q;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user