pygalmesh
pygalmesh copied to clipboard
Question about converting volume to surface
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:
- Read nrrd file (can be in numpy format)
- Convert from volume to surface (can I do simplify method to do compression)
- Save surface as new vtk file Is this pipeline possible to achieve?
+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
)