pygalmesh icon indicating copy to clipboard operation
pygalmesh copied to clipboard

Question about converting volume to surface

Open mikami520 opened this issue 2 years ago • 1 comments

Hi, I am new to pygalmesh, I have a quick question about converting volume to mesh. Can this library convert nrrd CT volume file to the surface? I have a pipeline following:

  1. Read nrrd file (can be in numpy format)
  2. Convert from volume to surface (can I do simplify method to do compression)
  3. Save surface as new vtk file Is this pipeline possible to achieve?

mikami520 avatar Jul 18 '22 19:07 mikami520

+1 for this.

If i try the ring-extrude example with the surface mesh feature I get lots of edge distortion where as the volume method works as described. It would be great to go from volume to surface. This could be as simple as just grabbing the outer faces of the volume and renormalize??

This code similar to the example gives me the following edge distortion on surface mesh:

p = pygalmesh.Polygon2D([[0.5, -0.3], [1.5, -0.3], [1.0, 0.5]])
me = 0.05
domain = pygalmesh.RingExtrude(p, me/100)
mesh = pygalmesh.generate_surface_mesh(
    domain,
    verbose=False,
    min_facet_angle=30,
    max_radius_surface_delaunay_ball=me/2,
    max_facet_distance=me
)

surface_mesh

SoundsSerious avatar Dec 24 '23 20:12 SoundsSerious