24 #include <QInputDialog>
25 #include <QMainWindow>
33 tr(
"ConvexConcaveHull Reconstruction"),
34 tr(
"ConvexConcaveHull Reconstruction"),
35 tr(
"ConvexConcaveHull Reconstruction from clouds"),
36 ":/toolbar/PclAlgorithms/icons/convex_concave_hull.png")),
49 if (have_cloud != 1)
return -11;
82 if (!cloud)
return -1;
86 if (!xyzCloud)
return -1;
101 if (out_cloud_sm.height * out_cloud_sm.width == 0) {
113 unsigned faceCount = out_mesh->
size();
116 CVLog::Print(tr(
"[Concave-Reconstruction] %1 points, %2 face(s)")
119 out_mesh->
setName(tr(
"Concave Reconstruction"));
121 CVLog::Print(tr(
"[Convex-Reconstruction] %1 points, %2 face(s)")
124 out_mesh->
setName(tr(
"Convex Reconstruction"));
145 "Selected entity does not have any suitable scalar field "
149 "Wrong Parameters. One or more parameters cannot be "
153 "Convex Concave Hull Reconstruction does not returned any "
154 "point. Try relaxing your parameters");
pcl::PCLPointCloud2 PCLCloud
Base abstract class for each implemented PCL filter.
int isFirstSelectedCcPointCloud()
Returns 1 if the first selected object is a ccPointCloud.
void newEntity(ccHObject *)
Signal emitted when a new entity is created by the filter.
ecvMainAppInterface * m_app
Associated application interface.
virtual QString getErrorMessage(int errorCode)
Returns the error message corresponding to a given error code.
ccPointCloud * getSelectedEntityAsCCPointCloud() const
Returns the first selected entity as a ccPointCloud.
static bool Print(const char *format,...)
Prints out a formatted message in console.
virtual int compute()
Performs the actual filter job.
virtual void getParametersFromDialog()
Collects parameters from the filter dialog (if openDialog is successful)
ConvexConcaveHullReconstruction()
virtual int openInputDialog()
virtual ~ConvexConcaveHullReconstruction()
ConvexConcaveHullDlg * m_dialog
virtual int checkParameters()
virtual QString getErrorMessage(int errorCode)
Returns the error message corresponding to a given error code.
virtual int checkSelected()
Checks if current selection is compliant with the filter.
CC to PCL cloud converter.
pcl::PointCloud< pcl::PointXYZ >::Ptr getXYZ2() const
ccHObject * getParent() const
Returns parent object.
virtual bool addChild(ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
Adds a child.
virtual unsigned size() const override
Returns the number of triangles.
ccGenericPointCloud * getAssociatedCloud() const override
Returns the vertices cloud.
virtual void setName(const QString &name)
Sets object name.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
virtual void setGlobalShift(double x, double y, double z)
Sets shift applied to original coordinates (information storage only)
virtual const CCVector3d & getGlobalShift() const
Returns the shift applied to original coordinates.
virtual void setGlobalScale(double scale)
virtual double getGlobalScale() const
Returns the scale applied to original coordinates.
virtual unsigned size() const =0
Returns the number of points.
virtual QWidget * getActiveWindow()=0
static ccMesh * Convert(PCLTextureMesh::ConstPtr textureMesh)
Converts a PCL point cloud to a ccPointCloud.
template int GetConcaveHullReconstruction< PointT >(const PointCloudT::ConstPtr inCloud, PCLMesh &outMesh, int dimension, float alpha)
template int GetConvexHullReconstruction< PointT >(const PointCloudT::ConstPtr inCloud, PCLMesh &outMesh, int dimension)