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

Direct Mesh Extraction #20

Open
william-silversmith opened this issue Dec 18, 2024 · 2 comments
Open

Direct Mesh Extraction #20

william-silversmith opened this issue Dec 18, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@william-silversmith
Copy link
Contributor

william-silversmith commented Dec 18, 2024

It might be possible to directly extract a triangle mesh from the crack codes by expressing the dual graph of level sets of contours. Then the level sets can be converted into a mesh. That last step might not be super easy though.

Q: Is it worth doing this vs. binary image extraction followed by marching cubes?

Each graph node would be 2 to 4 bytes + 1 byte (encoding two directional links) = 5 bytes. 5 bytes * 10% of the image = 0.5 bytes per a voxel vs a binary image would be 1 byte per a voxel.

Would it be faster? Unclear.

This mesh construction could proceed two z-slices at a time, resulting in extremely low memory usage.

paper relevant to triangle mesh construction from surfaces:
https://dl.acm.org/doi/pdf/10.1145/130881.131213

@william-silversmith william-silversmith added the enhancement New feature or request label Dec 18, 2024
@william-silversmith
Copy link
Contributor Author

william-silversmith commented Dec 18, 2024

The dual graph can also be used to answer queries like "what label is this point inside" or "what is the cross sectional area at this point"

Would this be any better than decoding to an image and sampling? For large sections probably, but would that be better than using the random access grid?

If I recall correctly, a major contributor to decoding time is connected components, so if that could be reduced (e.g. by only needing to CCL a subset of contours), maybe that would accelerate those queries.

@william-silversmith
Copy link
Contributor Author

william-silversmith commented Dec 18, 2024

You could also easily extract a point cloud. You can create an approximate surface mesh from a point cloud using the point cloud library: https://pointclouds.org/

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

No branches or pull requests

1 participant