-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Is there a way to write the border of a digital set to an OBJ? #1409
Comments
@psarahdactyl If you want to write the border points in cases like in one from the example you refer to then you can use something like this
It is basically the example with some lines changed at the very end. |
thank you so much! I wasn't quite sure how to use the Board class. |
@psarahdactyl Great! Could you please close the issue if the solution helped you out. |
@psarahdactyl By the way, you do not need the loop over points. You can send the object directly, i.e., replace
with |
Sorry to ask so many questions, but say now I want to get the vertices and faces of the voxel geometry. I have been looking around the documentation and the inline header files for Display3D and Board3D and see that there is an addCube function which seems to deal with the actual geometry. Is there an easier way exposed to the user where I can access this? Maybe through the PointSet? |
You should have a look to the brand new Shortcuts https://dgtal.org/doc/stable/moduleShortcuts.html There are direct methods to export a digital surface to OBJ (either primal or dual surface) or to obtain easy vertices/faces accessors. |
Like getSurfelRange or getPointelRange |
Do I first need to make the DigitalTopology into a DigitalSurface?
I was trying to make a DigitalSetBoundary because it has a surfel iterator but I can't figure out how to use the constructor on line 192 of DigitalSetBoundary.h |
I'm having trouble understanding what
|
Yes it is. In most situations, no need to manually construct the KSpace, it is usually given by the container. |
Thank you! |
Hi @dcoeurjo, I had a short follow-up question to this: it appears that Wonder if you're able to clarify (i.e. how can I obtain a digital surface given a digital set)? I am basically trying to import a triangle mesh from an OBJ file, voxelize it, obtain its digital surface (boundary), and save the result back as a quadrilateral mesh OBJ file. Thank you very much. |
Hello |
Otherwise there are helper functions that simply builds the set of cells forming the boundary (2-cells in 3D). This can be done by scanning the whole image as:
where ks is your |
Alternatively, you can use the |
I want to avoid marching cube type artifacts in my obj files, where some of the surface is missing on the boundaries of the voxel grid. I get these when I make a DigitalSurface or a TrianglulatedSurface from a BinaryImage of my DigitalSet.
In this example, which I've gotten running on my own DigitalSet, I want to write out just the border voxels to an OBJ. Is there a way to do this?
The text was updated successfully, but these errors were encountered: