Closed hamiddhg closed 11 months ago
Hi @hamiddhg Thanks for the feedback. This is a known limitation of these algorithms. These need special treatment, because the 2 regions are not connected. The algorithm cannot know if they belong together or not.
The labels are just entries in a dictionary that you can modify through the field data attribute: https://nanomesh.readthedocs.io/en/latest/examples/examples_generate_a_2d_triangular_mesh.html#Field-data
Thank you @stefsmeets, I made the changes and now the regions are OK. However, still I get segmentation fault: 11 when I run triangulation. I suspect this is related to RAM but, as you see, the job is very small for 32 GB of RAM!
Best,
Hamid,
I have had these random crashes as well sometimes, it seems to be an issue with the triangulizer (https://pypi.org/project/triangle/). Maybe how the data are specified, but I wasn't able to find a work-around for it.
I'm going to close this issue now, but feel free to re-open or nake a new one if you run into something else!
I use nanomesh to create a mesh from a binary image attached here. I frequently get Segmentation fault but I have successfully created mesh for much larger images/files. Sometimes it succeeds but sometimes not! It seems that there is an issue with region markers as it shows only "background". The marker on the top left should be "background" instead of "X". Could you please help me solving this issue?
''' plane = Image(Im_binary) mesher = Mesher2D(plane) mesher.generate_contour(max_edge_dist=5) mesher.plot_contour() plt.show() mesh = mesher.triangulate(opts='q30a100') '''