CGAL mesh voxelization - mesh

Does CGAL provide a method of surface mesh voxelization, like iso2mesh for
matlab?
Also does CGAL provides image processing methods - imerode, imdilate,
imclose - like matlabs image processing toolbox?

CGAL does not provide what you want. We only offer functions to extract iso-surfaces from voxel data, or to tetrahedrize the volumes between such surfaces.

Related

Writing CGAL Efficient Ransac detected planes to file

I've been successfully testing CGAL Efficient RANSAC using this provided example to detect planes in a point cloud. The only piece missing from the CGAL Efficient RANSAC examples is a way to write the detected planes into a mesh (something like what polyfit offers at the end of this example)
I've noted that I can use the planes() method from Efficient_RANSAC to get an iterator of Plane but I'm a bit lost after that. Do I need to read all points from each plane and try and manually create a mesh from it ?
Thanks in advance for any help

How do I convert a PCL Polygonmesh to a CGAL CGAL::Tetrahedral_remeshing::Remeshing_triangulation_3<K>?

I am currently using PCL to obtain a mesh from a point cloud, but I would like to use CGAL tetrahedral_isotropic_remeshing() method to improve the quality of my mesh in certain areas. I am having some difficulties in transforming my pcl::Polygonmesh into the CGAL::Tetrahedral_remeshing::Remeshing_triangulation_3 object required to use the isotropic remeshing method.
Thanks,

Inverted faces in surface mesh produced by Polygonal Surface Reconstruction

I'm trying to use Polygonal Surface Reconstruction with building point cloud to create simplified building models.
I did first tests with this CGAL code example and got first promising results.
As an example, I used this point cloud with vertex normals correctly oriented and got the following result from PSR. Some faces are clearly inverted (dark faces with normals pointing inside the watertight mesh and therefore not visible).
I was wondering if there a way to fix this face orientation error. I've noticed orientation methods on Polygon mesh but I don't really know to apply them to the resulting PSR surface mesh. As far as logic is concerned making normal point outwards should not be too complicated I guess.
Thanks in advance for any help
You can use the function reverse_face_orientations in the Polygon mesh processing package.
Note that this package has several functions that can help you to correct/modify your mesh.

Triangulate a surface with vtk from points AND normals

I have a set of points in 3D that lie on a surface and I also have the normals at every point.
I would like to generate a surface triangulation with this information. In addition I could tell the algorithm to use what points lie on the boundary if that is needed.
So, I have quite a bit of information:
* points
* normals
* boundary
How do I triangulate a surface with this information using vtk?
A surface reconstruction algorithm is like using a bomb for this problem since I have all this information that I would like to use. This information comes from a simulation so I know the surface exists and that is quite smooth.
I would like the answer to be cast in terms of either what vtk function to use and if available (and that would be great) examples using this function.
Thank you so much in advance.
You can use the vtkSurfaceReconstruction filter to create a surface from a set of 3D points.
You could try the point cloud library
Point Cloud Library
Just the 3D points would be good enough. Since you know that your surface is smooth, you can perform a Delaunay triangulation of the points (vtkDelaunay3D) and apply a subdivision filter for smoothening (vtkButterflySubdivisionFilter).
Delaunay3D triangulation

Creating a 3D mesh in VTK

I am trying to create a 3D mesh using VTK. VTK appears to provide a number of ways to create a mesh representing the surface of a 3D object. Filling in the object appears to be more difficult. The reason I want to do this is to pass the output to a FEM tool as a solid, not a balloon.
At the moment, I am playing with spheres and there seems to be a number of ways to create a mesh for the surface of a 3D object. What I can't seem to do is create a sphere with points inside the volume. The vtkUnstructuredGrid class allows me to represent such an object, but I can't seem to mesh this in the same way I can a vtkPolyData.
Is this a fundamental limitation of VTK or am I just not seeing the right tool?
As you said:
I want to do this is to pass the output to an FEM tool as a solid not a balloon
I asume you have your FEM mesh in your own format and you want to visualize it. To do so, you can turn your FEM mesh into a vtkUnstructuredGrid modifiying the code described here:
How to convert a mesh to VTK format?