mirror of
https://gitlab.ethz.ch/gfattori/glocalize.git
synced 2026-08-06 18:22:35 +02:00
refactoring
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include <vtkImageData.h>
|
||||
#include <vtkMarchingCubes.h>
|
||||
#include <vtkNew.h>
|
||||
#include <vtkPointData.h>
|
||||
#include <vtkPointDataToCellData.h>
|
||||
#include <vtkPoints.h>
|
||||
#include <vtkPolyData.h>
|
||||
#include <vtkPolyDataConnectivityFilter.h>
|
||||
@@ -30,7 +32,7 @@ struct Surf
|
||||
Point3d centroid;
|
||||
};
|
||||
|
||||
static Point3d centroidFromPoints(const vtkPoints* pts)
|
||||
static Point3d centroidFromPoints(vtkPoints* pts)
|
||||
{
|
||||
Point3d c;
|
||||
if (!pts) return c;
|
||||
@@ -41,6 +43,7 @@ static Point3d centroidFromPoints(const vtkPoints* pts)
|
||||
double p[3];
|
||||
for (vtkIdType i = 0; i < n; ++i)
|
||||
{
|
||||
// vtkPoints::GetPoint is non-const in VTK 9.x, so keep pts non-const here.
|
||||
pts->GetPoint(i, p);
|
||||
sx += p[0];
|
||||
sy += p[1];
|
||||
|
||||
@@ -34,6 +34,16 @@
|
||||
|
||||
#include <vtkSmartVolumeMapper.h>
|
||||
|
||||
// Types used as members / inlined code below
|
||||
#include <vtkCamera.h>
|
||||
#include <vtkColorTransferFunction.h>
|
||||
#include <vtkFieldData.h>
|
||||
#include <vtkPiecewiseFunction.h>
|
||||
#include <vtkPointData.h>
|
||||
#include <vtkStringArray.h>
|
||||
#include <vtkTextProperty.h>
|
||||
#include <vtkVolumeProperty.h>
|
||||
|
||||
|
||||
#include <vtkPolyDataMapper.h>
|
||||
#include <vtkActor.h>
|
||||
|
||||
@@ -1091,6 +1091,7 @@ void MainWindow::onLocalizationError(const QString& message)
|
||||
{
|
||||
qWarning() << "Localization error:" << message;
|
||||
// Re-enable UI bits if needed
|
||||
Ui->pb_localize->setEnabled(true);
|
||||
Ui->pb_localize_abort->setEnabled(false);
|
||||
// UI uses generic button names from the legacy .ui
|
||||
Ui->pushButton_3->setEnabled(true); // "Localize" / start
|
||||
Ui->pushButton_4->setEnabled(false); // abort
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user