Point Cloud to Mesh

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Point Cloud to Mesh

Alex Liu
Hi all.
I'm trying to construct face from DICOM images. Till now I've successfully extracted Points and normals, you can get the ply file from here FaceReconstruct.ply

this is the point cloud result


Now I'm trying to convert Points to mesh, for that I'm using

 vtkSmartPointer<vtkDelaunay2D> delaunay = vtkSmartPointer<vtkDelaunay2D>::New();
    delaunay->SetAlpha(4.0);
    delaunay->SetTolerance(0.0001);
    delaunay->SetOffset(1.25);
    delaunay->BoundingTriangulationOff();
    delaunay->SetInputData(polyData);
    delaunay->SetSourceData(polyData);
    delaunay->Update();

But this function is not able to construct the mesh properly. I tried changing all the parameters for Delaunay2D but, got no success. I also tried using vtkSurfaceReconstruct and I get some strange result.
In meshlab I can construct a smooth surface by using Poisson Surface Reconstruct, and wanted to get the same result using vtk.

Delaunay2D result


MeshLab result


Please help me to figure out what's wrong I'm doing and also any solution to construct a smooth surface from this point cloud will be really appreciated.
Thank you.
Alex Liu
+15574855474
Reply | Threaded
Open this post in threaded view
|

Re: Point Cloud to Mesh

Andras Lasso
Why don't you simply use vtkContourFilter to directly generate surface from the input image?
http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Medical/Cxx/Medical1.cxx

Andras

-----Original Message-----
From: vtkusers [mailto:[hidden email]] On Behalf Of Alex Liu via vtkusers
Sent: December 14, 2016 3:57
To: [hidden email]
Subject: [vtkusers] Point Cloud to Mesh

Hi all.
I'm trying to construct face from DICOM images. Till now I've successfully extracted Points and normals, you can get the ply file from here FaceReconstruct.ply <https://www.dropbox.com/s/xm6rc66w3e9p0ak/FaceReconstruct.ply?dl=0>  

this is the point cloud result
<http://vtk.1045678.n5.nabble.com/file/n5741531/PointCloud.png>

Now I'm trying to convert Points to mesh, for that I'm using

 vtkSmartPointer<vtkDelaunay2D> delaunay = vtkSmartPointer<vtkDelaunay2D>::New();
    delaunay->SetAlpha(4.0);
    delaunay->SetTolerance(0.0001);
    delaunay->SetOffset(1.25);
    delaunay->BoundingTriangulationOff();
    delaunay->SetInputData(polyData);
    delaunay->SetSourceData(polyData);
    delaunay->Update();

But this function is not able to construct the mesh properly. I tried changing all the parameters for Delaunay2D but, got no success. I also tried using vtkSurfaceReconstruct and I get some strange result.
In meshlab I can construct a smooth surface by using Poisson Surface Reconstruct, and wanted to get the same result using vtk.

Delaunay2D result
<http://vtk.1045678.n5.nabble.com/file/n5741531/Delaunay2D-Result.png>

MeshLab result
<http://vtk.1045678.n5.nabble.com/file/n5741531/MeshLab-Result.png>

Please help me to figure out what's wrong I'm doing and also any solution to construct a smooth surface from this point cloud will be really appreciated.
Thank you.



-----
Alex Liu
+15574855474
--
View this message in context: http://vtk.1045678.n5.nabble.com/Point-Cloud-to-Mesh-tp5741531.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Point Cloud to Mesh

Jorge Perez
In reply to this post by Alex Liu
you can also use PoissonReconstruction module, it is a remote module and can be include in the VTK BUILD defining
-DModule_PoissonReconstruction:BOOL=ON
HTH
Jorge


2016-12-14 9:56 GMT+01:00 Alex Liu via vtkusers <[hidden email]>:
Hi all.
I'm trying to construct face from DICOM images. Till now I've successfully
extracted Points and normals, you can get the ply file from here
FaceReconstruct.ply
<https://www.dropbox.com/s/xm6rc66w3e9p0ak/FaceReconstruct.ply?dl=0>

this is the point cloud result
<http://vtk.1045678.n5.nabble.com/file/n5741531/PointCloud.png>

Now I'm trying to convert Points to mesh, for that I'm using

 vtkSmartPointer<vtkDelaunay2D> delaunay =
vtkSmartPointer<vtkDelaunay2D>::New();
    delaunay->SetAlpha(4.0);
    delaunay->SetTolerance(0.0001);
    delaunay->SetOffset(1.25);
    delaunay->BoundingTriangulationOff();
    delaunay->SetInputData(polyData);
    delaunay->SetSourceData(polyData);
    delaunay->Update();

But this function is not able to construct the mesh properly. I tried
changing all the parameters for Delaunay2D but, got no success. I also tried
using vtkSurfaceReconstruct and I get some strange result.
In meshlab I can construct a smooth surface by using Poisson Surface
Reconstruct, and wanted to get the same result using vtk.

Delaunay2D result
<http://vtk.1045678.n5.nabble.com/file/n5741531/Delaunay2D-Result.png>

MeshLab result
<http://vtk.1045678.n5.nabble.com/file/n5741531/MeshLab-Result.png>

Please help me to figure out what's wrong I'm doing and also any solution to
construct a smooth surface from this point cloud will be really appreciated.
Thank you.



-----
Alex Liu
+15574855474
--
View this message in context: http://vtk.1045678.n5.nabble.com/Point-Cloud-to-Mesh-tp5741531.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Point Cloud to Mesh

Alex Liu
In reply to this post by Andras Lasso
Actually there are some unwanted things in the image which I've to filter it and if I do generate surface directly from the image the surface is not very smooth.
Alex Liu
+15574855474
Reply | Threaded
Open this post in threaded view
|

Re: Point Cloud to Mesh

Alex Liu
In reply to this post by Jorge Perez
Yes I was trying to configure PoissonReconstruction module, but I'm getting some error while compiling this module with Mingw. I'll try to setup this module
 
Thanks for your reply Andras and Jorge
Alex Liu
+15574855474
Reply | Threaded
Open this post in threaded view
|

Re: Point Cloud to Mesh

Alex Liu
This post was updated on .
In reply to this post by Jorge Perez
Hi. I tried using PoissonReconstruction and got the result but it takes like 20 minutes with values set to

poissonReconstruction->SetSamplesPerNode(1.0);
poissonReconstruction->SetDepth(10);          
poissonReconstruction->SetKernelDepth(6);      
poissonReconstruction->SetSolverDivide(10);    
poissonReconstruction->SetIsoDivide(10);      


Result

I'm still looking for a way to generate a proper mesh for point cloud.
Please Help.
Thank you.
Alex Liu
+15574855474
Reply | Threaded
Open this post in threaded view
|

Re: Point Cloud to Mesh

Bill Lorensen
Is your vtk built Release or Debug?


On Wed, Dec 21, 2016 at 3:15 AM, Alex Liu via vtkusers <[hidden email]> wrote:

> Hi. I tried using PoissonReconstruction and got the result but it takes like
> 20 minutes with values set to
>
> poissonReconstruction->SetSamplesPerNode(1.0);
> poissonReconstruction->SetDepth(10);
> poissonReconstruction->SetKernelDepth(6);
> poissonReconstruction->SetSolverDivide(10);
> poissonReconstruction->SetIsoDivide(10);
>
> <http://vtk.1045678.n5.nabble.com/file/n5741621/Poisson.png>
>
> I'm still looking for a way to generate a proper mesh for point cloud.
> Please Help.
> Thank you.
>
>
>
> -----
> Alex Liu
> +15574855474
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Point-Cloud-to-Mesh-tp5741531p5741621.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Point Cloud to Mesh

Alex Liu
Hello Bill.
It was on debug.
I tried changing the settings for PoissonReconstruction to

vtkSmartPointer<vtkPoissonReconstruction> pR =
vtkSmartPointer<vtkPoissonReconstruction>::New();
    pR->SetInputConnection(polyDataNormals->GetOutputPort());
    pR->SetSamplesPerNode(1.0);
    pR->SetDepth(10);
    pR->SetKernelDepth(10);
    pR->SetSolverDivide(10);
    pR->SetIsoDivide(10);
    pR->Update();

now I get a very good result and I tried both in debug and release.
In Release mode it takes 4 minutes to reconstruct 443466 vertices.
Alex Liu
+15574855474