Hello Will and all
Following Derk with some very enthusiastic feedback. We have been experimenting with your new filter here and it is indeed amazingly fast ! The fact that it includes a smoothing algorithm saves us a lot of time. And also the fact that it can operate on all the labels at once !
Before that, we were doing something (probably stupid) like
for all labels in a label map :
1. Extract one label and set it to 255;
2. Perform a slow gaussian Blur
3. Genereate a mesh with the Flying Edges at 128
4. Add the mesh to the renderWindow
Now it can be
LabelMap > Surface Nets > Add the mesh to the renderWindow
Easier to read and to maintain
However we are also facing the same difficulties as Derk : How to extract properly and efficiently a mesh corresponding to a specific label ?
Please find attached a full example that demonstrates 2 different solutions to generate the meshes and render them, but we have the feeling here that there are more efficient solutions
Maybe someone can guide us ? Or maybe that’s something that should be integrated within the Surface Nets implementation itself, the possibility to output several meshes instead of one…
Anyway the program is meant to be used with the attached label-map.vti
Once build, just run it with one of the following line :
SimpleSurfaceNets.exe C:/Path/to/label-map.vti one-by-one 2 3
SimpleSurfaceNets.exe C:/Path/to/label-map.vti all-at-once 1
SimpleSurfaceNets.exe C:/Path/to/label-map.vti all-at-once 1 2 3 4 5
Thank you so much for your work
Simon
PS: for Derk, I think the program can help you if you are not too worried about performance, the extraction of all the meshes takes more time than the execution of the Surface Nets
label-map.vti (800.8 KB)
CMakeLists.txt (524 Bytes)
main.cpp (10.0 KB)