mirror of
https://gitlab.univ-nantes.fr/E164955Z/ptrans.git
synced 2026-08-29 15:50:28 +08:00
scalar color
This commit is contained in:
@@ -342,9 +342,12 @@ void ColorimetricSegmenter::filterScalar()
|
||||
scalarDlg = new ScalarDialog(m_pickingHub,(QWidget*)m_app->getMainWindow());
|
||||
scalarDlg->show();
|
||||
|
||||
if (!scalarDlg->exec())
|
||||
return;
|
||||
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
|
||||
double marginError = static_cast<double>(rgbDlg->margin->value()) / 100.0;
|
||||
double marginError = static_cast<double>(scalarDlg->margin->value()) / 100.0;
|
||||
ScalarType first = scalarDlg->first->value() - (marginError * scalarDlg->first ->value());
|
||||
ScalarType second = scalarDlg->second->value() - (marginError * scalarDlg->second ->value());
|
||||
|
||||
|
||||
+2
-2
@@ -128,7 +128,7 @@ void ScalarDialog::onItemPicked(const PickedItem& pi)
|
||||
|
||||
if (pi.entity->isKindOf(CC_TYPES::POINT_CLOUD))
|
||||
{
|
||||
if (static_cast<ccGenericPointCloud*>(pi.entity)->hasColors()) {
|
||||
if (static_cast<ccGenericPointCloud*>(pi.entity)->hasScalarFields()) {
|
||||
//Get RGB values of the picked point
|
||||
ccGenericPointCloud* cloud = static_cast<ccGenericPointCloud*>(pi.entity);
|
||||
const ScalarType scalarValue = cloud->getPointScalarValue(pi.itemIndex);
|
||||
@@ -148,7 +148,7 @@ void ScalarDialog::onItemPicked(const PickedItem& pi)
|
||||
}
|
||||
}
|
||||
else {
|
||||
ccLog::Print("The point cloud is not with RGB values.");
|
||||
ccLog::Print("The point cloud hasn't any scalar field.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -111,7 +111,7 @@
|
||||
<string notr="true">(0-1) : </string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
@@ -201,7 +201,7 @@
|
||||
<string notr="true">(0-1) : </string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
|
||||
Reference in New Issue
Block a user