Go to the documentation of this file.
14 #ifndef _SCL_SECURE_NO_WARNINGS
15 #define _SCL_SECURE_NO_WARNINGS
21 #include <QStringList>
24 #ifndef Q_MOC_RUN // MT : very important to avoid the error : ' Parse error at
40 #endif // FEVV_USE_CGAL
41 #ifdef FEVV_USE_OPENMESH
43 #endif // FEVV_USE_OPENMESH
46 #endif // FEVV_USE_AIF
49 #endif // FEVV_USE_AIF
60 #if(FEVV_USE_QT5) // see at the end of .cpp for QT4
61 Q_PLUGIN_METADATA(IID
"WeightedPCAPlugin")
71 void init()
override {
init(100, 0.01, 10000000); }
73 void init(
double _x,
double _y,
double _z)
92 std::cerr <<
"BaseWindow is null or not initialized." << std::endl;
97 template<
typename HalfedgeGraph >
100 std::cout <<
"Running filter WeihgtedPCA normal computation..." << std::endl;
102 std::cout <<
"create vertex-normal map" << std::endl;
108 auto pm =
get(boost::vertex_point, *cloud);
115 std::cout <<
"Running filter WeihgtedPCA normal computation... done." << std::endl;
118 template<
typename HalfedgeGraph >
120 HalfedgeGraph *_mesh,
126 if(dialog.exec() == QDialog::Accepted)
154 applyHG< FEVV::CGALPointSet >(_adapter, pc, pmaps_bag);
159 void apply(BaseAdapterVisu *_adapter,
163 applyHG< FEVV::PCLPointCloud >(_adapter, pc, pmaps_bag);
169 return QStringList() <<
"WeightedPCAPlugin";
virtual bool isInit() const
void put_property_map(PropertyT p, const MeshT &, PMapsContainer &pmaps, const typename PMap_traits< PropertyT, MeshT >::pmap_type &pmap)
CGAL::Point_set_3< CGALPointSetPoint > CGALPointSet
This class is intended to provide some standard message boxes to all plugins.
pcl::PointCloud< PCLEnrichedPoint > PCLPointCloud
virtual Viewer * getViewer()
WeightedPCAPlugin()=default
SimpleWindow is a specialization of QMainWindow. This class the Main Window.
std::map< std::string, boost::any > PMapsContainer
void draw_or_redraw_mesh(HalfedgeGraph *_g, PMapsContainer *_pmaps, bool _redraw=false, bool _recomputeNT_if_redraw=false, std::string _mesh_filename=std::string(""), bool _recreateOSGobj_if_redraw=true, float _step=0.)
void compute_weighted_pca(const PointCloud &pointCloud, const PointMap &pointMap, NormalMap &normalMap, int n_neight, float noise, float curvature, const GeometryTraits >)
FEVV::PCLPointCloudPointMap::value_type get(const FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key)
Specialization of get(point_map, key) for PCLPointCloud.
~WeightedPCAPlugin()=default
SimpleViewer is a specialization of osgViewer::CompositeViewer. This class is a widget where we are a...
QStringList Generic_plugins() const override
void onModificationParam(std::string _pluginName, BasePlugin *_plugin)
Interfaces for plugins These interfaces will be used for different plugins.
void getParameters(double &x, double &y, double &z)
void addParameters(BaseWindow *_window) override
void init(double _x, double _y, double _z)
void setParameters(double x, double y, double z)
void process(HalfedgeGraph *cloud, FEVV::PMapsContainer *pmaps_bag, int n_neight, float noise, float curvature)
void applyHG(BaseAdapterVisu *_adapter, HalfedgeGraph *_mesh, FEVV::PMapsContainer *pmaps_bag)
bool Generic_plugin(const QString &) override
virtual void apply(BaseAdapterVisu *, void *, FEVV::PMapsContainer *) override
PMap_traits< PropertyT, MeshT >::pmap_type make_property_map(PropertyT, const MeshT &m)