ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CSF.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "Cloth.h"
11 #include "wlPointCloud.h"
12 
13 // system
14 #include <string>
15 #include <vector>
16 
18 class QWidget;
19 class ccMesh;
20 
21 class CSF {
22 public:
23  CSF(wl::PointCloud& cloud);
24  virtual ~CSF();
25 
26  // input PC from files
27  bool readPointsFromFile(std::string filename);
28 
29  // save the ground points to file
30  void saveGroundPoints(const std::vector<int>& grp, std::string path = "");
31  void saveOffGroundPoints(const std::vector<int>& grp,
32  std::string path = "");
33 
34  // The main program: Do filtering
35  bool do_filtering(std::vector<int>& groundIndexes,
36  std::vector<int>& offGroundIndexes,
37  bool exportClothMesh,
38  ccMesh*& clothMesh,
39  ecvMainAppInterface* app = 0,
40  QWidget* parent = 0);
41 
42 private:
43  wl::PointCloud& point_cloud;
44 
45 public:
46  struct Parameters {
47  // parameters
49 
51 
52  double time_step;
53 
55 
57 
58  int rigidness;
59 
61  };
62 
64 };
std::string filename
Definition: CSF.h:21
void saveGroundPoints(const std::vector< int > &grp, std::string path="")
Definition: CSF.cpp:211
CSF(wl::PointCloud &cloud)
Definition: CSF.cpp:30
virtual ~CSF()
Definition: CSF.cpp:40
bool do_filtering(std::vector< int > &groundIndexes, std::vector< int > &offGroundIndexes, bool exportClothMesh, ccMesh *&clothMesh, ecvMainAppInterface *app=0, QWidget *parent=0)
Definition: CSF.cpp:73
bool readPointsFromFile(std::string filename)
Definition: CSF.cpp:42
void saveOffGroundPoints(const std::vector< int > &grp, std::string path="")
Definition: CSF.cpp:228
Parameters params
Definition: CSF.h:63
Triangular mesh.
Definition: ecvMesh.h:35
Main application interface (for plugins)
static const std::string path
Definition: PointCloud.cpp:59
double time_step
Definition: CSF.h:52
int iterations
Definition: CSF.h:60
double class_threshold
Definition: CSF.h:54
int k_nearest_points
Definition: CSF.h:48
bool bSloopSmooth
Definition: CSF.h:50
double cloth_resolution
Definition: CSF.h:56
int rigidness
Definition: CSF.h:58