ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
MarchingCubeReconstruction.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 "BasePclModule.h"
11 
12 // Qt
13 #include <QString>
14 
15 class MarchingCubeDlg;
16 
19 public:
22 
23  // inherited from BasePclModule
24  virtual int compute();
25 
26 protected:
27  // inherited from BasePclModule
28  virtual int checkSelected();
29  virtual int openInputDialog();
30  virtual void getParametersFromDialog();
31  virtual int checkParameters();
32  virtual QString getErrorMessage(int errorCode);
33 
36  float m_epsilon;
37  float m_isoLevel;
40 
43  bool m_useKnn;
44 };
PCLMesh
pcl::PolygonMesh PCLMesh
Definition: PCLCloud.h:31
FROM_PCL_CLOUD
#define FROM_PCL_CLOUD
Definition: PCLConv.h:11
MarchingCubeDlg
Definition: MarchingCubeDlg.h:18
cloudViewer::GenericCloud::size
virtual unsigned size() const =0
Returns the number of points.
ccHObject::getParent
ccHObject * getParent() const
Returns parent object.
Definition: ecvHObject.h:245
ccMesh::size
virtual unsigned size() const override
Returns the number of triangles.
Definition: ecvMesh.cpp:2143
MarchingCubeReconstruction::openInputDialog
virtual int openInputDialog()
Definition: MarchingCubeReconstruction.cpp:58
PCLModules::GetMarchingCubes< PointNT >
template int GetMarchingCubes< PointNT >(const PointCloudNormal::ConstPtr inCloud, const MarchingMethod &marchingMethod, PCLMesh &outMesh, float epsilon, float isoLevel, float gridResolution, float percentageExtendGrid)
cloudViewer::BoundingBoxTpl::getDiagNorm
T getDiagNorm() const
Returns diagonal length.
Definition: BoundingBox.h:172
MarchingCubeReconstruction.h
ccObject::setName
virtual void setName(const QString &name)
Sets object name.
Definition: ecvObject.h:75
MarchingCubeReconstruction::m_isoLevel
float m_isoLevel
Definition: MarchingCubeReconstruction.h:37
ccBBox
Bounding box structure.
Definition: ecvBBox.h:25
ccShiftedObject::setGlobalScale
virtual void setGlobalScale(double scale)
Definition: ecvShiftedObject.cpp:33
CVLog::Print
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
PclModuleDescription
PCL filter description.
Definition: BasePclModule.h:26
PCLModules::MarchingMethod
MarchingMethod
Definition: PCLModules.h:216
ccPointCloud
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
PCLModules.h
ecvMainAppInterface.h
BasePclModule::isFirstSelectedCcPointCloud
int isFirstSelectedCcPointCloud()
Returns 1 if the first selected object is a ccPointCloud.
Definition: BasePclModule.cpp:358
MarchingCubeReconstruction::getParametersFromDialog
virtual void getParametersFromDialog()
Collects parameters from the filter dialog (if openDialog is successful)
Definition: MarchingCubeReconstruction.cpp:75
ccMesh::getAssociatedCloud
ccGenericPointCloud * getAssociatedCloud() const override
Returns the vertices cloud.
Definition: ecvMesh.h:143
cc2sm.h
MarchingCubeReconstruction::checkSelected
virtual int checkSelected()
Checks if current selection is compliant with the filter.
Definition: MarchingCubeReconstruction.cpp:50
PCLCloud
pcl::PCLPointCloud2 PCLCloud
Definition: PCLCloud.h:34
normals
double normals[3]
Definition: TriangleMeshIO.cpp:54
result
core::Tensor result
Definition: VtkUtils.cpp:76
MarchingCubeReconstruction::checkParameters
virtual int checkParameters()
Definition: MarchingCubeReconstruction.cpp:93
MarchingCubeDlg.h
ccShiftedObject::getGlobalShift
virtual const CCVector3d & getGlobalShift() const
Returns the shift applied to original coordinates.
Definition: ecvShiftedObject.h:46
BasePclModule
Base abstract class for each implemented PCL filter.
Definition: BasePclModule.h:53
pcl2cc::Convert
static ccMesh * Convert(PCLTextureMesh::ConstPtr textureMesh)
Converts a PCL point cloud to a ccPointCloud.
MarchingCubeReconstruction::compute
virtual int compute()
Performs the actual filter job.
Definition: MarchingCubeReconstruction.cpp:95
MarchingCubeReconstruction::m_marchingMethod
int m_marchingMethod
Definition: MarchingCubeReconstruction.h:35
MarchingCubeReconstruction::m_epsilon
float m_epsilon
Definition: MarchingCubeReconstruction.h:36
cc2smReader
CC to PCL cloud converter.
Definition: cc2sm.h:43
MarchingCubeReconstruction::m_gridResolution
float m_gridResolution
Definition: MarchingCubeReconstruction.h:38
MarchingCubeReconstruction::m_dialog
MarchingCubeDlg * m_dialog
Definition: MarchingCubeReconstruction.h:34
cloudViewer::BoundingBoxTpl::isValid
bool isValid() const
Returns whether bounding box is valid or not.
Definition: BoundingBox.h:203
MarchingCubeReconstruction::m_knn_radius
int m_knn_radius
Definition: MarchingCubeReconstruction.h:41
ecvMainAppInterface::getActiveWindow
virtual QWidget * getActiveWindow()=0
ecvMesh.h
ccPointCloud::hasNormals
bool hasNormals() const override
Returns whether normals are enabled or not.
Definition: ecvPointCloud.cpp:1693
BasePclModule::newEntity
void newEntity(ccHObject *)
Signal emitted when a new entity is created by the filter.
BasePclModule::m_app
ecvMainAppInterface * m_app
Associated application interface.
Definition: BasePclModule.h:296
MarchingCubeReconstruction::getErrorMessage
virtual QString getErrorMessage(int errorCode)
Returns the error message corresponding to a given error code.
Definition: MarchingCubeReconstruction.cpp:166
MarchingCubeReconstruction::~MarchingCubeReconstruction
virtual ~MarchingCubeReconstruction()
Definition: MarchingCubeReconstruction.cpp:45
BasePclModule.h
PCLModules::ComputeNormals< PointT, NormalT >
template int ComputeNormals< PointT, NormalT >(const PointCloudT::ConstPtr inCloud, CloudNormal::Ptr outcloud, const float radius, const bool useKnn, bool normalConsistency, int maxThreadCount)
MarchingCubeReconstruction::MarchingCubeReconstruction
MarchingCubeReconstruction()
Definition: MarchingCubeReconstruction.cpp:29
MarchingCubeReconstruction::m_useKnn
bool m_useKnn
Definition: MarchingCubeReconstruction.h:43
ccMesh
Triangular mesh.
Definition: ecvMesh.h:35
ccShiftedObject::getGlobalScale
virtual double getGlobalScale() const
Returns the scale applied to original coordinates.
Definition: ecvShiftedObject.h:53
ccShiftedObject::setGlobalShift
virtual void setGlobalShift(double x, double y, double z)
Sets shift applied to original coordinates (information storage only)
Definition: ecvShiftedObject.h:33
ccGenericPointCloud::getOwnBB
ccBBox getOwnBB(bool withGLFeatures=false) override
Returns the entity's own bounding-box.
Definition: ecvGenericPointCloud.cpp:139
MarchingCubeReconstruction::m_normalSearchRadius
float m_normalSearchRadius
Definition: MarchingCubeReconstruction.h:42
MarchingCubeReconstruction::m_percentageExtendGrid
float m_percentageExtendGrid
Definition: MarchingCubeReconstruction.h:39
BasePclModule::getSelectedEntityAsCCPointCloud
ccPointCloud * getSelectedEntityAsCCPointCloud() const
Returns the first selected entity as a ccPointCloud.
Definition: BasePclModule.cpp:256
ccHObject::addChild
virtual bool addChild(ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
Adds a child.
Definition: ecvHObject.cpp:534
CloudNormal
pcl::PointCloud< NormalT > CloudNormal
Definition: PCLCloud.h:27
PointCloudNormal
pcl::PointCloud< PointNT > PointCloudNormal
Definition: PCLCloud.h:25
sm2cc.h
ecvPointCloud.h
MarchingCubeReconstruction
Pcl Grid Projection.
Definition: MarchingCubeReconstruction.h:18
cc2smReader::getAsSM
PCLCloud::Ptr getAsSM(std::list< std::string > &requested_fields) const
Definition: cc2sm.cpp:607
BasePclModule::getErrorMessage
virtual QString getErrorMessage(int errorCode)
Returns the error message corresponding to a given error code.
Definition: BasePclModule.cpp:218
cc2smReader::getXYZ2
pcl::PointCloud< pcl::PointXYZ >::Ptr getXYZ2() const
Definition: cc2sm.cpp:218