Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about converting volume to surface #194

Open
mikami520 opened this issue Jul 18, 2022 · 1 comment
Open

Question about converting volume to surface #194

mikami520 opened this issue Jul 18, 2022 · 1 comment

Comments

@mikami520
Copy link

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?
@SoundsSerious
Copy link

SoundsSerious commented Dec 24, 2023

+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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants